-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Refactor Site Logo "Settings" Panel to Use ToolsPanel #67972
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
Refactor Site Logo "Settings" Panel to Use ToolsPanel #67972
Conversation
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Unlinked AccountsThe following contributors have not linked their GitHub and WordPress.org accounts: @NidhiDhandhukiya. Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases. If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @NidhiDhandhukiya74! In case you missed it, we'd love to have you join us in our Slack community. If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information. |
I think we just need to refactor only Settings inspector controls here and leave Media as it is. |
Hello @Mamaduka |
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.
Thanks for the PR!
This PR seems to be expected to refactor only the Settings panel, but it looks like the Media panel has also been refactored. @NidhiDhandhukiya74 Could you check this PR again?
You might also want to address the following:
- All controls should be visible by default for now. Add
isShownByDefault
to theToolsPanelItem
component. - The dropdown needs to be on the left. Add dropdownMenuProps to the
ToolsPanel
component (Example).
I started refactoring media controls to fix some accessibility issues #68621. It might be better to hold off on this change until bug fixes are merged. |
@NidhiDhandhukiya74 Now that #68621 has been merged, could you resolve the conflict for this PR? |
Hello @t-hamano I've made the requested changes: Refactored only the Settings panel. |
Treat false as a valid value for isLink instead of defaulting to true. Co-authored-by: Aki Hamano <54422211+t-hamano@users.noreply.github.com>
Reset value by updating isLink to its default true. Co-authored-by: Aki Hamano <54422211+t-hamano@users.noreply.github.com>
Sorry for the late reply. I think this PR is ready to ship, so could you confirm the following points?
|
Hi @t-hamano ✅ I’ve refreshed the PR by merging the latest trunk into it. Let me know if there's anything else you'd like me to update! |
@NidhiDhandhukiya Thanks for the update! Finally, could you check the following points?
|
Hi @t-hamano I have made the changes as requested. The dropdownMenuProps prop is now applied to the ToolsPanel component instead of the ToolsPanelItem. Also, the PR has been updated to reflect the correct panel—Settings panel instead of Media panel. Thanks for the review! |
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!
* refactor site logo media panel * refractor site settings of site logo * added shown by default to toolspanelitem and added dropdownMenuProps * Update packages/block-library/src/site-logo/edit.js Treat false as a valid value for isLink instead of defaulting to true. Co-authored-by: Aki Hamano <54422211+t-hamano@users.noreply.github.com> * Update packages/block-library/src/site-logo/edit.js Reset value by updating isLink to its default true. Co-authored-by: Aki Hamano <54422211+t-hamano@users.noreply.github.com> * Migrate Settings panel to ToolsPanel and fix dropdownMenuProps usage --------- Co-authored-by: Aki Hamano <54422211+t-hamano@users.noreply.github.com> Co-authored-by: NidhiDhandhukiya74 <nidhi.dhandhukiya@multidots.com> Unlinked contributors: NidhiDhandhukiya. Co-authored-by: NidhiDhandhukiya74 <nidhidhandhukiya@git.wordpress.org> Co-authored-by: t-hamano <wildworks@git.wordpress.org> Co-authored-by: Mamaduka <mamaduka@git.wordpress.org> Co-authored-by: fabiankaegy <fabiankaegy@git.wordpress.org>
What?
Convert the
"Media""Settings" panel of the Site Logo block to use ToolsPanel instead of PanelBodyPart of :- #67813
Part of :- #67936
Screenshots or screencast
`