mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-10 01:09:43 +02:00
feat(defaults): Compact header, Tiles button on, Classic tab layout
The owner's picks after testing the 1.36.0 beta: - Header Stats Style defaults to Compact (two pills with rings) instead of Tiles. The resolver, the pre-paint stamp and the App Settings option all agree; an unknown value now reads as compact. - The Tiles header button is ON by default everywhere but handhelds (their defaults object keeps it off, and the button still needs a 1180px window). The Ctrl+Shift+G gate in tileShortcutFor() now resolves an absent key through the device defaults too, so the chord and the button cannot disagree; before, it required a stored true. - Tab Layout defaults to Classic (the single strip, as before). By state, By case and Ledger stay available as opt-ins. The tile-grid beta the owner used last had only this layout, and it is the one they wanted back. zh-CN option labels follow the new "(default)" markers; docs and wiki updated. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
// Port: none (pure static analysis, runs in CI, no browser/server).
|
||||
//
|
||||
// `showTileGridButton` (the header Tiles button, and the Ctrl+Shift+G chord) is
|
||||
// a PER-DEVICE setting, default OFF, with the same three-way rule as
|
||||
// a PER-DEVICE setting (default ON on desktop, OFF on handhelds) with the same three-way rule as
|
||||
// showSplitButton (test/split-pane-per-device-setting.test.ts, read it for the
|
||||
// history): in settings-ui.js's displayKeys merge policy, stripped out of the
|
||||
// object saveAppSettings() PUTs (SettingsUpdateSchema is .strict(), so sending
|
||||
@@ -38,10 +38,16 @@ describe('showTileGridButton stays per-device: display key, stripped from the PU
|
||||
expect(schemas).not.toContain('showTileGridButton');
|
||||
});
|
||||
|
||||
it('defaults OFF on handhelds (and reads as OFF when absent everywhere)', () => {
|
||||
it('defaults ON on desktop (an absent key reads as ON) and OFF on handhelds', () => {
|
||||
// Owner's pick on the 1.36.0 beta: the Tiles button ships visible on desktop.
|
||||
// Handhelds keep it OFF in their defaults object, and the button never shows
|
||||
// below 1180px wide anyway.
|
||||
expect(settingsUi).toMatch(/showSplitButton: false,\s*showTileGridButton: false,/);
|
||||
expect(settingsUi).toContain(
|
||||
"document.getElementById('appSettingsShowTileGridButton').checked = settings.showTileGridButton ?? defaults.showTileGridButton ?? false;"
|
||||
"document.getElementById('appSettingsShowTileGridButton').checked = settings.showTileGridButton ?? defaults.showTileGridButton ?? true;"
|
||||
);
|
||||
expect(settingsUi).toContain(
|
||||
'const showTileGridButton = settings.showTileGridButton ?? defaults.showTileGridButton ?? true;'
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user