Default to the feature tree, code, and file panes open (#6901)

Only include the file pane on desktop. This should encourage users to
try point-and-click and feature tree workflows. After #6629 is
completed, we should default to the code pane being closed.
This commit is contained in:
Frank Noirot
2025-05-13 11:25:27 -04:00
committed by GitHub
parent d5cc9e8386
commit 8603f5c53a

View File

@ -135,6 +135,7 @@ import type { ToolbarModeName } from '@src/lib/toolbar'
import { err, reportRejection, trap } from '@src/lib/trap'
import { uuidv4 } from '@src/lib/utils'
import type { ImportStatement } from '@rust/kcl-lib/bindings/ImportStatement'
import { isDesktop } from '@src/lib/isDesktop'
export type SetSelections =
| {
@ -484,7 +485,9 @@ export const PersistedValues: PersistedKeys[] = ['openPanes']
export const getPersistedContext = (): Partial<PersistedModelingContext> => {
const c = (typeof window !== 'undefined' &&
JSON.parse(localStorage.getItem(PERSIST_MODELING_CONTEXT) || '{}')) || {
openPanes: ['code'],
openPanes: isDesktop()
? (['feature-tree', 'code', 'files'] satisfies Store['openPanes'])
: (['feature-tree', 'code'] satisfies Store['openPanes']),
}
return c
}