mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-08 08:29:42 +02:00
fix(tabs): review fixes for the detailed rail — width-dialog default, compact wrap pass, rich-aware resets
Three review findings on the detailed-rows feature, all in its edge cases: - The App Settings width select consulted the handheld defaults blob (tabRailWidth: 256) BEFORE the rich-aware default, which the renderer never reads — so a tablet's unsized rich rail rendered 320 while the dialog said 256, and a routine Save persisted the 256 (below the 288px tight threshold, permanently). The chain now mirrors applyTabRailWidth()'s actual resolution. - _setTabRailWidth() re-rendered on a compact flip but never re-ran applyTabWrapSettings(), the one owner of the folder line, whose railRich input reads the compact class this function just toggled. A rich rail dragged below 240px kept emitting folder rows — persistently, for a stored width < 240, since the boot wrap pass runs before the class is first applied. The wrap pass now re-runs on the flip, with exactly one render either way. - Both reset affordances (handle dblclick, Enter on the handle) reset to the hardcoded 256 even on a rich rail, landing it below the tight threshold; both now resolve the rich-aware default (320), via a new optional defaultWidth input on resolveTabRailKeyboardWidth(). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -405,8 +405,12 @@ Object.assign(CodemanApp.prototype, {
|
||||
const tabRailWidth = window.CodemanTabRail?.resolveWidth({
|
||||
// Same default resolution as applyTabRailWidth(): a rail that has never
|
||||
// been sized shows the width it is actually rendering at, which for
|
||||
// detailed rows is the Wide preset rather than 256.
|
||||
width: settings.tabRailWidth ?? defaults.tabRailWidth ?? this._defaultTabRailWidth?.() ?? 256,
|
||||
// detailed rows is the Wide preset rather than 256. The rich-aware
|
||||
// default must come BEFORE the per-device defaults blob: the handheld
|
||||
// blob carries tabRailWidth: 256, which applyTabRailWidth() never reads,
|
||||
// so consulting it first showed a tablet's unsized rich rail as 256 while
|
||||
// it rendered at 320 — and a routine Save then PERSISTED the 256.
|
||||
width: settings.tabRailWidth ?? this._defaultTabRailWidth?.() ?? defaults.tabRailWidth ?? 256,
|
||||
}) ?? 256;
|
||||
this.syncTabRailWidthSetting?.(tabRailWidth);
|
||||
document.getElementById('appSettingsTabRailDetail').value =
|
||||
|
||||
Reference in New Issue
Block a user