mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-09 21:10:59 +00:00
release: v1.32.0 — hardening and scalability (#580)
* release: prepare v1.32.0 * test: stabilize water capture re-entry
This commit is contained in:
1 parent
b01822be48
commit
62eb431d66
372 files changed
+25178
-8561
No files matched your search
@@ -47,9 +47,9 @@ vi.mock("@/hooks/use-auth", () => ({
|
||||
import { I18nProvider } from "@/lib/i18n/context";
|
||||
import { BackupsSection } from "../backups-section";
|
||||
|
||||
function render() {
|
||||
function render(locale: "en" | "de" = "en") {
|
||||
return renderToStaticMarkup(
|
||||
<I18nProvider initialLocale="en">
|
||||
<I18nProvider initialLocale={locale}>
|
||||
<BackupsSection />
|
||||
</I18nProvider>,
|
||||
);
|
||||
@@ -79,6 +79,25 @@ describe("BackupsSection — empty state", () => {
|
||||
expect(matches).toBeGreaterThanOrEqual(2);
|
||||
});
|
||||
|
||||
it("uses the full muted semantic color for localized upload help", () => {
|
||||
const english = render();
|
||||
const german = render("de");
|
||||
const helpElement = english.match(
|
||||
/<[^>]+data-slot="backup-upload-help"[^>]*>/,
|
||||
)?.[0];
|
||||
const className = helpElement?.match(/\bclass="([^"]*)"/)?.[1] ?? "";
|
||||
|
||||
expect(english).toContain(
|
||||
"JSON file matching the current backup schema. Max 10 MB.",
|
||||
);
|
||||
expect(german).toContain(
|
||||
"JSON-Datei passend zum aktuellen Backup-Schema. Max. 10 MB.",
|
||||
);
|
||||
expect(helpElement).toBeDefined();
|
||||
expect(className.split(/\s+/)).toContain("text-muted-foreground");
|
||||
expect(className).not.toMatch(/\b(?:opacity-\d+|text-\S+\/\d+)\b/);
|
||||
});
|
||||
|
||||
it("warns in both catalogs that restore overwrites instance-wide settings", () => {
|
||||
expect(de.admin.section.backups.restoreDescription).toMatch(
|
||||
/instanzweite Einstellungen/i,
|
||||
|
||||
@@ -372,16 +372,15 @@ export function AdminShell({ active, children }: AdminShellProps) {
|
||||
</ul>
|
||||
</aside>
|
||||
|
||||
{/* Main column (cards) — row 2 / col 2, the grid's `1fr` row, so it
|
||||
{/* Cards column — row 2 / col 2, the grid's `1fr` row, so it
|
||||
stretches to fill the shared `SUB_SHELL_GRID_FLOOR` on the grid
|
||||
(matches `<SettingsShell>`) without over-shooting. The loading-jump
|
||||
floor lives on the GRID, not here: a column-level
|
||||
`min-h-[calc(100dvh-12rem)]` reserve (the pre-#154 shape this used
|
||||
to carry) over-reserves on short sections and on mobile, scrolling
|
||||
the page into a dark band below the last card. */}
|
||||
<main className="min-w-0 md:col-start-2 md:row-start-2">
|
||||
{children}
|
||||
</main>
|
||||
the page into a dark band below the last card. AuthShell already
|
||||
owns the page's single `<main>` landmark. */}
|
||||
<div className="min-w-0 md:col-start-2 md:row-start-2">{children}</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -414,7 +414,10 @@ export function BackupsSection() {
|
||||
</div>
|
||||
<p className="text-muted-foreground text-xs">
|
||||
{t("admin.section.backups.uploadDescription")}{" "}
|
||||
<span className="opacity-80">
|
||||
<span
|
||||
data-slot="backup-upload-help"
|
||||
className="text-muted-foreground"
|
||||
>
|
||||
{t("admin.section.backups.uploadHelp")}
|
||||
</span>
|
||||
</p>
|
||||
|
||||
Reference in new issue
Block a user