Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
1bc9be0
Migrate activity layout
oandregal Dec 22, 2025
df8861b
Migrate grid layout
oandregal Dec 22, 2025
dcca7c8
Migrate list layout
oandregal Dec 22, 2025
8d07d5a
Migrate table
oandregal Dec 22, 2025
9798b5e
Migrate picker-grid
oandregal Dec 22, 2025
1651916
Migrate any other usage
oandregal Dec 22, 2025
7972286
Centralize token import in top-level components
oandregal Dec 22, 2025
44bd69c
Remove unused ts directive
oandregal Dec 22, 2025
cc56129
Column headers with icon: align center
oandregal Dec 22, 2025
42be698
Vertically center footer elements
oandregal Dec 22, 2025
039a41a
Fix spacing between search and filter
oandregal Dec 22, 2025
3e98c89
Vertically center footer elements
oandregal Dec 22, 2025
f063e5a
Header icon size
oandregal Dec 22, 2025
23002c5
Fix list actions button position
oandregal Dec 22, 2025
70f9a9f
Vertical positioning of title in list layout
oandregal Dec 22, 2025
100e31a
Revert "Remove unused ts directive"
oandregal Dec 22, 2025
90bef18
Free composition story
oandregal Dec 22, 2025
391dd81
Add changelog
oandregal Dec 22, 2025
892d22e
DataViewsPicker footer
oandregal Dec 22, 2025
479e969
DataViewsPicker images
oandregal Dec 22, 2025
f5ae3ef
DataViewsPicker: search-filter spacing
oandregal Dec 22, 2025
ee6aa87
Spacing in filters
oandregal Dec 23, 2025
e1f23a1
Spacing for picker modal story
oandregal Dec 23, 2025
d726fc4
Vertically center empty text
oandregal Dec 23, 2025
438bb23
Panel button
oandregal Dec 23, 2025
e198e09
Spacing for panel
oandregal Dec 23, 2025
ac5cfcd
Fix modal buttons
oandregal Dec 23, 2025
1c7e1a4
Vertically center the field name in filters
oandregal Dec 23, 2025
c9c4a39
Date control: input controls do not overflow container
oandregal Dec 23, 2025
67d58d8
Fix DataForm validation story
oandregal Dec 23, 2025
5febd7a
Fix inputs for date range
oandregal Dec 23, 2025
938a9f4
Remove HStack/VStack tests
oandregal Dec 23, 2025
8e98561
Fix spacing between lock icon and actions button in patterns
oandregal Dec 23, 2025
3ed085d
Centralize import of design tokens
oandregal Dec 23, 2025
e5af288
Remove unnecessary Spacers
oandregal Dec 23, 2025
eadc2b2
Revert quote changes
oandregal Dec 23, 2025
5561470
Fix spacing in properties
oandregal Dec 23, 2025
00883a9
Make regular side equals to panel side
oandregal Dec 23, 2025
c868b79
Add minimum gap to stack in footers
oandregal Dec 23, 2025
d568aed
Add missing gap
oandregal Dec 23, 2025
f3ea0be
Add missing gap in Panel dropdown header
oandregal Dec 23, 2025
6495b51
Add gaps to fixtures
oandregal Dec 23, 2025
eb8d744
Add gap to dataviews story
oandregal Dec 23, 2025
284aecf
Add missing gap to field types story
oandregal Dec 23, 2025
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
2 changes: 2 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/dataviews/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

### Code Quality

