Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SidebarItems section header #543

Open
wants to merge 5 commits into
base: dev
Choose a base branch
from
Open

Conversation

whirlun
Copy link

@whirlun whirlun commented Jan 7, 2025

Add an additional section parameter to SidebarItem to convert it into an unclickable widget so it can be used as a section header. It may be better to design a dedicated Section widget for this task but this workaround works well for me now.
Capture d’écran, le 2025-01-07 à 3 32 48 p m

Pre-launch Checklist

  • I have incremented the package version as appropriate and updated CHANGELOG.md with my changes
  • I have added/updated relevant documentation
  • I have run "optimize/organize imports" on all changed files
  • I have addressed all analyzer warnings as best I could

@Adrian-Samoticha
Copy link
Member

Thanks. Does this support headers that allow the user to fold the content like native headers do:

Screen.Recording.2025-01-08.at.14.44.51.mov

And if not, do you think it can be added to your solution easily?

@whirlun
Copy link
Author

whirlun commented Jan 8, 2025

Thanks. Does this support headers that allow the user to fold the content like native headers do:

Screen.Recording.2025-01-08.at.14.44.51.mov

Sure, I've added this functionality by reusing disclosureItems. Now if section is true and disclosureItems is not null it will have the ability to expand.

Enregistrement.d.ecran.le.2025-01-08.a.1.02.26.p.m.mov

@Adrian-Samoticha
Copy link
Member

Wow, that’s great! I’ll review this PR soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants