Skip to content

[2.1] Fixes #38473: Remove the column cap on table custom properties; show 3 columns with horizontal scroll (backport 2.1 #38490) - #38546

Merged
Rohit0301 merged 1 commit into
2.1from
Rohit0301/backport-2.1-38490
Nov 24, 2026
Merged

Rohit0301 merged 1 commit into
2.1from
Rohit0301/backport-2.1-38490

Conversation

@Rohit0301

Copy link
Copy Markdown
Contributor

Backport of #38490 to 2.1 (cherry-pick of squash commit 3f70f7c, applied cleanly; no conflicts).

Verified on this branch: core vitest 37/37 (scroll-shadow, table, tabs), UI Jest 1,764/1,764 (custom property table, schema table, profile), core build OK. tsc reports 33 pre-existing errors on 2.1 in SSOUtils.test.ts and OMSelectWidget.tsx, neither touched here.


Describe your changes:

Fixes #38473

Table-type custom properties no longer have a column cap. Wherever a table value appears, columns keep a readable width (a third of the host, at most 12rem) and the rest scroll horizontally behind an edge shadow, in both classic and AI mode.

The 3-column cap lived in three places, and all three are removed:

  • tableConfig.json — columns.maxItems: 3 and the maxColumns default. The maxColumns field stays, unenforced, so previously stored configs still validate.
  • complexTypes.json → table-cp.columns — maxItems: 3 on the value schema. Without this, a 10-column property could be defined but no value could be saved.
  • TypeRepository.validateTableTypeConfig and the create form (CustomPropertyFormFields), shared by classic Settings and the AI-mode Custom Properties page.

Type of change:

  • Improvement

High-level design:

  • One renderer. Every surface that draws a table value goes through TablePropertyValue.tsx (View + Edit): the entity Custom Properties card, the edit modal, the right-panel widget's edit modal, the schema-tab column cell, the AI-mode profile row and its inline editor, and the CSV bulk-edit modal. The sizing is fixed there once.
  • Column width. The core Table already scrolls (TableRoot is overflow-x-auto), but it is w-full and has no column-width API, so columns used to squeeze to fit and never overflowed. Each column is now min(100cqw/3, 12rem) of a tw:@container wrapper, and the table is w-max min-w-full. Hosts narrower than about 36rem (the 230px schema cell) show three columns; wider hosts show more at 12rem each (about four in the 960px modal, five or six on full-width cards). The 12rem cap is a design request: a third of a wide card left mostly-empty columns. Tables that fit still fill the width. The editor's delete-row column is pinned to the right.
  • Scroll cue. Whichever edge hides columns gets a shadow, the same treatment as the Explore page's card Tabs. The tabs' useOverflowEdges hook moved into ui-core-components/src/hooks and is exported, rather than being copied. In the editor, the end shadow sits left of the pinned delete column.
  • Hosts need a definite width. Inline-size containment means a host that sizes to its content collapses the table to zero width. Two such hosts are fixed:
    • CustomPropertyRow (AI-mode profile): wide-type values now render full-width below the header, in the same slot the inline editor already used.
    • ColumnCustomPropertyCell: the value wrapper is w-full.
  • No migration. On startup the server re-seeds field types from the JSON schemas, so existing deployments pick up the relaxed table-cp schema.
  • Rejected alternatives:
    • A fixed min-w-40 per column: the number of visible columns would vary with the host (1 in the schema cell, 6 in the modal).
    • A column-width prop on the core Table: this is its only caller.
    • Switching the editor to the core Table: react-aria grid keyboard navigation conflicts with the Inputs in the cells.
  • Decision record: docs/decisions/2026-11-23-table-custom-properties-have-no-column-cap.md.

Tests:

Use cases covered

  • An admin creates a table custom property with 10 columns (previously rejected with "must be between 1 and 3").
  • A 10-column value is saved on an entity and read back intact.
  • A 10-column table scrolls horizontally, with edge shadows, in the card, the edit modal, the AI-mode profile row and its inline editor. Columns are 192px, and three are visible in the 230px schema cell.
  • The editor saves all 10 columns.
  • A table property with 0 columns is still rejected.

Unit tests

  • TablePropertyValue.test.tsx: renders all 10 headers and cells; editing column 10 saves all 10 columns.
  • CustomPropertyRow.test.tsx: a table value renders full-width below the header. This fails without the fix.
  • Jest across CustomPropertyTable/**, SchemaTable/**, Profile/customProperties/** and Profile/tabs/custom-properties/**: 283 passed, 0 failed. Earlier runs across discovery/personal-space/Profile + CustomPropertyTable passed 1,720 / 1,720.
  • Coverage % was not measured.

Backend integration tests

  • TypeResourceIT:
    • test_tableCustomPropertyStoresValueWithTenColumns defines a 10-column property, saves a 10-column value on a domain and reads it back equal. It fails on main, on both the config cap and the value-schema cap.
    • test_addTableCustomPropertyWithoutColumns_fails asserts InvalidRequestException and the new "must have at least 1 column(s)" message.

Local Java test run on 2.1: PASSED — TypeResourceIT (mysql-elasticsearch · parallel): 48 run, 0 failed, 1 skipped, including test_tableCustomPropertyStoresValueWithTenColumns and test_addTableCustomPropertyWithoutColumns_fails. Only the class covering this change was run: the planner diffs against main, so on a 2.1 branch it selects the whole 2.1↔main difference.

Ingestion integration tests

  • Not applicable (no ingestion changes). dbt's validate_table_structure compares against the configured columns, not a fixed 3.

Playwright (UI) tests

  • Not run locally. The existing table-CP specs (CustomProperties.spec.ts, CustomPropertiesApiContract.spec.ts) use 2-column configs and are unaffected; the merge queue runs them.
  • I removed the visual scenario custom-property-config-table-column-limit and its two baselines, because it waited for the "Maximum 3 Columns are allowed" error, which no longer exists.

Manual testing performed

  1. Ran this branch's UI (DEV_SERVER_TARGET=http://localhost:8595 npx vite) against a local server, logged in as admin.
  2. Created a wideTableDemo table property (10 columns) on the table, tableColumn and user types, then set a 2-row value on the admin user.
  3. Classic /users/admin/custom_properties: 10 headers, 3 fully visible, scroll width 3313 px vs. 994 px visible.
  4. AI mode /#profile:
    • Row view: 3 of 10 columns visible (scroll width 3880 px vs. 1164 px). Before the CustomPropertyRow fix it rendered at 0 px wide.
    • Inline editor: 3 columns plus the pinned delete column, scrolls. (These measurements predate the 12rem cap; see the screenshots for the current state.)

UI screen recording:

Classic mode — user page → Custom Properties card, scrolled to column 10 and back:

classic.webm

AI mode — Profile → Custom properties row view, then the inline table editor, both scrolled across 10 columns:

ai.webm

Screenshots after the edge-shadow + column-width change (1bb08a4; the videos above predate it). Each is taken mid-scroll, so both edge shadows show. Columns are now 192px each.

Classic mode: user page card

Classic mode: edit modal (the end shadow sits left of the pinned delete column)

AI mode: profile row, at rest (end shadow only)

AI mode: profile inline editor

Evidence and remaining work (why this is a draft):

  • These videos come from this branch's UI (Vite) against a local server running an older Collate build, not a Docker build of this branch.
  • That server returns 500 on table entity pages (fields=joins,usageSummary → UsageDAO$UsageDetailsWithId not present, a stale classpath), so these surfaces are not recorded yet: the table Custom Properties tab and edit modal, the schema-tab column cell, and the right-panel widget.
  • The server still had the old value-schema cap, so each stored value lists 3 column names while its rows hold all 10. The UI renders headers from the property config, so the recordings show all 10 columns.
  • Remaining: re-record every surface on a Docker build of this branch, then mark ready.

Checklist:

  • I have read the CONTRIBUTING document.
  • My PR title is Fixes <issue-number>: <short explanation>
  • My PR is linked to a GitHub issue via Fixes #<issue-number> above.
  • I have commented on my code, particularly in hard-to-understand areas.
  • For JSON Schema changes: I updated the migration scripts or explained why it is not needed. (No migration needed: field types are re-seeded from the schema at startup, and existing configs stay valid.)
  • For a UI feature or feature task: as part of PR creation, I ran the PR build in Docker with sample data and embedded a verified GitHub-hosted recording plus build/health evidence above (or explained why this requirement is not applicable). (Partial: see the remaining work above.)
  • I have added tests (unit / integration / Playwright as applicable) and listed them above.
  • Self-review: I reviewed the final diff against REVIEW.md (the pr-checklist skill runs it) and fixed every 🔴 finding, or answered it on the line below.
    • Reviewed 53706eb. All three 🔴 were fixed in ad7e0f6: the schema-cell zero-width collapse, the stale visual scenario, and the IT that asserted Exception.class. One 🟡 is open: message.maximum-count-allowed is now unused in OSS and is left in place for Collate consumers.
  • Decision check: docs/decisions/2026-11-23-table-custom-properties-have-no-column-cap.md.

🤖 Generated with Claude Code

…3 columns with horizontal scroll (#38490)

* Fixes #38473: remove the column cap on table custom properties

Table-type custom properties no longer cap columns at three (both schemas, the
backend check and the create form). Every surface that renders the value shows
three columns and scrolls horizontally for the rest; wide values in the AI-mode
profile row take a full-width slot so the scroll container has a width.

* Address self-review: column cell width, stale visual scenario, IT assertion

- Schema-tab column cell gives the table value a definite width so the
  container-query layout does not collapse.
- Drop the visual scenario and baselines that waited for the removed
  3-column error.
- Assert the min-columns rejection type and message; cover the full-width
  table slot in CustomPropertyRow.

* Address Greptile: give the table view a definite width; bound editor columns

- The view root is w-full, so a flex host (schema-tab column cell) no
  longer shrinks the container-query table to its borders.
- Editor columns get the same max width as the view and wrap long headers,
  so a long column name cannot push the visible count below three.

* Table custom property: edge scroll shadows and narrower columns

- Export the card Tabs' useOverflowEdges hook from ui-core-components and
  reuse it to shadow whichever table edge hides columns, matching the
  Explore tabs. In the editor the end shadow sits left of the pinned delete
  column.
- Cap each column at 12rem (still a third of narrow hosts).

* Decision record: columns are a third of the host capped at 12rem; edge shadows

* Table custom property: one column width class (min-w + max-w)

Measured in Chromium and WebKit: on table cells width behaves like min-width,
so w was redundant; min-w stops columns squeezing, max-w stops long values
widening them. The editor's 2.5rem offset only mattered below ~616px, which
no editor host reaches, so view and editor share one class.

* Table.Head: opt-in wrapLabel so long headers wrap in capped columns

The header label is whitespace-nowrap, so a long column name in a
width-capped column spilled into the next header. wrapLabel wraps it
(wrap-anywhere, left-aligned) and lets its flex wrappers shrink; the table
custom property view opts in. Other tables keep single-line headers.

* Move table scroll shadows into ui-core-components

- ScrollShadow: scrolls content horizontally and shadows whichever edge
  hides it (endShadowClassName insets the end shadow before a pinned
  column). Shares useOverflowEdges with the card Tabs.
- Table gets an opt-in scrollShadows prop that renders its scroll
  container through ScrollShadow; other tables are unchanged.
- The table custom property view uses <Table scrollShadows> and the editor
  wraps its <table> in ScrollShadow; the local frame component is gone.

* Table story: WithScrollShadows (scrollShadows + wrapLabel)
@Rohit0301
Rohit0301 requested review from a team as code owners November 24, 2026 05:59
@Rohit0301
Rohit0301 requested review from harshach and removed request for a team November 24, 2026 05:59
@github-actions

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

This PR cannot be merged until the following are addressed on its linked issue:

  • No GitHub issue is linked. Link an issue in the Development section of the PR (or add Fixes #12345 to the description). For a same-org cross-repo issue, add Fixes open-metadata/<repo>#123 to the description.

The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically.

Maintainers can bypass this check by adding the skip-pr-checks label.

@gitar-bot

gitar-bot Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Code Review ✅ Approved 🟡 Medium risk

Relaxing schema and backend limits lets table custom properties store more columns, changing accepted persisted values and rendering behavior across entity surfaces.

Removes the 3-column cap on table-type custom properties across the config schema, value schema, backend validation, and create form, so tables can hold any number of columns. Columns now size to a third of the host (at most 12rem) and scroll horizontally with edge shadows. No issues found.

Verification

Rules No rules evaluated

Functional validation Not enabled

Set up

Auto-approval Not enabled

Set up

For more verification details, comment gitar display:verbose.

Options

Display: compact → Showing compact verification results.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

@Rohit0301
Rohit0301 merged commit bcb891c into 2.1 Nov 24, 2026
52 of 54 checks passed
@Rohit0301
Rohit0301 deleted the Rohit0301/backport-2.1-38490 branch November 24, 2026 06:51
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