Skip to content

Commit 6c2626f

Browse files
committed
Pin Tool Vote fullscreen header and footer - PR_26160_067-admin-tool-vote-template-conversion
1 parent 03d75f7 commit 6c2626f

3 files changed

Lines changed: 29 additions & 1 deletion

File tree

assets/theme-v2/css/layout.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,13 @@ body.tool-focus-mode .tool-workspace--table-scroll-focus .tool-table-scroll-regi
363363
overscroll-behavior: contain
364364
}
365365

366+
body.tool-focus-mode .tool-workspace--table-scroll-focus .tool-table-scroll-region .data-table thead th {
367+
background: var(--card-background);
368+
position: sticky;
369+
top: var(--space-0);
370+
z-index: var(--z-index-sm)
371+
}
372+
366373
.account-panel {
367374
display: grid;
368375
grid-template-columns: var(--admin-panel-columns);

docs_build/dev/reports/admin-tool-vote-template-conversion-report.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
| Fullscreen keeps header visible and fixed at top. | Reusable `tool-workspace--fullscreen-chrome` rules in `assets/theme-v2/css/layout.css`; Playwright asserts `header.site-header` is visible, `position: fixed`, and top-aligned at `0`. | PASS |
1616
| Fullscreen keeps footer visible and fixed at bottom. | Playwright asserts `footer.footer` is visible, `position: fixed`, bottom-aligned inside the viewport, and has its own `overflow-y:auto` when content needs a footer scrollbar. | PASS |
1717
| Fullscreen does not scroll the entire page. | Playwright asserts `document.body` keeps `overflow-y:hidden` and page scroll position does not change during table scroll testing. | PASS |
18+
| Table sort buttons remain visible at the top inside `thead`. | `assets/theme-v2/css/layout.css` pins fullscreen Tool Vote `thead th` cells with sticky positioning; Playwright verifies the Tool sort button text remains visible after vertical table scrolling. | PASS |
19+
| `thead` remains pinned while data rows scroll. | Playwright verifies the Tool sort header cell reports `position: sticky`, stays inside the table scroll region, and remains above scrolled `tbody` rows after the table region scrolls to the bottom. | PASS |
1820
| In fullscreen, only the data/table area should scroll vertically. | Reusable `tool-workspace--table-scroll-focus` plus `tool-table-scroll-region`; Playwright injects additional table rows, scrolls the table region, and verifies side/center panels remain hidden overflow. | PASS |
1921
| Preserve horizontal scrolling for wide Tool Vote tables. | Playwright verifies the table wrapper is horizontally scrollable and `scrollLeft` moves for the wide table. | PASS |
2022
| Verify Tool Vote table remains usable with large tool counts. | Playwright clones 90 extra rows in the test DOM, verifies vertical scrolling is owned by `data-toolbox-votes-scroll-region`, and keeps the body locked. | PASS |
@@ -42,4 +44,4 @@ Full samples validation was skipped as requested. No samples, shared sample load
4244

4345
## Manual Test Notes
4446

45-
The targeted Playwright lane verified the converted Tool Template V2 structure, Admin navigation, fixed fullscreen header/footer, footer scrollbar access, locked page scrolling, independent vertical table scrolling with large row counts, horizontal table scrolling, and removed controls. Earlier PR_26160_067 validation also verified editable State, sorting, ordering, tool links, and State edits flowing into Toolbox Build Path through the existing DB-backed metadata source.
47+
The targeted Playwright lane verified the converted Tool Template V2 structure, Admin navigation, fixed fullscreen header/footer, footer scrollbar access, locked page scrolling, pinned `thead` sort buttons, `tbody` row scrolling under the pinned header with large row counts, horizontal table scrolling, and removed controls. Earlier PR_26160_067 validation also verified editable State, sorting, ordering, tool links, and State edits flowing into Toolbox Build Path through the existing DB-backed metadata source.

tests/playwright/tools/AdminPlatformToolsWireframes.spec.mjs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ test("Tool Votes side menu includes Admin platform wireframes", async ({ page })
139139
const center = workspace.querySelector("[data-toolbox-votes-panel]");
140140
const right = workspace.querySelector(".tool-column:last-of-type");
141141
const scrollRegion = workspace.querySelector("[data-toolbox-votes-scroll-region]");
142+
const sortButton = scrollRegion?.querySelector("thead [data-toolbox-votes-sort='toolName']");
142143
const header = document.querySelector("header.site-header");
143144
const footer = document.querySelector("footer.footer");
144145
const bodyScrollBefore = document.scrollingElement?.scrollTop || 0;
@@ -160,6 +161,9 @@ test("Tool Votes side menu includes Admin platform wireframes", async ({ page })
160161
}
161162
const headerBox = header?.getBoundingClientRect();
162163
const footerBox = footer?.getBoundingClientRect();
164+
const scrollRegionBox = scrollRegion?.getBoundingClientRect();
165+
const sortButtonBox = sortButton?.getBoundingClientRect();
166+
const firstBodyRowBox = scrollRegion?.querySelector("tbody tr")?.getBoundingClientRect();
163167
return {
164168
bodyOverflowY: getComputedStyle(document.body).overflowY,
165169
bodyScrollAfter: document.scrollingElement?.scrollTop || 0,
@@ -170,16 +174,24 @@ test("Tool Votes side menu includes Admin platform wireframes", async ({ page })
170174
footerPosition: footer ? getComputedStyle(footer).position : "",
171175
footerScrollable: footer ? footer.scrollHeight > footer.clientHeight : false,
172176
footerScrollTop: footer ? footer.scrollTop : 0,
177+
footerTop: footerBox ? Math.round(footerBox.top) : 0,
173178
headerPosition: header ? getComputedStyle(header).position : "",
174179
headerTop: headerBox ? Math.round(headerBox.top) : 0,
175180
horizontalScrollLeft: scrollRegion ? scrollRegion.scrollLeft : 0,
176181
horizontalScrollable: scrollRegion ? scrollRegion.scrollWidth > scrollRegion.clientWidth : false,
182+
firstBodyRowBottom: firstBodyRowBox ? Math.round(firstBodyRowBox.bottom) : 0,
177183
leftOverflowY: left ? getComputedStyle(left).overflowY : "",
178184
rightOverflowY: right ? getComputedStyle(right).overflowY : "",
185+
scrollRegionBottom: scrollRegionBox ? Math.round(scrollRegionBox.bottom) : 0,
179186
scrollRegionHeight: scrollRegion ? scrollRegion.clientHeight : 0,
180187
scrollRegionScrollTop: scrollRegion ? scrollRegion.scrollTop : 0,
181188
scrollRegionVerticalScrollable: scrollRegion ? scrollRegion.scrollHeight > scrollRegion.clientHeight : false,
182189
scrollRegionOverflowY: scrollRegion ? getComputedStyle(scrollRegion).overflowY : "",
190+
sortButtonBottom: sortButtonBox ? Math.round(sortButtonBox.bottom) : 0,
191+
sortButtonPosition: sortButton ? getComputedStyle(sortButton.closest("th")).position : "",
192+
sortButtonText: sortButton ? sortButton.textContent.trim() : "",
193+
sortButtonTop: sortButtonBox ? Math.round(sortButtonBox.top) : 0,
194+
scrollRegionTop: scrollRegionBox ? Math.round(scrollRegionBox.top) : 0,
183195
viewportHeight: window.innerHeight,
184196
};
185197
});
@@ -201,6 +213,13 @@ test("Tool Votes side menu includes Admin platform wireframes", async ({ page })
201213
expect(fullscreenMetrics.scrollRegionScrollTop).toBeGreaterThan(0);
202214
expect(fullscreenMetrics.horizontalScrollable).toBe(true);
203215
expect(fullscreenMetrics.horizontalScrollLeft).toBeGreaterThan(0);
216+
expect(fullscreenMetrics.scrollRegionBottom).toBeLessThanOrEqual(fullscreenMetrics.footerTop);
217+
expect(fullscreenMetrics.sortButtonPosition).toBe("sticky");
218+
expect(fullscreenMetrics.sortButtonText).toContain("Tool");
219+
expect(fullscreenMetrics.sortButtonTop).toBeGreaterThanOrEqual(fullscreenMetrics.scrollRegionTop);
220+
expect(fullscreenMetrics.sortButtonBottom).toBeLessThanOrEqual(fullscreenMetrics.scrollRegionBottom);
221+
expect(fullscreenMetrics.sortButtonBottom).toBeLessThan(fullscreenMetrics.footerBottom);
222+
expect(fullscreenMetrics.firstBodyRowBottom).toBeLessThanOrEqual(fullscreenMetrics.sortButtonTop);
204223

205224
await expectNoPageFailures(failures);
206225
} finally {

0 commit comments

Comments
 (0)