mirror of
https://github.com/getpaseo/paseo.git
synced 2026-10-28 20:22:45 +00:00
* Upgrade to Expo 57 and unify Explorer across layouts * feat(app): retain Explorer across layout and appearance changes Keep one workspace Explorer host and destination-aware navigation so folding, theme updates and compact sheets preserve the current panel. Scope pull request discovery and timeline demand to active surfaces. * fix(app): keep Explorer resize handles stretched through the dock The shared frame moved the divider into an absolute column, leaving its horizontal handle without height. Restore the row so pointer drags reach it, preserving the existing resize and performance contract. * fix(app): keep Explorer drag widths out of the shared stylesheet Carry the existing inline sizing policy into the shared frame so pointer previews do not accumulate CSS rules. * fix(test): align isolated test runtimes with Expo 57 Hoisted React consumers need the matching DOM renderer at the repository root. Automated Metro processes must not install native DevTools into disposable homes, and development toast overlays must not cover compact actions. Keep Explorer journeys on the shared host and synchronize setup fixtures on daemon output rather than a one-second file-marker window. A delayed real child start reproduces the readiness failure on every platform. * fix(test): await retained shell layout after composer resize The gesture host now stays mounted across breakpoints, so its presence no longer identifies compact layout. Report the current layout on the retained host and synchronize composer journeys with that state. * fix(app): preserve browser interactions in retained workspace hosts Initially disabled gesture hosts still registered pointer and wheel listeners, while hover cards used window positions inside a workspace-local sheet portal. Respect initial gesture enablement and position cards relative to their measured floating host. Keep developer-toast dismissal independent of pointer input and replacement toast visibility so modal, hover, and focus checks retain their input state. * fix(test): share developer toast handling with Electron browser runs The standalone Electron browser runner bypassed the browser fixture, allowing developer errors to cover Settings. Use the same non-pointer dismissal in both runners while retaining their console logs.
56 lines
2.2 KiB
TypeScript
56 lines
2.2 KiB
TypeScript
import { useUnistyles } from "react-native-unistyles";
|
|
import { isWeb } from "@/constants/platform";
|
|
|
|
export const FOOTER_HEIGHT = 75;
|
|
|
|
// Shared header inner height (excluding safe area insets and border)
|
|
// Used by both agent header (ScreenHeader) and explorer sidebar header
|
|
// This ensures both headers have the same visual height
|
|
export const HEADER_INNER_HEIGHT = 36;
|
|
export const HEADER_INNER_HEIGHT_MOBILE = 56;
|
|
export const WORKSPACE_SECONDARY_HEADER_HEIGHT = 36;
|
|
export const HEADER_TOP_PADDING_MOBILE = 8;
|
|
|
|
export const COMPACT_FORM_FACTOR_WIDTH = 500;
|
|
|
|
// Settings uses the canonical desktop list + detail layout. Its sidebar and
|
|
// detail target must fit together before it can share width with app navigation.
|
|
export const SETTINGS_DESKTOP_SIDEBAR_WIDTH = 320;
|
|
export const SETTINGS_DESKTOP_DETAIL_MIN_WIDTH = 400;
|
|
export const SETTINGS_DESKTOP_SPLIT_MIN_WIDTH =
|
|
SETTINGS_DESKTOP_SIDEBAR_WIDTH + SETTINGS_DESKTOP_DETAIL_MIN_WIDTH;
|
|
|
|
// Desktop app constants for macOS traffic light buttons
|
|
// These buttons (close/minimize/maximize) overlay the top-left corner
|
|
export const DESKTOP_TRAFFIC_LIGHT_WIDTH = 78;
|
|
export const DESKTOP_TRAFFIC_LIGHT_HEIGHT = 45;
|
|
|
|
// Custom desktop window controls (minimize/maximize/close) — top-right
|
|
export const DESKTOP_WINDOW_CONTROLS_HEIGHT = HEADER_INNER_HEIGHT;
|
|
|
|
export {
|
|
getIsElectron as getIsElectronRuntime,
|
|
getIsElectronMac as getIsElectronRuntimeMac,
|
|
} from "./platform";
|
|
|
|
/** Below 600 points, sidebars overlay the workspace. Medium and wider layouts dock them. */
|
|
export function isCompactBreakpoint(breakpoint: string | undefined): boolean {
|
|
return breakpoint === "xs" || breakpoint === "sm";
|
|
}
|
|
|
|
/**
|
|
* Reactive hook — re-renders the component when the breakpoint changes.
|
|
* Always use this instead of reading UnistylesRuntime.breakpoint directly.
|
|
*/
|
|
export function useIsCompactFormFactor(): boolean {
|
|
const { rt } = useUnistyles();
|
|
return isCompactBreakpoint(rt.breakpoint);
|
|
}
|
|
|
|
// SplitContainer relies on dnd-kit and DOM-backed accessibility helpers.
|
|
// Keep that capability distinct from desktop-width layout so touch tablets
|
|
// can use the desktop shell without entering web-only code paths.
|
|
export function supportsDesktopPaneSplits(): boolean {
|
|
return isWeb;
|
|
}
|