Skip to content

feat(ui): add Airtable-like view customization schemas#616

Merged
hotlong merged 2 commits into
mainfrom
copilot/evaluate-spec-ui-improvements
Feb 11, 2026
Merged

feat(ui): add Airtable-like view customization schemas#616
hotlong merged 2 commits into
mainfrom
copilot/evaluate-spec-ui-improvements

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 11, 2026

The existing ListViewSchema lacked several primitives needed for Airtable-style view customization — per-view field visibility/ordering, record grouping, row density, column pinning/summaries, gallery/timeline configs, and view sharing semantics.

New schemas

  • RowHeightSchemacompact | short | medium | tall | extra_tall
  • GroupingConfigSchema — Multi-level record grouping with per-level sort order and collapse state
  • GalleryConfigSchema — Cover image field, fit mode, card size, title/visible fields
  • TimelineConfigSchema — Start/end date fields, group-by, color field, time scale
  • ViewSharingSchemapersonal | collaborative ownership with optional lock
  • RowColorConfigSchema — Color rows by field value with explicit color map
  • ColumnSummarySchema — Footer aggregation: count | sum | avg | min | max | count_unique | percent_empty | percent_filled | …

Enhanced existing schemas

  • ListColumnSchema — Added pinned: 'left' | 'right' (frozen columns) and summary (footer aggregation)
  • ListViewSchema — Added description, sharing, rowHeight, grouping, rowColor, hiddenFields, fieldOrder, gallery, timeline

Example

const view: ListView = {
  name: 'project_tracker',
  type: 'grid',
  columns: [
    { field: 'name', pinned: 'left', sortable: true, width: 250 },
    { field: 'status', width: 120, summary: 'count_unique' },
    { field: 'budget', align: 'right', summary: 'sum' },
  ],
  rowHeight: 'medium',
  grouping: {
    fields: [{ field: 'department', order: 'asc' }],
  },
  rowColor: {
    field: 'status',
    colors: { on_track: '#22c55e', at_risk: '#f59e0b', blocked: '#ef4444' },
  },
  hiddenFields: ['internal_id'],
  sharing: { type: 'collaborative', lockedBy: 'admin' },
};

37 new tests added (124 total view tests).


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@vercel
Copy link
Copy Markdown

vercel Bot commented Feb 11, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
objectstack-play Ready Ready Preview, Comment Feb 11, 2026 10:15am
spec Error Error Feb 11, 2026 10:15am

Request Review

Add RowHeight, GroupingConfig, GalleryConfig, TimelineConfig,
ViewSharing, RowColorConfig, ColumnSummary schemas. Add pinned/summary
to ListColumnSchema. Add description, sharing, rowHeight, grouping,
rowColor, hiddenFields, fieldOrder to ListViewSchema.

Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Copilot AI changed the title [WIP] Assess need for improvements in existing spec UI for Airtable-like views feat(ui): add Airtable-like view customization schemas Feb 11, 2026
Copilot AI requested a review from hotlong February 11, 2026 09:34
@hotlong hotlong marked this pull request as ready for review February 11, 2026 09:35
Copilot AI review requested due to automatic review settings February 11, 2026 09:35
@hotlong hotlong merged commit 01cae69 into main Feb 11, 2026
5 of 7 checks passed
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR extends the UI view protocol (packages/spec/src/ui) to support Airtable-like list view customization, adding new Zod schemas for view metadata and per-view presentation controls and updating existing list view/column schemas accordingly.

Changes:

  • Added new schemas for column summaries, row density, grouping, gallery/timeline configs, view sharing, and row coloring.
  • Enhanced ListColumnSchema (pinning + footer summaries) and ListViewSchema (description/sharing + per-view field visibility/order + grouping/rowHeight/rowColor + gallery/timeline configs).
  • Added/extended Vitest coverage for the new/updated schemas.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
packages/spec/src/ui/view.zod.ts Introduces new Airtable-like customization schemas and extends ListViewSchema/ListColumnSchema with new optional configuration fields.
packages/spec/src/ui/view.test.ts Adds tests covering new schemas and the new list view/column configuration options.

* Supports multi-level grouping for grid/gallery views.
*/
export const GroupingConfigSchema = z.object({
fields: z.array(GroupingFieldSchema).min(1).describe('Fields to group by (supports up to 3 levels)'),
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

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

GroupingConfigSchema claims grouping "supports up to 3 levels", but the schema only enforces min(1) and will accept any number of grouping fields. Either enforce the stated limit with a .max(3) (or similar constraint), or update the description to avoid promising a limit that isn’t validated.

Suggested change
fields: z.array(GroupingFieldSchema).min(1).describe('Fields to group by (supports up to 3 levels)'),
fields: z.array(GroupingFieldSchema).min(1).describe('Fields to group by (supports multi-level grouping)'),

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants