fix: align label and value in ingested-data grids#1462
Conversation
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 11 minutes and 38 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Pascal-Delange
left a comment
There was a problem hiding this comment.
the change in the diff is not consistent with the PR desc ?
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Remove min-h-8 and reduce vertical padding so the pill's natural height matches its sibling label's text line-box, aligning text baselines in the field grid (items-start). Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Revert CopyToClipboardButton/Chip class tweaks and vertically center the DataField label inside its row via self-center, so pill and label align without changing the pill's design. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Use items-center on the grid instead of items-start so both cells (label and value) vertically center — fixing pill-vs-label alignment. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Apply the same items-center fix to CaseDetailTriggerObject (case manager decision panel), DataListGrid (screening request detail), and ScreeningQueryDetail so pill values align with their labels, matching the DataField fix. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
items-center breaks when the value is taller than one line — the label ends up in the middle of the cell instead of next to the first line. Switch to items-baseline so the label always aligns with the first text baseline of the value, whether the value is a pill, plain text, or a pill followed by a map/sub-grid. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Render 2-column / 3-column layouts as side-by-side flex grids instead of one shared grid, so an expanding cell in one column no longer stretches its sibling in the same row. Dropping auto-rows-[minmax(2rem,auto)] + items-stretch also lets rows fit their content, so items-baseline lines up labels and values cleanly for both text and pill values. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Apply items-center to the DataField subgrid, CaseDetailTriggerObject, DataListGrid, and ScreeningQueryDetail layouts so the label is vertically centered with its value (pill or text). Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
0f30f09 to
9fdb8fd
Compare
Customer hub uses layout=2-columns. Before, left and right shared grid rows, so expanding a right-hand cell (e.g. the related-ingested-data box under a foreign key) stretched the matching left-hand row with a gap of blank space. Split the fields into one grid per column so the two halves are independent; gap-y-2 keeps vertical spacing consistent inside each column regardless of what the other column does. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
…grids" This reverts commit ca343c7.
Customer hub uses layout=2-columns. Before, left and right shared grid rows, so expanding a right-hand cell (e.g. the related-ingested-data box under a foreign key) stretched the matching left-hand row with a gap of blank space. Split the fields into one grid per column so the two halves are independent; gap-y-2 keeps vertical spacing consistent inside each column regardless of what the other column does. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
|
@ChibiBlasphem Can be interesting to have your opinion on this. |
| return ( | ||
| <DataFieldProvider value={contextValue}> | ||
| <div className="col-span-2 grid grid-cols-subgrid items-start"> | ||
| <div className="col-span-2 grid grid-cols-subgrid items-center"> |
There was a problem hiding this comment.
I’m not sure if vertically aligning is better than starting the alignment.
It’s usually better to have labels aligned at the top, especially when the content is tall.
Perhaps we should consult Maud about a design perspective.
| <div className="col-span-2 grid grid-cols-subgrid items-start"> | ||
| <div className="col-span-2 grid grid-cols-subgrid items-center"> | ||
| <label htmlFor={field?.id} className="text-grey-secondary"> | ||
| {field?.name} |
There was a problem hiding this comment.
if there are issues with very long labels, you can add a truncate class




Summary
items-center) — no component-behavior changes.Affected layouts
DataField— the canonical label/value row used across Customer hub, Case manager → screening object details, Ingested object modal, Table record preview drawer, Pivot details, Decision trigger-object panel.CaseDetailTriggerObject— Case manager decision drawer, trigger-object grid.DataListGrid— shared grid used in the screening request detail panel.QueryObjectDetailinsideScreeningQueryDetail— screening query tab in the Case manager.Note on history
The branch contains a few experimental commits explored during review (baseline alignment, column-split restructure) that were reverted. The last commit (
center label and value in ingested-data grids) represents the final shipped diff; squash-merging is recommended.Test plan
🤖 Generated with Claude Code