Review of #249 C2: - Load more and Retry focus the first appended image, as the concept does (app.js loadMoreImages). Focus moves without scrolling so the visible cards keep their place (bounded-DOM anchor), and only while focus is still on the pressed control: a viewer or a field the user moved to keeps it. When a last page adds nothing and the button hides, focus goes to the last image, never to the page; a failed page focuses Retry. - The concept's empty state beside the grid: .empty "No matching images. Try another search or category." - D17: the caption date shows only under Newest first (", YYYY" outside the current year) and is hidden under Oldest first and the name and rating sorts. - en-US number grouping in the embedded count too. - Refine "Folder" defaults to the concept's "All output folders". It is not narrowed by Source: the concept has no Source field, and the list holds every source's folders, so any pair can be chosen in one dialog. - The shared toast moves to toast.mjs; library-editor re-exports it. - The D32 overlay (extreme zoom) wraps the layout segmented control and the continuation row instead of pushing them out of the 390px column. - The legacy gallery checks moved to Overview's "Open existing image gallery" card (D29). Mapping additions: grid with no results -> .empty concept copy beside the grid; Load more press -> focus the first new image (concept).
13 lines
500 B
JavaScript
13 lines
500 B
JavaScript
/** The shell's shared toast (`#workspace-toast`, role="status"), used by every workspace page. */
|
|
const TOAST_MS = 6500;
|
|
let toastTimer;
|
|
|
|
/** Show one outcome in the shared workspace toast; it clears itself like the concept's. */
|
|
export function showWorkspaceToast(message) {
|
|
const toast = document.getElementById('workspace-toast');
|
|
if (!toast) return;
|
|
toast.textContent = message;
|
|
clearTimeout(toastTimer);
|
|
toastTimer = setTimeout(() => {toast.textContent = '';}, TOAST_MS);
|
|
}
|