mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-17 23:52:24 +00:00
fix(labs): keep the trend column as wide as its sparkline on a wide list
The wide tier let the trend column grow to 8rem while the sparkline it holds is a fixed 72px glyph, so at 1920 px an empty 56 px strip opened between the sparkline and the chevron. The column now stays 72px in both tiers; the extra width goes to the range bar and the name, as before. The wide-list spec reads the resolved grid tracks and asserts the trend track is 72px at every width it covers.
This commit is contained in:
1 parent
0ae50849d8
commit
29798a76e3
3 files changed
+24
-5
No files matched your search
@@ -111,7 +111,7 @@ describe("<LabList> columns", () => {
|
||||
const NARROW_TIER =
|
||||
"lg:@max-5xl:grid-cols-[minmax(0,1fr)_max-content_12rem_72px_auto]";
|
||||
const WIDE_TIER =
|
||||
"@5xl:grid-cols-[minmax(0,1fr)_max-content_minmax(12rem,18rem)_minmax(72px,8rem)_auto]";
|
||||
"@5xl:grid-cols-[minmax(0,1fr)_max-content_minmax(12rem,18rem)_72px_auto]";
|
||||
|
||||
it("makes the card a container, so the columns follow the list's width, not the window's", () => {
|
||||
const html = renderList([reading({})]);
|
||||
@@ -127,6 +127,11 @@ describe("<LabList> columns", () => {
|
||||
expect(WIDE_TIER.split("_")).toHaveLength(5);
|
||||
});
|
||||
|
||||
it("keeps the trend column as wide as its 72px sparkline in both tiers", () => {
|
||||
expect(NARROW_TIER.split("_")[3]).toBe("72px");
|
||||
expect(WIDE_TIER.split("_")[3]).toBe("72px");
|
||||
});
|
||||
|
||||
it("keeps the name column the flexible one in both tiers", () => {
|
||||
expect(NARROW_TIER).toContain("[minmax(0,1fr)_");
|
||||
expect(WIDE_TIER).toContain("[minmax(0,1fr)_");
|
||||
|
||||
Reference in new issue
Block a user