Skip to content

Commit

Permalink
PostTaxonomiesFlatTermSelector: Restore space between tag list and mo…
Browse files Browse the repository at this point in the history
…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 <[email protected]>

---------

Co-authored-by: t-hamano <[email protected]>
Co-authored-by: mirka <[email protected]>
  • Loading branch information
3 people authored Oct 29, 2024
1 parent 3a4cc10 commit bcdba59
Showing 1 changed file with 15 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@
* WordPress dependencies
*/
import { __, _x, sprintf } from '@wordpress/i18n';
import { useEffect, useMemo, useState } from '@wordpress/element';
import { FormTokenField, withFilters } from '@wordpress/components';
import { Fragment, useEffect, useMemo, useState } from '@wordpress/element';
import {
FormTokenField,
withFilters,
__experimentalVStack as VStack,
} from '@wordpress/components';
import { useSelect, useDispatch } from '@wordpress/data';
import deprecated from '@wordpress/deprecated';
import { store as coreStore } from '@wordpress/core-data';
Expand Down Expand Up @@ -288,8 +292,15 @@ export function FlatTermSelector( { slug, __nextHasNoMarginBottom } ) {
singularName
);

const Wrapper = ( { children } ) =>
__nextHasNoMarginBottom ? (
<VStack spacing={ 4 }>{ children }</VStack>
) : (
<Fragment>{ children }</Fragment>
);

return (
<>
<Wrapper>
<FormTokenField
__next40pxDefaultSize
value={ values }
Expand All @@ -306,7 +317,7 @@ export function FlatTermSelector( { slug, __nextHasNoMarginBottom } ) {
__nextHasNoMarginBottom={ __nextHasNoMarginBottom }
/>
<MostUsedTerms taxonomy={ taxonomy } onSelect={ appendTerm } />
</>
</Wrapper>
);
}

Expand Down

1 comment on commit bcdba59

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaky tests detected in bcdba59.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/11578267109
📝 Reported issues:

Please sign in to comment.