mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-11-16 13:00:55 +00:00
* 🌓 refactor: Scrim OGDialog With the Overlay Theme Role OGDialog scrimmed with a literal bg-black/80, so a theme that redefined surface-overlay moved the Dialog and AlertDialog families and left every OGDialog black. The scrim now paints bg-surface-overlay/80: the opacity is unchanged, so the themes whose overlay resolves to black (dark, and both high-contrast modes) render the same rgba as before, and the light theme gets the gray scrim it defines, at 4.3:1 against the dialog it frames. Follow-up from the review of #15798, tracked as berry-13/LibreChat#14. * 🧪 test: Carry the Scenario Theme Mode in the URL The black-overlay scenario switched modes by writing `color-theme` and reloading, but the init script that seeds the mode stays registered for the life of the page and rewrote it on every load, so the high-contrast iterations re-read the first mode and never matched their `<html>` classes. The mode now rides in the URL and the init script copies whatever the current navigation asks for. * 🧪 test: Read the Scrim of the Frontmost Open Dialog The scrim helpers resolved the dialog with `querySelector`, which takes the first match in document order. Nothing in the suite is affected — the settings modal is Headless UI and carries no `data-state`, so the stacked scenario already measured the account confirmation — but a scenario that opened an OGDialog from inside another one would have silently read the outer dialog's scrim. The helpers now resolve the frontmost open dialog by z-index and read its sibling scrim, and the color and both sample points come back from one pass over the DOM. * 🗂️ fix: Let the SharePoint Picker Take the App's Scrim The picker rendered an OGDialogOverlay of its own beside the OGDialogContent that portals one anyway. Both sat at depth 1, so both resolved to z-index 130, and the primitive's overlay — mounted second — painted over the picker's, so the lighter black it asked for never reached the screen. The dialog is opaque, so it needs no backdrop of its own: the extra overlay and its literal are gone and the picker scrims with the theme's overlay role, exactly once, like every other OGDialog. * 🧪 test: Compare the Picker's Scrim to the Primitive's Own The picker spec pinned the scrim's utility classes, which says nothing a reader of the app would recognise and would break the next time the primitive's opacity moves. It now renders a bare OGDialog beside it and asserts the picker's single scrim is the same layer the app paints. |
||
|---|---|---|
| .. | ||
| public | ||
| src | ||
| sw | ||
| test | ||
| babel.config.cjs | ||
| check_updates.sh | ||
| index.html | ||
| jest.config.cjs | ||
| jest.resolver.cjs | ||
| nginx.conf | ||
| package.json | ||
| postcss.config.cjs | ||
| tailwind.config.cjs | ||
| tsconfig.json | ||
| vite.config.ts | ||