Feature Request
Description
Add a configurable row spacing (row height) setting to the layout options so users can control table density — from compact (maximum data density) to comfortable (more room for content and image previews). This mirrors the native Directus Tabular layout, which offers the same control.
Current Situation
- Row height is effectively hard-coded:
tableRowHeight returns a fixed 48px for non-image tables (src/super-table.vue), while image tables fall back to auto height.
- Several fixed
min-height rules in the table CSS (e.g. tbody tr, .edit-cell, tbody td .cell) pin the height regardless of content, so even if the row-height prop changed, the CSS would override it.
- The
LayoutOptions interface already declares a spacing?: 'compact' | 'cozy' | 'comfortable' field (src/options.vue), but it is currently an unused stub — there is no UI control and nothing reads it.
Proposed Solution
Wire up the existing spacing option end-to-end, aligned with the native Directus Tabular layout terminology:
spacing: 'compact' | 'cozy' | 'comfortable' // default: 'cozy'
| Option |
Approx. row height |
Use case |
compact |
~36px |
Maximum data density, many rows on screen |
cozy |
~48px |
Balanced default (current behavior) |
comfortable |
~64px |
More breathing room, better for image previews |
Optional / out of scope for a first pass: a custom mode with a user-defined pixel value.
Implementation Notes
- Options UI — add a
v-select ("Row Spacing") to src/options.vue, bound to the existing spacing field in LayoutOptions via a computed get/set, defaulting to cozy.
- Row height — update the
tableRowHeight computed in src/super-table.vue to map the selected spacing value to a pixel height instead of returning a fixed 48. Preserve the existing auto-height behavior for tables that contain image fields.
- CSS — relax the fixed
min-height rules in the table styles (tbody tr, .edit-cell, tbody td .cell) so the chosen row height actually takes effect rather than being overridden. Keep cell content vertically centered at every density.
- Persistence — the value already lives in
layoutOptions, so it is stored per collection / per bookmark automatically once wired up.
Benefits
- Better image previews — taller rows show images more clearly.
- Flexibility — users pick density based on their content type.
- Familiar UX — matches the native Directus Tabular layout spacing control.
- Accessibility — larger rows are easier to scan and interact with.
Acceptance Criteria
Related Issues
Feature Request
Description
Add a configurable row spacing (row height) setting to the layout options so users can control table density — from compact (maximum data density) to comfortable (more room for content and image previews). This mirrors the native Directus Tabular layout, which offers the same control.
Current Situation
tableRowHeightreturns a fixed48pxfor non-image tables (src/super-table.vue), while image tables fall back to auto height.min-heightrules in the table CSS (e.g.tbody tr,.edit-cell,tbody td .cell) pin the height regardless of content, so even if the row-height prop changed, the CSS would override it.LayoutOptionsinterface already declares aspacing?: 'compact' | 'cozy' | 'comfortable'field (src/options.vue), but it is currently an unused stub — there is no UI control and nothing reads it.Proposed Solution
Wire up the existing
spacingoption end-to-end, aligned with the native Directus Tabular layout terminology:compactcozycomfortableImplementation Notes
v-select("Row Spacing") tosrc/options.vue, bound to the existingspacingfield inLayoutOptionsvia a computedget/set, defaulting tocozy.tableRowHeightcomputed insrc/super-table.vueto map the selectedspacingvalue to a pixel height instead of returning a fixed48. Preserve the existing auto-height behavior for tables that contain image fields.min-heightrules in the table styles (tbody tr,.edit-cell,tbody td .cell) so the chosen row height actually takes effect rather than being overridden. Keep cell content vertically centered at every density.layoutOptions, so it is stored per collection / per bookmark automatically once wired up.Benefits
Acceptance Criteria
Related Issues