Repository navigation
feat: per-widget collapse state - #83
Merged
Merged
Conversation
Whether a widget starts collapsed came only from vulpea-ui-default-widget-collapsed, one switch for every widget. Folding the long built-in widgets folded your own widgets too, and there was no way to fold just one of them. vulpea-ui-register-widget now takes :collapsed, which decides for that widget alone: t starts it collapsed, nil starts it expanded whatever the global value says. Without :collapsed a widget follows the global value as before. vulpea-ui-widget-set sets it on built-in and third-party widgets. The sidebar provides each widget's registry entry through a context that the vulpea-ui-widget wrapper reads, so widget code does not change. Closes #80
d12frosted
added a commit
that referenced
this pull request
Sep 29, 2026
Emacs 30 runs checkdoc's verb check by default, and it flagged "starts" in the first sentence of vulpea-ui--widget-collapsed-p's docstring (added in #83), failing lint in the 30.2 CI job. Emacs 31.1 turned the check off by default, so lint passed on snapshot and on newer local builds. The docstring now says "should start", and Eldev turns the check on for every Emacs version, so lint gives the same result everywhere.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Whether a widget starts collapsed came from one global switch,
vulpea-ui-default-widget-collapsed. So folding the long built-in widgets also folded your own widgets, and there was no way to fold just one of them.Now
:collapsedonvulpea-ui-register-widgetdecides it for that widget alone:tstarts it collapsed,nilstarts it expanded even when the global default folds everything. Without:collapseda widget follows the global value like before.vulpea-ui-widget-setsets it on built-in widgets and widgets from other packages (like vulpea-journal).It lives in the registry rather than as a prop on
vulpea-ui-widgetbecause it's a user preference, and a prop would only help widgets you write yourself. The sidebar hands each widget its registry entry through a context that the wrapper reads, so no widget code changes.vulpea-ui--get-widgets-for-notenow returns the registry entries instead of bare component symbols.Closes #80