export useAuthoredLayout, for a workspace inside a panel
A nested workspace wants the same bargain PluginScreen makes: structure from source every render, only sizes and zoom persisted. `useDashboardState` was the only export, and it persists the whole tree — right for a dashboard somebody arranged, wrong for a layout its author ships, because the structure would freeze at whatever it was the first time a screen was opened. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -2,6 +2,15 @@ export { useSettings, DEFAULT_SETTINGS } from './useSettings';
|
||||
export type { UseSettingsType, UserSettings, UserState } from './useSettings';
|
||||
export { useUserState } from './useUserState';
|
||||
export { useDashboardState } from './useDashboardState';
|
||||
/*
|
||||
Exported for a workspace nested INSIDE a panel — see plugins/fofos-admin/web/WorkPanel.tsx.
|
||||
|
||||
`useDashboardState` persists the whole tree, which is right for a dashboard somebody arranged and
|
||||
wrong for a layout its author ships: the structure would be frozen at whatever it was the first time
|
||||
a screen was opened. `useAuthoredLayout` keeps the structure in source and persists only sizes and
|
||||
zoom, which is what a nested authored layout wants for the same reason `PluginScreen` does.
|
||||
*/
|
||||
export { useAuthoredLayout } from './useAuthoredLayout';
|
||||
export { useModels, useVisibleModels, useUserVisibleModels, useEnabledModels, modelKey } from './useModels';
|
||||
export type { ModelOption } from './useModels';
|
||||
export { useAccessPolicy } from './useAccessPolicy';
|
||||
|
||||
Reference in New Issue
Block a user