fix(docs): keep the playground views in step with a scale target (audit B6) #63
No reviewers
Labels
No labels
bug
discussion
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
research
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gram-lang/gram!63
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/audit-b6"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Audit B6. In the playground, a scale target (scale by ingredient) made the single watcher skip
updateGramfor every change (if (!scaleTargetId.value)), so the Preview and Markdown views (rendered insideupdateGram) ignored the schedule selector, the view switch, the language, the options and edits to the recipe itself; the Gantt followed only because it readsjsonDatawith ascheduleprop.The guard only exists so that
updateGramwriting the resolved factor intoscaleFactorStringdoesn't re-trigger itself (8a94c83f). Split the watcher: everything a view is built from always re-runs the pipeline; onlyscaleFactorStringkeeps the guard.Not verified in a browser: the Chrome extension was not connected in my session and the docs package has no component test setup. ci and a forced docs build pass. Manual check on the playground: pick a scale target (ingredient + quantity, Apply), then switch the schedule selector and the Preview/Markdown views, and edit the recipe: they should now update. No changeset (docs is private); worth a line in the blog post.