8000 Keep compact board toolbar actions together by rore · Pull Request #28 · rore/minimap · GitHub
[go: up one dir, main page]

Skip to content
8000
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package/minimap/skills/minimap-roadmap/runtime/ui/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -4051,10 +4051,10 @@ textarea {
flex-wrap: wrap;
}

@container (max-width: 380px) {
@container (max-width: 560px) {
.board-toolbar-row .board-control-actions { display: contents; }
.board-controls .board-toolbar-row .board-search-field {
flex: 1 1 7rem;
flex: 1 1 calc(100% - 12rem);
width: auto;
}
.board-toolbar-row .board-search-field input { min-width: 0; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4051,10 +4051,10 @@ textarea {
flex-wrap: wrap;
}

@container (max-width: 380px) {
@container (max-width: 560px) {
.board-toolbar-row .board-control-actions { display: contents; }
.board-controls .board-toolbar-row .board-search-field {
flex: 1 1 7rem;
flex: 1 1 calc(100% - 12rem);
width: auto;
}
.board-toolbar-row .board-search-field input { min-width: 0; }
Expand Down
4 changes: 2 additions & 2 deletions package/minimap/ui/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -4051,10 +4051,10 @@ textarea {
flex-wrap: wrap;
}

@container (max-width: 380px) {
@container (max-width: 560px) {
.board-toolbar-row .board-control-actions { display: contents; }
.board-controls .board-toolbar-row .board-search-field {
flex: 1 1 7rem;
flex: 1 1 calc(100% - 12rem);
width: auto;
}
.board-toolbar-row .board-search-field input { min-width: 0; }
Expand Down
96 changes: 80 additions & 16 deletions playwright/roadmap-ui.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -1335,26 +1335,90 @@ test("status columns keep configured empty lanes visible in columns mode", async
}
});
test("keeps list-mode board controls compact and non-overlapping", async ({ page }) => {
await page.setViewportSize({ width: 1180, height: 1100 });
await page.setViewportSize({ width: 1697, height: 1100 });
await page.route(/\/api\/board\/participant-counts$/, (route) => route.fulfill({
json: { status: "unreachable", counts: [], partial: false, asOf: null, recentSeconds: 86400 },
}));
await page.goto(repoUrl());
await expect(page.locator("#workspace-summary")).toContainText(/\d+ items \/ \d+ groups/);
await page.locator("#board-focus-unfinished").click();
await expect(page.locator("#board-filter-toggle")).toHaveText("Filters (1)");
await expect(page.locator("#board-participant-status")).toHaveText("Session badges unavailable");

const toolbar = page.locator(".board-toolbar-row");
const modeRowBox = await page.locator(".board-mode-row").boundingBox();
const groupByBox = await page.locator("#board-view-toggle").boundingBox();
const layoutBox = await page.locator("#board-layout-controls").boundingBox();
expect(modeRowBox.height).toBeLessThan(52);
expect(layoutBox.x).toBeGreaterThan(groupByBox.x + groupByBox.width - 4);
expect((await toolbar.boundingBox()).y).toBeGreaterThan(modeRowBox.y + modeRowBox.height - 2);
const controlSelectors = ["#board-search", "#board-filter-toggle", "#board-clear-filters",
"#board-focus-milestone", "#board-focus-unfinished", "#board-focus-in-play", "#board-participant-status"];
async function checkToolbar(compact = true) {
const { bounds, boxes } = await toolbar.evaluate((element, selectors) => ({
bounds: element.getBoundingClientRect().toJSON(),
boxes: selectors.map((selector) => document.querySelector(selector).getBoundingClientRect().toJSON()),
}), controlSelectors);
for (const box of boxes) {
expect(box).not.toBeNull();
expect(box.x).toBeGreaterThanOrEqual(bounds.x - 1);
expect(box.x + box.width).toBeLessThanOrEqual(bounds.x + bounds.width + 1);
expect(box.y).toBeGreaterThanOrEqual(bounds.y - 1);
expect(box.y + box.height).toBeLessThanOrEqual(bounds.y + bounds.height + 1);
}
for (let i = 0; i < boxes.length; i += 1) {
for (const other of boxes.slice(i + 1)) {
const box = boxes[i];
expect(box.x + box.width <= other.x + 1 || other.x + other.width <= box.x + 1
|| box.y + box.height <= other.y + 1 || other.y + other.height <= box.y + 1).toBe(true);
}
}
if (compact) {
const sameRow = (a, b) => expect(Math.abs(a.y + a.height / 2 - b.y - b.height / 2)).toBeLessThan(2);
sameRow(boxes[0], boxes[1]);
sameRow(boxes[0], boxes[2]);
sameRow(boxes[3], boxes[4]);
sameRow(boxes[3], boxes[5]);
expect(boxes[3].y).toBeGreaterThanOrEqual(boxes[0].y + boxes[0].height);
}
return boxes;
}

const modeRow = page.locator(".board-mode-row");
const groupBy = page.locator("#board-view-toggle");
const layoutControls = page.locator("#board-layout-controls");
const searchRow = page.locator(".board-toolbar-row");
for (const width of [320, 390, 400, 420, 460, 500, 560]) {
await page.locator("#layout-shell").evaluate((element, width) => element.style.setProperty("--board-width", `${width}px`), width);
expect((await page.locator(".board-panel").boundingBox()).width).toBeCloseTo(width, 0);
await checkToolbar();
// Label-only geometry stress: this does not create twelve real filters.
await page.locator("#board-filter-toggle").evaluate((element) => { element.textContent = "Filters (12)"; });
await checkToolbar();
await page.locator("#board-filter-toggle").evaluate((element) => { element.textContent = "Filters (1)"; });
}

const modeRowBox = await modeRow.boundingBox();
const groupByBox = await groupBy.boundingBox();
const layoutBox = await layoutControls.boundingBox();
const searchRowBox = await searchRow.boundingBox();
await page.locator("#board-focus-in-play").click();
const warning = page.locator("#board-participant-status");
await expect(warning).toHaveClass(/is-incomplete/);
await expect(warning).toHaveText("In play results incomplete: session lookup unavailable");
const warningBox = await warning.boundingBox();
const toolbarBox = await toolbar.boundingBox();
expect(warningBox.width).toBeCloseTo(toolbarBox.width, 0);
expect(warningBox.y).toBeGreaterThan((await page.locator("#board-focus-in-play").boundingBox()).y);
expect(await warning.evaluate((element) => element.scrollWidth <= element.clientWidth
&& getComputedStyle(element).color !== "rgba(0, 0, 0, 0)" && getComputedStyle(element).whiteSpace === "normal")).toBe(true);
await checkToolbar();
await page.locator("#board-focus-in-play").click();
await expect(page.locator("#board-focus-in-play")).toHaveAttribute("aria-pressed", "false");

await page.setViewportSize({ width: 390, height: 1100 });
await checkToolbar();
await page.locator("#board-layout-columns").click();
await expect(page.locator("#board-layout-columns")).toHaveClass(/is-active/);
await checkToolbar();

expect(modeRowBox).not.toBeNull();
expect(groupByBox).not.toBeNull();
expect(layoutBox).not.toBeNull();
expect(searchRowBox).not.toBeNull();
expect(modeRowBox.height).toBeLessThan(52);
expect(layoutBox.x).toBeGreaterThan(groupByBox.x + groupByBox.width - 4);
expect(searchRowBox.y).toBeGreaterThan(modeRowBox.y + modeRowBox.height - 2);
await page.setViewportSize({ width: 1697, height: 1100 });
const wideBoxes = await checkToolbar(false);
const searchCap = await page.evaluate(() => 34 * parseFloat(getComputedStyle(document.documentElement).fontSize));
expect(wideBoxes[0].width).toBeLessThanOrEqual(searchCap + 1);
expect(wideBoxes[0].width).toBeGreaterThan(searchCap - 1);
});

test("uses a board-first columns layout when many groups are visible", async ({ page }) => {
Expand Down
6 changes: 5 additions & 1 deletion roadmap/features/feature-search-and-filters.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,8 @@ As roadmap size grows, minimap needs faster navigation more than it needs heavie

## Notes

This is the most important next visibility feature because it improves review and navigation without changing the product's editing model.
Search and dynamic filters are implemented and improve review and navigation without changing the product's editing model.

2026-09-28 toolbar polish on fix/list-toolbar-wrapping: reproduced Clear orphaned on a third row in the real Dictation board at 390–420px pane widths with Unfinished / Filters (1). Extended the existing compact toolbar layout through 560px and reserved first-row space for Filters/Clear, keeping milestone / Unfinished / In play together below. Wide Columns retains the capped Search field. Both packaged runtime mirrors are synchronized; no filter semantics, backend, or real project data changed.

Verification: the expanded existing Playwright regression passed twice and failed as expected with the old CSS. It covers 320–560px panes, actual Filters (1), label-only Filters (12) geometry stress, readable incomplete-lookup warnings, 390px List/Columns, wide Columns, bounds/non-overlap, and the original mode-row assertions. Read-only browser QA also passed 12 desktop/mobile List/Columns cases across Pallium, Minimap, and Dictation; screenshots were visually inspected. The shared server stayed on PID 39532 without a restart. Exact-head manager review and full CI gate the authorized merge.
Loading
0