-
Notifications
You must be signed in to change notification settings - Fork 3.3k
feat: BROS-189: Add default open state to Collapse #7993
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
feat: BROS-189: Add default open state to Collapse #7993
Conversation
✅ Deploy Preview for label-studio-docs-new-theme ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for label-studio-storybook ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for heartex-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for label-studio-playground ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #7993 +/- ##
===========================================
+ Coverage 63.68% 65.89% +2.21%
===========================================
Files 715 504 -211
Lines 50292 33382 -16910
Branches 8589 8797 +208
===========================================
- Hits 32027 21998 -10029
+ Misses 18262 11381 -6881
Partials 3 3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
/fmt |
| _value: types.optional(types.string, ""), | ||
| value: types.optional(types.string, ""), | ||
|
|
||
| open: types.optional(types.boolean, false), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This param should be optional and nullable then to allow global open to work
Co-authored-by: Andrew <[email protected]>
|
/fmt |
|
/fm merge
|
This pull request introduces a new
openproperty to theCollapsecomponent, enabling the default collapsed state to be set for individual panels. The changes span documentation updates, model adjustments, and rendering logic enhancements.Documentation Updates:
openproperty to theCollapsecomponent's documentation, specifying its type asbooleanand default value asfalse. This property sets the default collapsed state. (docs/source/includes/tags/collapse.md, docs/source/includes/tags/collapse.mdR7)Model Enhancements:
PanelModelandModelinCollapse.jsxto include theopenproperty as an optional boolean with a default value offalse. (web/libs/editor/src/tags/visual/Collapse.jsx, [1] [2]Rendering Logic Improvements:
HtxCollapsecomponent to calculatedefaultActiveKeysbased on theopenproperty of child panels, ensuring the default collapsed state is respected during rendering. (web/libs/editor/src/tags/visual/Collapse.jsx, web/libs/editor/src/tags/visual/Collapse.jsxR129-R140)