Noticed while correcting the navigation example in packages/plugin-gantt/README.md (#6050). Out of that card's scope, so filed rather than fixed there.
The fact
packages/plugin-gantt/src/ObjectGantt.tsx:1152 on main (2dc4aa709):
constnavConfig=schema.navigation??{mode: 'drawer',width: 'min(960px, 60vw)'};width is deprecated in the spec that owns this shape. @objectstack/spec@17.2.0, packages/spec/src/ui/view.zod.ts, NavigationConfigSchema:
@deprecated [#2578 → size] A pixel/percent width cannot be authored blind: the author (often an AI) does not know the client viewport. Kept only as a renderer fallback for pre-#2578 metadata; new metadata sets size (or omits it for auto).
The size bucket that replaced it resolves through useNavigationOverlay's OVERLAY_SIZE_WIDTHS, where lg is min(92vw, 960px) — the same 960px cap this default expresses, with a viewport clamp instead of 60vw.
Why it may still be correct as written, and why that is the question
This is a renderer default, not authored metadata, so the deprecation's stated rationale ("the author does not know the client viewport") does not obviously apply — and min(960px, 60vw) is itself viewport-adaptive, which is the property the bucket exists to provide. So this may be deliberate.
What makes it worth a card either way: resolveOverlayWidth gives an explicit widthpriority oversize, so as long as this default is spelled with width, a gantt that does not declare navigation can never be affected by the bucket system, and the deprecated branch stays load-bearing in the one path most gantts take. If the intent is that the default should be { mode: 'drawer', size: 'lg' }, that is a one-line change; if the intent is that this default deliberately outranks the bucket, that is worth a comment, since nothing here says so.
No behaviour is broken today — filing the judgement, not a defect.
Not in scope of #6050
#6050 is the README's navigation example, which is authored metadata and now shows { "mode": "page" } with no width or size at all. This line is the renderer's own default and is untouched by that fix.
Noticed while correcting the
navigationexample inpackages/plugin-gantt/README.md(#6050). Out of that card's scope, so filed rather than fixed there.The fact
packages/plugin-gantt/src/ObjectGantt.tsx:1152onmain(2dc4aa709):widthis deprecated in the spec that owns this shape.@objectstack/spec@17.2.0,packages/spec/src/ui/view.zod.ts,NavigationConfigSchema:The
sizebucket that replaced it resolves throughuseNavigationOverlay'sOVERLAY_SIZE_WIDTHS, wherelgismin(92vw, 960px)— the same 960px cap this default expresses, with a viewport clamp instead of60vw.Why it may still be correct as written, and why that is the question
This is a renderer default, not authored metadata, so the deprecation's stated rationale ("the author does not know the client viewport") does not obviously apply — and
min(960px, 60vw)is itself viewport-adaptive, which is the property the bucket exists to provide. So this may be deliberate.What makes it worth a card either way:
resolveOverlayWidthgives an explicitwidthpriority oversize, so as long as this default is spelled withwidth, a gantt that does not declarenavigationcan never be affected by the bucket system, and the deprecated branch stays load-bearing in the one path most gantts take. If the intent is that the default should be{ mode: 'drawer', size: 'lg' }, that is a one-line change; if the intent is that this default deliberately outranks the bucket, that is worth a comment, since nothing here says so.No behaviour is broken today — filing the judgement, not a defect.
Not in scope of #6050
#6050 is the README's
navigationexample, which is authored metadata and now shows{ "mode": "page" }with no width or size at all. This line is the renderer's own default and is untouched by that fix.