Skip to content

editor: page on the standard style vocabulary, components, page controls test - #3573

Merged
BaseMax merged 10 commits into
mainfrom
fix/editor
Nov 17, 2026
Merged

BaseMax merged 10 commits into
mainfrom
fix/editor

Conversation

@BaseMax

@BaseMax BaseMax commented Nov 17, 2026

Copy link
Copy Markdown
Member

The playground page was one 27 KB raw style: string written for browser defaults. The standard base sheet (all elements display: 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): components Toolbar, 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/disabled states, transition) and light dark(a, b) colour constants; theme comes from color-scheme set on the root.
  • editor/page.salam: the page block uses the components, layout = flow on the highlighter and output panes, font: for the face, layout = grid with rows = fr(1) for the split. The three seg groups use one data-value attribute; app.salam reads that.
  • tools/js/test-editor-page.js plus 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_CSS string), with reasons:

  • classes the script toggles (.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 style if cannot read it.
  • markup injected with SetHtml (.hl tokens, .output.xml/ir/clang tokens, .dd-*, .ac-item, .ln-row and its ::before markers): descendant selectors on generated text, ::before has no standard form.
  • mask icons (mask-image on .logo-mark, .icon-mark): no standard property.
  • main.split custom properties --col-a and --row-a set by the drag handler.
  • @media (max-width: 1024px) mobile menu and @media (max-width: 900px) stacked split, and min-width: 1025px menu button: environment conditions in if are 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.
  • :root custom properties used only by the rules above, and color-scheme per data-theme.

Examples: Segmented + SegButton: value = "fa" text = "فارسی" views = false only = "" end replaces hand written buttons; IconButton: name = "copy-out" end replaces 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.

@BaseMax
BaseMax requested a review from a team as a code owner November 17, 2026 11:36
@coderabbitai

coderabbitai Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You'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.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e0837e91-d010-40c2-a3c2-f84b0eacdebc
Commits

Reviewing files that changed from the base of the PR and between c9a534d and 874600c.

Files selected for processing: 7

  • .github/workflows/editor-playground-build.yml
  • .gitignore
  • editor/README.md
  • editor/app.salam
  • editor/page.salam
  • editor/ui.salam
  • tools/js/test-editor-page.js
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

@deepsource-io

deepsource-io Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

DeepSource Code Review

We reviewed changes in c9a534d...874600c on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.

See full review on DeepSource ↗

PR Report Card

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant