Repository navigation
Conversation
`devtools.settingsDefaults` hands the project's panel defaults to
`createUi({ settingsDefaults })`, which resolves them below each
developer's own choice in Settings. It is the Vite half of leaving a
command such as `Mod+K` unbound for everyone working in the repo.
The three dock lists stay out of the type: their stored value is always
present, so a seeded list could never be undone from Settings.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
devtoolshad no way to say what the panel should default to, so a project that wantsMod+Kfree for its own palette has every developer unbind it by hand.settingsDefaultsforwards tocreateUi({ settingsDefaults })from@devframes/hub-ui, which resolves the values below each developer's own choice in Settings. A reset in Settings returns to these defaults rather than to the built-in ones.commandShortcutsanddocksCustomOrderstack per key, so a seeded entry survives one a developer changed themselves. The three dock lists (docksHidden,docksCategoriesHidden,docksPinned) are excluded from the type: the stored list is always present, so a seeded one could never be undone from Settings.Test
packages/core/src/node/__tests__/ui-settings-defaults.test.tshas two cases, one per hop:createViteDevToolsUiforwards the option tocreateUi, andcreateDevToolsPluginshands it to the server plugin. Both fail onmain, where the option is not forwarded:createViteDevToolsUiwas also checked against a local build of the released-from@devframes/hub-ui:npx tsc --noEmit -p packages/coreexits 0 there, which is the only place the new option type matters.Linked Issues
Related to devframes/devframe#506, which adds the option upstream.
Additional context
This is a draft on purpose. The installed
@devframes/hub-uiis 1.3.6, which does not acceptsettingsDefaults, sopackages/core/src/node/ui.tsfails typecheck until that release lands and this branch bumps the catalog to it. I will switch it to ready for review after the bump, and the diff above that one line is unaffected.