mirror of
https://github.com/getpaseo/paseo.git
synced 2026-10-14 13:22:37 +00:00
* feat(app): modernize compact headers and sidebar affordances Use a shared island header with quick tab creation and keep sheet footers inside their visible layout. Opt sidebar rows into touch sizing without changing global appearance settings. * test(app): match darker light-theme workspace selection * test(app): align plugin journeys with compact header
49 lines
1.3 KiB
TypeScript
49 lines
1.3 KiB
TypeScript
import { describe, expect, it } from "vitest";
|
|
import { getCompactSheetSafeAreaPadding } from "@/components/adaptive-modal-sheet-layout";
|
|
|
|
describe("getCompactSheetSafeAreaPadding", () => {
|
|
it("assigns safe clearance to the footer independently of decorative padding", () => {
|
|
expect(
|
|
getCompactSheetSafeAreaPadding({
|
|
isCompact: true,
|
|
isKeyboardVisible: false,
|
|
hasFooter: true,
|
|
safeAreaBottom: 34,
|
|
}),
|
|
).toEqual({ footerPaddingBottom: 34 });
|
|
});
|
|
|
|
it("assigns safe clearance to the body only without a footer", () => {
|
|
expect(
|
|
getCompactSheetSafeAreaPadding({
|
|
isCompact: true,
|
|
isKeyboardVisible: false,
|
|
hasFooter: false,
|
|
safeAreaBottom: 34,
|
|
}),
|
|
).toEqual({ contentPaddingBottom: 34 });
|
|
});
|
|
|
|
it("does not add a safe-area band above the compact keyboard", () => {
|
|
expect(
|
|
getCompactSheetSafeAreaPadding({
|
|
isCompact: true,
|
|
isKeyboardVisible: true,
|
|
hasFooter: false,
|
|
safeAreaBottom: 34,
|
|
}),
|
|
).toEqual({});
|
|
});
|
|
|
|
it("does not inset desktop sheets", () => {
|
|
expect(
|
|
getCompactSheetSafeAreaPadding({
|
|
isCompact: false,
|
|
isKeyboardVisible: false,
|
|
hasFooter: false,
|
|
safeAreaBottom: 34,
|
|
}),
|
|
).toEqual({});
|
|
});
|
|
});
|