M22: Aufgaben-Paket — Mentions (#150/#151), Datums-Marker (#152), Task-IDs+Toggle (#153), Aufgabenübersicht (#154) #158

Merged
fable-5 merged 7 commits from m22-aufgaben into main 2026-07-20 02:25:40 +02:00
2 changed files with 7 additions and 1 deletions
Showing only changes of commit 58f175af32 - Show all commits

View File

@ -20,6 +20,9 @@ test('user settings show the jump nav and clicking scrolls + activates', async (
const context = await contextForUser(browser, BASE_URL, 'fixture-user'); const context = await contextForUser(browser, BASE_URL, 'fixture-user');
const page = await context.newPage(); const page = await context.newPage();
await page.goto('/settings'); await page.goto('/settings');
// Let the async section content (sessions, tokens, …) settle first —
// sections growing above the target would push it out of view again.
await page.waitForLoadState('networkidle');
const nav = page.locator('.settings-nav'); const nav = page.locator('.settings-nav');
await expect(nav).toBeVisible(); await expect(nav).toBeVisible();
@ -46,6 +49,7 @@ test('pond settings derive the nav from their sections', async ({ browser }) =>
const page = await context.newPage(); const page = await context.newPage();
await page.goto(`/p/${pond.slug}/settings`); await page.goto(`/p/${pond.slug}/settings`);
await page.waitForLoadState('networkidle');
const links = page.locator('.settings-nav .settings-nav__link'); const links = page.locator('.settings-nav .settings-nav__link');
// The pond owner sees the full section stack — at least members, labels, // The pond owner sees the full section stack — at least members, labels,

View File

@ -102,7 +102,9 @@ export function SettingsLayout({ children }: { children: React.ReactNode }): Rea
}, []); }, []);
const jump = (id: string): void => { const jump = (id: string): void => {
document.getElementById(id)?.scrollIntoView({ behavior: 'smooth', block: 'start' }); // Instant, not smooth: async section content (queries) can still grow
// during an animation, leaving it at a stale target position.
document.getElementById(id)?.scrollIntoView({ block: 'start' });
setActive(id); setActive(id);
}; };