Repository navigation
editor: page on the standard style vocabulary, components, page controls test - #3573
Conversation
…(work in progress)
…(work in progress)
…s only for script-driven state
…st in the build job
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 6 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
|
|
Overall Grade |
Security Reliability Complexity Hygiene |
Code Review Summary
| Analyzer | Status | Updated (UTC) | Details |
|---|---|---|---|
| JavaScript | Nov 17, 2026 11:51a.m. | Review ↗ | |
| Secrets | Nov 17, 2026 11:51a.m. | Review ↗ |
Important
AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.
The playground page was one 27 KB raw
style:string written for browser defaults. The standard base sheet (all elementsdisplay: flex; flex-direction: column, button and input chrome, bidi plaintext) made it stack the toolbar vertically and break the code highlighter (spans became blocks), on top of the dead buttons fixed in #3564.What changed:
editor/ui.salam(new): componentsToolbar,Brand,Controls,MenuToggle,Scrim,Segmented,SegButton,Toggle,Dot,DropdownButton,DropdownList,RunButton,Pane,PaneHead,IconButton,Gutter,AnimBar,AnimButton, written with standard attributes (layout = row,gap,padding,radius,border,hover/disabledstates,transition) andlight dark(a, b)colour constants; theme comes fromcolor-schemeset on the root.editor/page.salam: the page block uses the components,layout = flowon the highlighter and output panes,font:for the face,layout = gridwithrows = fr(1)for the split. The three seg groups use onedata-valueattribute;app.salamreads that.tools/js/test-editor-page.jsplus a step in the editor Build job: runs the built page under jsdom, checks every control exists and that language, theme, auto-run, examples list, mobile menu and mode buttons work with no script error.Raw CSS that remains (one
STATE_CSSstring), with reasons:.seg-btn.active,.toggle.on,.icon-btn.copied,.dropdown.open,.gutter.dragging,.anim-btn.on,.anim-bar.raw,.status.*,.output.error/codeview,body.menu-open): page state and the editor script do not share state yet, so a styleifcannot read it..hltokens,.output.xml/ir/clangtokens,.dd-*,.ac-item,.ln-rowand its::beforemarkers): descendant selectors on generated text,::beforehas no standard form.mask-imageon.logo-mark,.icon-mark): no standard property.main.splitcustom properties--col-aand--row-aset by the drag handler.@media (max-width: 1024px)mobile menu and@media (max-width: 900px)stacked split, andmin-width: 1025pxmenu button: environment conditions inifare not in main yet (ui: style if review fixes, tab size and touch action properties #3563).tab-size,resize: none,overflow-wrap: anywhere,[dir=rtl]on the code layers,will-change: no standard property or attribute selector set from script.:rootcustom properties used only by the rules above, andcolor-schemeperdata-theme.Examples:
Segmented+SegButton: value = "fa" text = "فارسی" views = false only = "" endreplaces hand written buttons;IconButton: name = "copy-out" endreplaces two 12-line blocks.Tested: built with a current compiler, screenshots with headless chromium (desktop light and dark, fa with the examples list open, 420 px mobile menu open) compared to the old look; jsdom control test passes; the page also builds with the older h and n4 binaries. Not tested here: the wasm compile path (no emscripten on this box), so Run output is checked by the CI Build job.