diff --git a/.changeset/36002-refresh-display-panel.md b/.changeset/36002-refresh-display-panel.md new file mode 100644 index 00000000000..35479ef0797 --- /dev/null +++ b/.changeset/36002-refresh-display-panel.md @@ -0,0 +1,14 @@ +--- +'@object-ui/plugin-list': patch +'@objectstack/spec': patch +'@objectstack/platform-objects': patch +--- + +fix(plugin-list): Refresh alone no longer draws the Display entry in the default list toolbar + +Clause-②: no +Metadata-protocol: none + +The default (Display) list toolbar has no Refresh button, yet `userActions.refresh` still counted as a reason to draw the toolbar's Display entry. On a non-grid view (kanban, calendar and the rest) whose other Display controls were all off, the entry opened a panel holding only its footer. Refresh no longer counts, so such a view draws no Display entry. The wide toolbar (`compactToolbar: false`) still draws Refresh as before, and `userActions.refresh: false` still takes it off there. + +`@objectstack/spec`: the `userActions.refresh` description now says the toggle governs only the wide toolbar's Refresh button and changes nothing in the default toolbar. The view form's hint for the key says the same, and `@objectstack/platform-objects` ships it as the English help text in the metadata-forms bundle; the other locales keep their existing translations. Only the description text changed: the key, its type and its default are the same. diff --git a/content/docs/references/ui/page.mdx b/content/docs/references/ui/page.mdx index 39bf6a92a18..984a659688d 100644 --- a/content/docs/references/ui/page.mdx +++ b/content/docs/references/ui/page.mdx @@ -180,7 +180,7 @@ An any-of group: `{ or: [rule, ...] }` matches a record when ANY of its rules ma | **sort** | `boolean` | optional (default: `true`) | Allow users to sort records | | **search** | `boolean` | optional (default: `true`) | Allow users to search records | | **filter** | `boolean` | optional (default: `true`) | Allow users to filter records | -| **refresh** | `boolean` | optional (default: `true`) | Allow users to reload the view data from the backend without a full page reload | +| **refresh** | `boolean` | optional (default: `true`) | Allow users to reload the view data from the backend without a full page reload. Governs only the wide toolbar's Refresh button (`compactToolbar: false`): the default toolbar has no Refresh, so the toggle changes nothing there. | | **rowHeight** | `boolean` | optional (default: `true`) | Allow users to toggle row height/density | | **group** | `boolean` | optional (default: `true`) | Allow users to change record grouping from the toolbar. Toggle only — the grouping itself is configured in the view-level `grouping` block. | | **addRecordForm** | `boolean` | optional (default: `false`) | Add records through a form instead of inline | diff --git a/content/docs/references/ui/view.mdx b/content/docs/references/ui/view.mdx index 2e29a9d3816..9779e690ef6 100644 --- a/content/docs/references/ui/view.mdx +++ b/content/docs/references/ui/view.mdx @@ -1096,7 +1096,7 @@ An any-of group: `{ or: [rule, ...] }` matches a record when ANY of its rules ma | **sort** | `boolean` | optional (default: `true`) | Allow users to sort records | | **search** | `boolean` | optional (default: `true`) | Allow users to search records | | **filter** | `boolean` | optional (default: `true`) | Allow users to filter records | -| **refresh** | `boolean` | optional (default: `true`) | Allow users to reload the view data from the backend without a full page reload | +| **refresh** | `boolean` | optional (default: `true`) | Allow users to reload the view data from the backend without a full page reload. Governs only the wide toolbar's Refresh button (`compactToolbar: false`): the default toolbar has no Refresh, so the toggle changes nothing there. | | **rowHeight** | `boolean` | optional (default: `true`) | Allow users to toggle row height/density | | **group** | `boolean` | optional (default: `true`) | Allow users to change record grouping from the toolbar. Toggle only — the grouping itself is configured in the view-level `grouping` block. | | **addRecordForm** | `boolean` | optional (default: `false`) | Add records through a form instead of inline | @@ -1484,7 +1484,7 @@ An any-of group: `{ or: [rule, ...] }` matches a record when ANY of its rules ma | **sort** | `boolean` | optional (default: `true`) | Allow users to sort records | | **search** | `boolean` | optional (default: `true`) | Allow users to search records | | **filter** | `boolean` | optional (default: `true`) | Allow users to filter records | -| **refresh** | `boolean` | optional (default: `true`) | Allow users to reload the view data from the backend without a full page reload | +| **refresh** | `boolean` | optional (default: `true`) | Allow users to reload the view data from the backend without a full page reload. Governs only the wide toolbar's Refresh button (`compactToolbar: false`): the default toolbar has no Refresh, so the toggle changes nothing there. | | **rowHeight** | `boolean` | optional (default: `true`) | Allow users to toggle row height/density | | **group** | `boolean` | optional (default: `true`) | Allow users to change record grouping from the toolbar. Toggle only — the grouping itself is configured in the view-level `grouping` block. | | **addRecordForm** | `boolean` | optional (default: `false`) | Add records through a form instead of inline | @@ -1669,7 +1669,7 @@ User action toggles for the view toolbar | **sort** | `boolean` | optional (default: `true`) | Allow users to sort records | | **search** | `boolean` | optional (default: `true`) | Allow users to search records | | **filter** | `boolean` | optional (default: `true`) | Allow users to filter records | -| **refresh** | `boolean` | optional (default: `true`) | Allow users to reload the view data from the backend without a full page reload | +| **refresh** | `boolean` | optional (default: `true`) | Allow users to reload the view data from the backend without a full page reload. Governs only the wide toolbar's Refresh button (`compactToolbar: false`): the default toolbar has no Refresh, so the toggle changes nothing there. | | **rowHeight** | `boolean` | optional (default: `true`) | Allow users to toggle row height/density | | **group** | `boolean` | optional (default: `true`) | Allow users to change record grouping from the toolbar. Toggle only — the grouping itself is configured in the view-level `grouping` block. | | **addRecordForm** | `boolean` | optional (default: `false`) | Add records through a form instead of inline | diff --git a/packages/platform-objects/src/apps/translations/en.metadata-forms.generated.ts b/packages/platform-objects/src/apps/translations/en.metadata-forms.generated.ts index f63156a3690..6ef3f5d1853 100644 --- a/packages/platform-objects/src/apps/translations/en.metadata-forms.generated.ts +++ b/packages/platform-objects/src/apps/translations/en.metadata-forms.generated.ts @@ -1307,7 +1307,7 @@ export const enMetadataForms: NonNullable = { }, "userActions.refresh": { label: "Refresh", - helpText: "Allow users to reload the view data from the backend without a full page reload" + helpText: "Allow users to reload the view data from the backend without a full page reload. Governs only the wide toolbar's Refresh button (`compactToolbar: false`): the default toolbar has no Refresh, so the toggle changes nothing there." }, "userActions.rowHeight": { label: "Row Height", diff --git a/packages/spec/src/ui/view.form.ts b/packages/spec/src/ui/view.form.ts index dcbf0c197af..12dab335db0 100644 --- a/packages/spec/src/ui/view.form.ts +++ b/packages/spec/src/ui/view.form.ts @@ -247,7 +247,7 @@ export const viewForm = defineForm({ { field: 'sort', helpText: 'Allow users to sort records' }, { field: 'search', helpText: 'Allow users to search records' }, { field: 'filter', helpText: 'Allow users to filter records' }, - { field: 'refresh', helpText: 'Allow users to reload the view data from the backend without a full page reload' }, + { field: 'refresh', helpText: 'Allow users to reload the view data from the backend without a full page reload. Governs only the wide toolbar\'s Refresh button (`compactToolbar: false`): the default toolbar has no Refresh, so the toggle changes nothing there.' }, { field: 'rowHeight', helpText: 'Allow users to toggle row height/density' }, { field: 'group', helpText: 'Allow users to change record grouping from the toolbar. Toggle only — the grouping itself is configured in the view-level `grouping` block.' }, { field: 'addRecordForm', helpText: 'Add records through a form instead of inline' }, diff --git a/packages/spec/src/ui/view.zod.ts b/packages/spec/src/ui/view.zod.ts index faf5646372f..77f7e0bd6aa 100644 --- a/packages/spec/src/ui/view.zod.ts +++ b/packages/spec/src/ui/view.zod.ts @@ -1968,7 +1968,7 @@ export const UserActionsConfigSchema = lazySchema(() => strictObject({ sort: z.boolean().default(true).describe('Allow users to sort records'), search: z.boolean().default(true).describe('Allow users to search records'), filter: z.boolean().default(true).describe('Allow users to filter records'), - refresh: z.boolean().default(true).describe('Allow users to reload the view data from the backend without a full page reload'), + refresh: z.boolean().default(true).describe('Allow users to reload the view data from the backend without a full page reload. Governs only the wide toolbar\'s Refresh button (`compactToolbar: false`): the default toolbar has no Refresh, so the toggle changes nothing there.'), rowHeight: z.boolean().default(true).describe('Allow users to toggle row height/density'), group: z.boolean().default(true).describe('Allow users to change record grouping from the toolbar. Toggle only — the grouping itself is configured in the view-level `grouping` block.'), addRecordForm: z.boolean().default(false).describe('Add records through a form instead of inline'), diff --git a/ui/packages/plugin-list/src/ListView.tsx b/ui/packages/plugin-list/src/ListView.tsx index 3bbffca603b..d73fea0c8c7 100644 --- a/ui/packages/plugin-list/src/ListView.tsx +++ b/ui/packages/plugin-list/src/ListView.tsx @@ -6992,10 +6992,12 @@ export const ListView = React.forwardRef(({ }, [shownRowsKey, shownRowsSettled]); // The Display panel (objectui#12423) is the default form of the toolbar's - // settings cluster, drawn whenever it has a control to offer. + // settings cluster, drawn whenever it has a control to offer. Refresh is not + // one of them: the default toolbar has no Refresh (objectstack#35878), so + // `userActions.refresh` alone never draws the panel (objectstack#36002). const displayOffered = toolbarFlags.compactToolbar && !!( viewSwitcherOffered || toolbarFlags.showGroup || toolbarFlags.showColor || toolbarFlags.showDensity - || toolbarFlags.showHideFields || currentView === 'grid' || toolbarFlags.showRefresh + || toolbarFlags.showHideFields || currentView === 'grid' || (resolvedExportOptions && exportPermitted && exportableFormats.length > 0) ); // The condition controls (objectstack#35549, objectstack#35550): the Filter @@ -7777,9 +7779,9 @@ export const ListView = React.forwardRef(({ {/* Refresh — re-fetch the current view from the backend without a full page reload. Filters / sort / pagination / search all live in component state, - so bumping refreshKey re-queries while preserving the view. In the wide - form a bar button (mobile + desktop); in the Display form it sits in - the panel's footer. */} + so bumping refreshKey re-queries while preserving the view. Wide form + only, a bar button (mobile + desktop): the default (Display) toolbar + has no Refresh, neither on the bar nor in the panel (objectstack#35878). */} {toolbarFlags.showRefresh && !toolbarFlags.compactToolbar && (