Skip to content
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

ToolsPanel: Tighten grid gaps #43424

Merged
merged 3 commits into from
Aug 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/components/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
### Enhancements

- `CustomGradientPicker`, `GradientPicker`: Add `__nextHasNoMargin` prop for opting into the new margin-free styles ([#43387](https://github.com/WordPress/gutenberg/pull/43387)).
- `ToolsPanel`: Tighten grid gaps ([#43424](https://github.com/WordPress/gutenberg/pull/43424)).
- `ToggleGroupControl`: Improve TypeScript documentation ([#43265](https://github.com/WordPress/gutenberg/pull/43265)).
- `ComboboxControl`: Normalize hyphen-like characters to an ASCII hyphen ([#42942](https://github.com/WordPress/gutenberg/pull/42942)).
- `FormTokenField`: Refactor away from `_.difference()` ([#43224](https://github.com/WordPress/gutenberg/pull/43224/)).
Expand Down
4 changes: 2 additions & 2 deletions packages/components/src/tools-panel/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ const toolsPanelGrid = {
grid-template-columns: ${ `repeat( ${ columns }, minmax(0, 1fr) )` };
`,
spacing: css`
column-gap: ${ space( 4 ) };
row-gap: ${ space( 6 ) };
column-gap: ${ space( 2 ) };
row-gap: ${ space( 4 ) };
`,
item: {
fullWidth: css`
Expand Down
210 changes: 0 additions & 210 deletions packages/components/src/tools-panel/test/__snapshots__/index.js.snap

This file was deleted.

5 changes: 3 additions & 2 deletions packages/components/src/tools-panel/test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1069,7 +1069,7 @@ describe( 'ToolsPanel', () => {

describe( 'first and last panel items', () => {
it( 'should apply first/last classes to appropriate items', () => {
const { container } = render(
render(
<SlotFillProvider>
<ToolsPanelItems>
<ToolsPanelItem { ...altControlProps }>
Expand Down Expand Up @@ -1113,7 +1113,8 @@ describe( 'ToolsPanel', () => {
expect( item3 ).toBeInTheDocument();
expect( screen.queryByText( 'Item 4' ) ).not.toBeInTheDocument();

expect( container ).toMatchSnapshot();
expect( item2.parentElement ).toHaveClass( 'first' );
expect( item3.parentElement ).toHaveClass( 'last' );
} );
} );
} );
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ export default function TypographyPanel( { name, element } ) {
>
Aa
</div>
<Grid columns={ 2 }>
<Grid columns={ 2 } rowGap={ 16 } columnGap={ 8 }>
{ element === 'heading' && (
<div className="edit-site-typography-panel__full-width-control">
<ToggleGroupControl
Expand Down