Restore Goals screen scroll behavior by making the main goals container vertically scrollable. - add full-height, min-height reset, and vertical overflow scrolling to .goals-view - enable momentum scrolling on iOS via -webkit-overflow-scrolling - extend GoalsView CSS guardrail test to assert required scroll-related declarations Files changed: packages/dashboard/app/components/GoalsView.css | 4 ++++ packages/dashboard/app/components/__tests__/GoalsView.css.test.ts | 3 +++ 2 files changed, 7 insertions(+) Fusion-Task-Id: FN-5667 Fusion-Task-Lineage: fed12aa4-ebe0-46aa-a057-375469912acd
24 lines
931 B
TypeScript
24 lines
931 B
TypeScript
import { describe, expect, it } from "vitest";
|
|
import { loadAllAppCss } from "../../test/cssFixture";
|
|
|
|
function goalsBlocks(css: string): string {
|
|
const blocks = css.match(/[^\n]*\.goals-[^{\n]*\{[^}]*\}/gms) ?? [];
|
|
return blocks.join("\n");
|
|
}
|
|
|
|
describe("GoalsView CSS token guardrails", () => {
|
|
it("uses tokens and contains mobile/focus rules", async () => {
|
|
const css = await loadAllAppCss();
|
|
const goalsCss = goalsBlocks(css);
|
|
const goalsViewBlock = css.match(/\.goals-view\s*\{[^}]*\}/ms)?.[0] ?? "";
|
|
|
|
expect(goalsCss).not.toMatch(/#[0-9a-fA-F]{3,8}/g);
|
|
expect(goalsCss).not.toMatch(/rgba?\(/g);
|
|
expect(goalsCss).not.toMatch(/\b[1-9]\d*px\b/g);
|
|
expect(goalsViewBlock).toContain("height: 100%");
|
|
expect(goalsViewBlock).toContain("overflow-y: auto");
|
|
expect(css).toMatch(/\.goals-[^\n{]*:focus-visible/g);
|
|
expect(css).toMatch(/@media \(max-width: 768px\)[\s\S]*\.goals-/);
|
|
});
|
|
});
|