wip: explore face-centric vector network region model#644
Closed
softmarshmallow wants to merge 1 commit intocanaryfrom
Closed
wip: explore face-centric vector network region model#644softmarshmallow wants to merge 1 commit intocanaryfrom
softmarshmallow wants to merge 1 commit intocanaryfrom
Conversation
Add static rendering for HTML form controls (<input>, <button>, <textarea>, <select>, <fieldset>) in the htmlcss embed renderer. Widgets are detected during the collect phase, sized with intrinsic defaults during layout, and painted with generic platform chrome (Chromium-style neutral appearance) during the paint phase. Supported widget types: - TextField (text, password, email, search, url, tel, number) - Checkbox and Radio (checked/unchecked states) - PushButton (<button>, <input type=submit/reset/button>) - TextArea (with rows/cols sizing) - Menulist (<select> with dropdown caret) - SliderHorizontal (<input type=range>) - ColorWell (<input type=color>) The WidgetAppearance enum follows Chromium's ControlPart naming and is designed to evolve toward interactive rendering by adding transient state fields (focused, hovered, pressed) without structural refactoring.
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Exploratory PoC investigating a face-centric model for
VectorNetworkRegionwherefill_rule: FillRuleis replaced byfill_mask: u64— each loop owns one face, a bitmask marks which faces are filled, and fill rules become a codec at the import/export boundary.fill_mask_poc.rs— isolated test file with the proposed model, nesting tree computation, fill-rule encode/decode codec, and Skia renderingKey findings
Rendered outputs
fill_mask model (proposed) — concentric rings:

Current model — same scenarios (3 WRONG):

Current model — workaround with multi-region decomposition:

Complex scenarios — stress testing model boundaries:

Design direction
The exploration points toward a face-centric model where:
fill_ruleis removed from the core struct (becomes SVG/Figma import/export codec)face.fills = paint(no decomposition puzzle)See discussion thread for full analysis.
Test plan
cargo test -p cg --test fill_mask_poc— 10 tests pass (7 unit + 3 visual render)🤖 Generated with Claude Code