-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
PostTaxonomiesFlatTermSelector: Restore space between tag list and most used tags #66566
Conversation
P.S. I'm adding a backport label because this issue first appeared in WP 6.7. |
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 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. |
Size Change: +31 B (0%) Total Size: 1.81 MB
ℹ️ View Unchanged
|
Flaky tests detected in 6d316c9. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/11577192798
|
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.
Thank you for catching!
packages/editor/src/components/post-taxonomies/flat-term-selector.js
Outdated
Show resolved
Hide resolved
…tor.js Co-authored-by: Lena Morita <lena@jaguchi.com>
…st used tags (#66566) * PostTaxonomiesFlatTermSelector: Restore space between tag list and most used tags * Update packages/editor/src/components/post-taxonomies/flat-term-selector.js Co-authored-by: Lena Morita <lena@jaguchi.com> --------- Co-authored-by: t-hamano <wildworks@git.wordpress.org> Co-authored-by: mirka <0mirka00@git.wordpress.org>
I just cherry-picked this PR to the wp/6.7 branch to get it included in the next release: fcee21f |
It looks like a couple of |
@@ -288,8 +292,15 @@ export function FlatTermSelector( { slug, __nextHasNoMarginBottom } ) { | |||
singularName | |||
); | |||
|
|||
const Wrapper = ( { children } ) => |
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.
I think this is creating a new component every time it's re-rendered. It's causing the focus to be lost after adding a new tag. Since this is a regression, let's fix this before RC 3 🙏.
Thanks for the quick fix! |
…st used tags (WordPress#66566) * PostTaxonomiesFlatTermSelector: Restore space between tag list and most used tags * Update packages/editor/src/components/post-taxonomies/flat-term-selector.js Co-authored-by: Lena Morita <lena@jaguchi.com> --------- Co-authored-by: t-hamano <wildworks@git.wordpress.org> Co-authored-by: mirka <0mirka00@git.wordpress.org>
What?
Why?
#63491 resets the bottom margin of the
FormTokenField
component inside thePostTaxonomiesFlatTermSelector
component.PostTaxonomiesFlatTermSelector
needs space between both because most used tags may be rendered below theFormTokenField
.How?
The
PostTaxonomiesFlatTermSelector
component is publicly exposed and there may be developers who have not yet opted into__nextHasMarginBottom
. To prevent double spacing, I restore the previous spacing (12px
) via theVStack
component only if the__nextHasMarginBottom
prop is enabled.Testing Instructions