- Replace HStack/VStack from `wordpress/components` by Stack from `wordpress/ui`. [#74174](https://github.com/WordPress/gutenberg/pull/74174)
- DataViews: Remove extra wrapper for GridItem. [#73665](https://github.com/WordPress/gutenberg/pull/73665)
- Field API: move validation to the field type. [#73642](https://github.com/WordPress/gutenberg/pull/73642)
- Field API: move format logic to the field type. [#73922](https://github.com/WordPress/gutenberg/pull/73922)
Expand Down
8 changes: 4 additions & 4 deletions packages/dataviews/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1071,14 +1071,14 @@ Component to render UI in a modal for the action.
return (
<form onSubmit={ onSubmit }>
<p>Modal UI</p>
<HStack>
<Stack direction="row">
<Button variant="tertiary" onClick={ closeModal }>
Cancel
</Button>
<Button variant="primary" type="submit">
Submit
</Button>
</HStack>
</Stack>
</form>
);
};
Expand Down Expand Up @@ -1202,10 +1202,10 @@ Example:
id: 'title',
type: 'text',
header: (
<HStack spacing={ 1 } justify="start">
<Stack direction="row" gap="2xs" justify="start">
<Icon icon={ icon } />
<span>Title</span>
</HStack>
</Stack>
),
}
```
Expand Down
2 changes: 2 additions & 0 deletions packages/dataviews/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@
"@wordpress/keycodes": "file:../keycodes",
"@wordpress/primitives": "file:../primitives",
"@wordpress/private-apis": "file:../private-apis",
"@wordpress/theme": "file:../theme",
"@wordpress/ui": "file:../ui",
"@wordpress/url": "file:../url",
"@wordpress/warning": "file:../warning",
"clsx": "^2.1.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,13 @@ import type { ReactElement } from 'react';
/**
* WordPress dependencies
*/
import {
Button,
CheckboxControl,
__experimentalHStack as HStack,
} from '@wordpress/components';
import { Button, CheckboxControl } from '@wordpress/components';
import { __, sprintf, _n } from '@wordpress/i18n';
import { useMemo, useState, useRef, useContext } from '@wordpress/element';
import { useRegistry } from '@wordpress/data';
import { closeSmall } from '@wordpress/icons';
import { useViewportMatch } from '@wordpress/compose';
import { Stack } from '@wordpress/ui';

/**
* Internal dependencies
Expand Down Expand Up @@ -263,10 +260,11 @@ function renderFooterContent< Item >(
data.length
);
return (
<HStack
expanded={ false }
<Stack
direction="row"
className="dataviews-bulk-actions-footer__container"
spacing={ 3 }
gap="sm"
align="center"
>
<BulkSelectionCheckbox
selection={ selection }
Expand All @@ -278,10 +276,10 @@ function renderFooterContent< Item >(
<span className="dataviews-bulk-actions-footer__item-count">
{ message }
</span>
<HStack
<Stack
direction="row"
className="dataviews-bulk-actions-footer__action-buttons"
expanded={ false }
spacing={ 1 }
gap="2xs"
>
{ actionsToShow.map( ( action ) => {
return (
Expand All @@ -308,8 +306,8 @@ function renderFooterContent< Item >(
} }
/>
) }
</HStack>
</HStack>
</Stack>
</Stack>
);
}

Expand Down
15 changes: 8 additions & 7 deletions packages/dataviews/src/components/dataviews-filters/filter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ import type { RefObject } from 'react';
*/
import {
Dropdown,
__experimentalVStack as VStack,
__experimentalHStack as HStack,
FlexItem,
SelectControl,
Tooltip,
Expand All @@ -19,6 +17,7 @@ import {
import { __, sprintf } from '@wordpress/i18n';
import { useMemo, useRef } from '@wordpress/element';
import { closeSmall } from '@wordpress/icons';
import { Stack } from '@wordpress/ui';

/**
* Internal dependencies
Expand Down Expand Up @@ -93,10 +92,12 @@ function OperatorSelector( {
const value = currentFilter?.operator || filter.operators[ 0 ];
return (
operatorOptions.length > 1 && (
<HStack
spacing={ 2 }
<Stack
direction="row"
gap="xs"
justify="flex-start"
className="dataviews-filters__summary-operators-container"
align="center"
>
<FlexItem className="dataviews-filters__summary-operators-filter-name">
{ filter.name }
Expand Down Expand Up @@ -164,7 +165,7 @@ function OperatorSelector( {
variant="minimal"
hideLabelFromVision
/>
</HStack>
</Stack>
)
);
}
Expand Down Expand Up @@ -348,7 +349,7 @@ export default function Filter( {
) }
renderContent={ () => {
return (
<VStack spacing={ 0 } justify="flex-start">
<Stack direction="column" justify="flex-start">
<OperatorSelector { ...commonProps } />
{ commonProps.filter.hasElements ? (
<SearchWidget
Expand All @@ -361,7 +362,7 @@ export default function Filter( {
) : (
<InputWidget { ...commonProps } fields={ fields } />
) }
</VStack>
</Stack>
);
} }
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* WordPress dependencies
*/
import { memo, useContext, useRef } from '@wordpress/element';
import { __experimentalHStack as HStack } from '@wordpress/components';
import { Stack } from '@wordpress/ui';

/**
* Internal dependencies
Expand Down Expand Up @@ -59,14 +59,16 @@ function Filters( { className }: { className?: string } ) {
);

return (
<HStack
<Stack
direction="row"
justify="flex-start"
gap="xs"
style={ { width: 'fit-content' } }
wrap
wrap="wrap"
className={ className }
>
{ filterComponents }
</HStack>
</Stack>
);
}

Expand Down
10 changes: 6 additions & 4 deletions packages/dataviews/src/components/dataviews-footer/index.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/**
* WordPress dependencies
*/
import { __experimentalHStack as HStack } from '@wordpress/components';
import { useContext } from '@wordpress/element';
import { Stack } from '@wordpress/ui';

/**
* Internal dependencies
Expand Down Expand Up @@ -37,14 +37,16 @@ export default function DataViewsFooter() {
}
return (
!! totalItems && (
<HStack
expanded={ false }
<Stack
direction="row"
justify="end"
align="center"

@ntsekouras ntsekouras Dec 23, 2025 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why we need this? I saw some other similar additions below, so the question applies to those too 😄

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Because the previous HStack/VStack did too much and Stack doesn't :)

className="dataviews-footer"
gap="xs"
>
{ hasBulkActions && <BulkActionsFooter /> }
<DataViewsPagination />
</HStack>
</Stack>
)
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ import type { MouseEventHandler } from 'react';
import {
Button,
Modal,
__experimentalHStack as HStack,
privateApis as componentsPrivateApis,
} from '@wordpress/components';
import { __ } from '@wordpress/i18n';
import { useMemo, useState } from '@wordpress/element';
import { moreVertical } from '@wordpress/icons';
import { useRegistry } from '@wordpress/data';
import { useViewportMatch } from '@wordpress/compose';
import { Stack } from '@wordpress/ui';

/**
* Internal dependencies
Expand Down Expand Up @@ -212,8 +212,8 @@ export default function ItemActions< Item >( {
}

return (
<HStack
spacing={ 0 }
<Stack
direction="row"
justify="flex-end"
className="dataviews-item-actions"
style={ {
Expand All @@ -233,7 +233,7 @@ export default function ItemActions< Item >( {
registry={ registry }
/>
) }
</HStack>
</Stack>
);
}

Expand Down
29 changes: 14 additions & 15 deletions packages/dataviews/src/components/dataviews-pagination/index.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
/**
* WordPress dependencies
*/
import {
Button,
__experimentalHStack as HStack,
SelectControl,
} from '@wordpress/components';
import { Button, SelectControl } from '@wordpress/components';
import { createInterpolateElement, memo, useContext } from '@wordpress/element';
import { sprintf, __, _x, isRTL } from '@wordpress/i18n';
import { next, previous } from '@wordpress/icons';
import { Stack } from '@wordpress/ui';

/**
* Internal dependencies
Expand Down Expand Up @@ -49,16 +46,18 @@ export function DataViewsPagination() {
return (
!! totalItems &&
totalPages !== 1 && (
<HStack
expanded={ false }
<Stack
direction="row"
className="dataviews-pagination"
justify="end"
spacing={ 6 }
align="center"
gap="lg"
>
<HStack
<Stack
direction="row"
justify="flex-start"
expanded={ false }
spacing={ 1 }
align="center"
gap="2xs"
className="dataviews-pagination__page-select"
>
{ createInterpolateElement(
Expand Down Expand Up @@ -90,8 +89,8 @@ export function DataViewsPagination() {
),
}
) }
</HStack>
<HStack expanded={ false } spacing={ 1 }>
</Stack>
<Stack direction="row" gap="2xs" align="center">
<Button
onClick={ () =>
onChangeView( {
Expand Down Expand Up @@ -119,8 +118,8 @@ export function DataViewsPagination() {
size="compact"
tooltipPosition="top"
/>
</HStack>
</HStack>
</Stack>
</Stack>
)
);
}
Expand Down
Loading