Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
cc87232
Create DataPicker component as a sibling to DataViews
talldan Jul 21, 2025
2afca04
Remove DataPicker components
talldan Aug 13, 2025
f0e24d8
Add simple isPicker prop to dataviews, and use it to start configurin…
talldan Aug 13, 2025
d571cdb
Split into separate components
talldan Aug 25, 2025
67b13c2
Limit the type of views that can be provided to DataViews and DataVie…
talldan Aug 26, 2025
7f4f8aa
Switch to isPicker prop in the view layout config for filtering view …
talldan Aug 26, 2025
487d355
Fix type name
talldan Aug 26, 2025
45b1896
Share layout component between picker and regular dataviews
talldan Aug 26, 2025
817587b
Fix story and broken css
talldan Aug 26, 2025
1341b9a
Extract grid styling to a shared component
talldan Aug 26, 2025
23472bf
Switch back to a single View type
talldan Aug 27, 2025
103c689
Fix config type after rebase
talldan Aug 27, 2025
69cf7e2
Use context for `isPicker` rather than a prop to the layout component…
talldan Aug 27, 2025
5e0c8c9
Remove todo from test
talldan Aug 27, 2025
8827304
Allow custom content in footer and use multiselect property of picker…
talldan Aug 27, 2025
70e4390
Adjust footer styling and update story
talldan Aug 27, 2025
c933dfa
Update tests
talldan Aug 27, 2025
6d2dc02
Use actions API
talldan Aug 29, 2025
dc5c179
Make a controlled selection required for DataViewsPicker
talldan Aug 29, 2025
a8b9552
Update docs
talldan Aug 29, 2025
fc34b2e
Add changelog entry
talldan Aug 29, 2025
20dc4ae
Fix BulkSelectionCheckbox
talldan Aug 29, 2025
55f530b
Share the PreviewSizePicker between grid and pickerGrid
talldan Aug 29, 2025
9838725
Undo change to defaultLayouts
talldan Aug 29, 2025
3219ca1
Tidy up main DataViewsPicker component
talldan Aug 29, 2025
2a65f80
Remove extra tab stop on fields caused by tooltip
talldan Sep 1, 2025
274b28b
Remove note about importing DataViews
talldan Sep 1, 2025
403a8fe
Remove picker internal selection state
talldan Sep 1, 2025
568fb63
Align footer buttons to the right
talldan Sep 2, 2025
984ed47
Update action button style. Make non-primary button a tertiary varian…
talldan Sep 2, 2025
b5f8866
Align bulk selection to the left on mobile
talldan Sep 2, 2025
913601e
Remove outdated comment
talldan Sep 2, 2025
ef151d3
Remove change that was reverted in trunk after components diverged (s…
talldan Sep 3, 2025
2f4e5d8
Remove selection property from action type
talldan Sep 3, 2025
eabd7fb
Remove promise return type from ActionButton
talldan Sep 3, 2025
69490be
Remove unused props for picker
talldan Sep 3, 2025
ffd6e09
Limit actions to ActionButton via type
talldan Sep 3, 2025
73d5182
Update wrapper classname
talldan Sep 3, 2025
05f1e00
Filter picker/non-picker layouts in main DataViews components
talldan Sep 3, 2025
e71299b
Move label prop to DataViewsPicker instead of View
talldan Sep 3, 2025
b948c7a
Rename label to itemListLabel
talldan Sep 4, 2025
383bed7
Add missing changes to ViewPickerBaseProps
talldan Sep 4, 2025
9bca0d4
Update label name in docs
talldan Sep 4, 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
Prev Previous commit
Next Next commit
Rename label to itemListLabel
  • Loading branch information
talldan committed Sep 4, 2025
commit b948c7a08739843d92daa96bbc55bc89f2517f7c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ type DataViewsContextType< Item > = {
config: { perPageSizes: number[] };
empty?: ReactNode;
hasInfiniteScrollHandler: boolean;
label?: string;
itemListLabel?: string;
};

const DataViewsContext = createContext< DataViewsContextType< any > >( {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ type DataViewsPickerProps< Item > = {
config?: {
perPageSizes: number[];
};
label?: string;
itemListLabel?: string;
empty?: ReactNode;
} & ( Item extends ItemWithId
? { getItemId?: ( item: Item ) => string }
Expand Down Expand Up @@ -134,7 +134,7 @@ function DataViewsPicker< Item >( {
onChangeSelection,
children,
config = { perPageSizes: [ 10, 20, 50, 100 ] },
label,
itemListLabel,
empty,
}: DataViewsPickerProps< Item > ) {
const { infiniteScrollHandler } = paginationInfo;
Expand Down Expand Up @@ -245,7 +245,7 @@ function DataViewsPicker< Item >( {
isShowingFilter,
setIsShowingFilter,
config,
label,
itemListLabel,
empty,
hasInfiniteScrollHandler: !! infiniteScrollHandler,
} }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ export const Default = ( {
fields={ fields }
onChangeView={ setView }
config={ { perPageSizes } }
label="Galactic Bodies"
itemListLabel="Galactic Bodies"
defaultLayouts={ {
[ LAYOUT_PICKER_GRID ]: {},
} }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ function ViewPickerGrid< Item >( {
className,
empty,
}: ViewPickerGridProps< Item > ) {
const { resizeObserverRef, paginationInfo, label } =
const { resizeObserverRef, paginationInfo, itemListLabel } =
useContext( DataViewsContext );
const titleField = fields.find(
( field ) => field.id === view?.titleField
Expand Down Expand Up @@ -334,7 +334,7 @@ function ViewPickerGrid< Item >( {
'dataviews-view-picker-grid',
className
) }
aria-label={ label }
aria-label={ itemListLabel }
render={ ( { children, ...props } ) => (
<VStack
spacing={ 4 }
Expand Down Expand Up @@ -426,7 +426,7 @@ function ViewPickerGrid< Item >( {
orientation="horizontal"
role="listbox"
aria-multiselectable={ isMultiselect }
aria-label={ label }
aria-label={ itemListLabel }
>
{ data.map( ( item, index ) => {
let posinset = isInfiniteScroll
Expand Down
2 changes: 1 addition & 1 deletion packages/dataviews/src/test/dataviews-picker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ function Picker( {
onChangeView: setView,
multiselect,
selection,
label,
itemListLabel: label,
onChangeSelection: ( newSelection: string[] ) => {
onChangeSelection( newSelection );
setSelection( newSelection );
Expand Down
Loading