feat: add expanded option to accordion#8559
Draft
ryptotalent wants to merge 3 commits intomarimo-team:mainfrom
Draft
feat: add expanded option to accordion#8559ryptotalent wants to merge 3 commits intomarimo-team:mainfrom
ryptotalent wants to merge 3 commits intomarimo-team:mainfrom
Conversation
Adds user configuration option 'enter_command_mode_on_escape' to control whether pressing Escape enters command mode. Defaults to true for backward compatibility. Closes marimo-team#7426
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
All contributors have signed the CLA ✍️ ✅ |
Adds expanded parameter to mo.accordion() that expands all items by default when set to True. Defaults to False for backward compatibility. Closes marimo-team#8549
98cd598 to
77e3c20
Compare
for more information, see https://pre-commit.ci
mscolnick
reviewed
Mar 3, 2026
| if ( | ||
| evt.key === "Escape" && | ||
| userConfig.keymap.enter_command_mode_on_escape !== false | ||
| ) { |
mscolnick
reviewed
Mar 3, 2026
| items: dict[str, object], | ||
| multiple: bool = False, | ||
| lazy: bool = False, | ||
| expanded: bool = False, |
Contributor
There was a problem hiding this comment.
does this expand all? is there a case you may just want to expand first first one? or middle one?
cc @akshayka @dmadisetti regarding API
dmadisetti
reviewed
Mar 3, 2026
| lazy: a boolean, whether to lazily load the accordion content. | ||
| This is a convenience that wraps each accordion in a `mo.lazy` | ||
| component. | ||
| expanded: if True, all accordion items are expanded by default |
Collaborator
There was a problem hiding this comment.
It's not clear how expanded and multiple interact. It seems like mutliple=False isn't respected with this?
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.
Adds
expandedparameter tomo.accordion()that expands all items by default when set toTrue. Defaults toFalsefor backward compatibility.Closes #8549