fix(FN-821): fix Activity Log modal layout and close control

- Fix modal sizing to properly fit within viewport on various screen sizes
- Fix close button visibility and accessibility in ActivityLogModal component
- Refactor CSS to simplify modal styles (remove unused/verbose rules)
- Add regression tests for modal layout and close button behavior
- Update Activity Log docs to reflect modal sizing changes
This commit is contained in:
gsxdsm
2026-04-04 01:25:16 -07:00
parent 482492b26e
commit 3516394e9f
5 changed files with 64 additions and 31 deletions

View File

@@ -40,6 +40,23 @@ describe("activity-log-mobile-layout.css", () => {
const mobileCss = extractMobileMediaBlocks(cssContent);
// ── Modal sizing ────────────────────────────────────────────────────
it("uses modal-lg base class for consistent wide sizing", () => {
// The activity-log-modal should NOT set its own max-width; modal-lg handles width
const modalBlock = cssContent.match(/\.activity-log-modal\s*\{[^}]*\}/)?.[0];
expect(modalBlock).toBeTruthy();
// Should NOT contain max-width (handled by modal-lg base class)
expect(modalBlock).not.toMatch(/max-width:\s*\d+px/);
});
// ── Close button ────────────────────────────────────────────────────
it("does not define a custom activity-log-close style (uses shared modal-close)", () => {
// The modal should use the shared .modal-close class instead of a custom close button
expect(cssContent).not.toMatch(/\.activity-log-close\s*\{/);
});
// ── Modal header / actions ──────────────────────────────────────────
it("has mobile rule for activity-log-header to wrap on narrow screens", () => {