Add the page layout filter API
Merged
EH
3d ago+2363+2363+0123456789012345678901234567890123456789-1333-1333-0123456789012345678901234567890123456789
Stacked on #32005. Merge the storage PR first.
What
The layout editor can load saved date filters through PageLayout.filters and save them with tabs and widgets through updatePageLayoutWithTabsAndWidgets.
- Omit
filtersto keep the saved list. Passfilters: []to clear it. - Reads use the layout's existing access policy. Writes require
LAYOUTS. - With the dashboard filters flag off, reads return an empty list and writes that include
filtersare rejected. Saves that omitfiltersstill work.
How
Filter changes run in the same workspace migration as the tab and widget changes. Reads use the layout's cached filter IDs and sort by effective position. Older cache entries without filterIds fall back to matching by layout ID. Creating or deleting a filter invalidates both maps so the next read sees the updated list.
Testing
- Passed targeted tests, including cache invalidation, plus lint and GraphQL schema validation.
- Added metadata integration tests for the date-range round trip, omission and clearing, permissions, the feature flag, and rejection of an invalid default before saving the layout.
- The integration run is pending. Local startup stopped on a missing
@aws-sdk/client-sesdependency.
Widget bindings are the next PR. The rest of the stack is listed in #32005.