-
Notifications
You must be signed in to change notification settings - Fork 431
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(core): add studioActiveToolLayout and navbar rightSectionNode prop #5749
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
|
No changes to documentation |
Component Testing Report Updated Feb 15, 2024 10:23 AM (UTC)
|
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.
LGTM, just a small reflection, but not a blocker for merge.
/** | ||
* @internal | ||
* @beta */ | ||
__internal_rightSectionNode?: ReactNode |
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.
We should probably think about how we could offer an API with more granularity, so we could use a render/renderDefault pattern for these things as well, but I understand why navbar.render
+ renderDefault
didn't work for you here.
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.
Yes, it was an interesting discussion with the ex team, but we couldn't find any other solution given this navbar component adds multiple internal components and we would have need to recreate the same through the plugin.
Will be a nice discussion to bring to next studio meeting. Will propose it.
Thanks @bjoerge !
Looks great! I have two thoughts/suggestions:
|
…op (#5749) * feat(core): add StudioActiveToolLayout api * feat(core): add studioNavbar __internal_rightSectionNode prop
Description
This PR adds two necessary core changes for the
tasks
feature.Studio Active Tool Layout.
It's intention is to wrap the
ActiveTool
and allow plugins to modify the layout around it.The red border shows how it wraps the active tool.
Navbar rightSectionNode
Adds a prop to the studio navbar prop which will be used to insert the TasksNabarButton in the correct position.
The red border shows where the rightSectionNode will be rendered.
What to review
Implementation follows the expected guidelines.
Testing
Create a plugin which uses this new api and the navbar api.
Notes for release
Implements new studio API, ActiveToolLayout which allows plugin authors to have more flexibility by wrapping the active tool.
Adds __internal_rightSectionNode navbar prop.