-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Archives: Make the label above the dropdown editable #57613
Archives: Make the label above the dropdown editable #57613
Conversation
👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @colinduwe! In case you missed it, we'd love to have you join us in our Slack community, where we hold regularly weekly meetings open to anyone to coordinate with each other. If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information. |
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.
Hi @colinduwe
Thank you for working on this enhancement.
The feature works well for me. Code wise, there is only the small coding standard issue with the spacing.
By making the label editable with a TextControl in the settings panel and not as a RichText, we avoid needing to change the disabled
state of the block in the editor.
But we also loose the RichText features like making part of the text bold or use a different color. And we loose some consistency with other blocks that uses the RichText for the label, like the search block.
I am pinging the @WordPress/gutenberg-design team to ask for their feedback.
I will follow this closely because, no matter if we are editing the label in the canvas or in the inspector (the sidebar), I want the archives block and categories block to match.
Related: #56364
The following is not a strong opinion so I can defer to others if need be. Custom prefixes like these felt more appropriate for classic widgets, as there really was no convenient way to give them a title otherwise. In the block editor, in most cases, it's trivial to insert a paragraph or a heading before a particular block. In the case of inserting a heading, it is almost always going to be a better result when inserted manually, since it's important to get the heading level hierarchy right. Separately, however, there have been some discussions around blocks that are more inline in nature, like next/prev buttons, etc, where a prefix or suffix can be more useful to have, rather than have to deal with row blocks. I vaguely recall some conversations around putting such prefixes and suffixes in the "advanced" section? Regardless of where that landed, it would be good to sync up with the result of that, so we don't create a UI that diverges from it. |
The label is required because the select list is a form element. So adding a heading above it is not so helpful. |
…lobal $wp_locale value in wp_default_packages_inline_scripts, which is where the date settings are set for inline JS. This change backports that from Core. (WordPress#58406)
* Widget Editor: Don't disable the Save button * Update conditions
…8346) * Site Editor: Hide export button if non-block-based theme * Add e2e test
Just updating a few typos.
…rview sidebar (WordPress#57082) * implement Tabs * update styles * fix tab flow and placement styles * clean up DOM structure * enable selectOnMove * remove old css becuase i forgot in the last commit * re-disable `selectOnMove` * implement initialTabId value * fix merge conflict errors * incorporate post-rebase feedback * classnames instead of roles * fix horizontal scroll bar * Update packages/editor/src/components/list-view-sidebar/index.js Co-authored-by: Andrew Serong <14988353+andrewserong@users.noreply.github.com> --------- Co-authored-by: Andrew Serong <14988353+andrewserong@users.noreply.github.com>
* Fix fonts modal dialog buttons accessibility. * Reapply change after rebase.
* Fix translatable string in font library modal font card. * Fix translatable string in font library modal local fonts. * Simplify allowed font types string. * Reapply change after rebase.
…ctices (WordPress#58196) * Add context for the All translatable string and enforce l10n best practices. * Fix typo.
…oked_blocks (WordPress#58378) Co-authored-by: Bernie Reiter <96308+ockham@users.noreply.github.com>
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: @gutenbergplugin. Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases. Core SVNCore Committers: Use this line as a base for the props when committing in SVN:
GitHub Merge commitsIf 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. |
Hi @colinduwe. Thank you very much for this PR. It looks like you have quite a few files changed here which maybe due to merging rather than rebasing against You can
Then you can force push the branch to update. |
Yes, I'm not 100% clear what went awry when I rebased to apply this branch atop the current trunk. I'm going to close this and submit a new PR that isn't such a mess. Apologies. |
What?
Adds an editable label attribute to the Archives block that is displayed when "display as a dropdown" is selected.
Why?
#57528
Currently the dropdown is not editable.
How?
This initial commit puts the label textControl in the sidebar which is suboptimal. It should be directly editable.
Testing Instructions
Testing Instructions for Keyboard
Similar to cursor, but confirm that tab controls correctly include the new textControl to set the label. The tab control works correctly when the textControl is removed when the display as dropdown is unchecked.