-
Notifications
You must be signed in to change notification settings - Fork 0
feat(check): allow a number-typed template hole as a pixel arbitrary value #80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| { | ||
| "schema": "weaver.capture.actions.v1", | ||
| "actions": [ | ||
| { "action": "click", "target": { "role": "button", "name": "Log" } }, | ||
| { "action": "click", "target": { "role": "button", "name": "Log" } }, | ||
| { "action": "click", "target": { "role": "button", "name": "Log" } } | ||
| ] | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| { | ||
| "compilerOptions": { | ||
| "target": "ES2020", | ||
| "module": "ESNext", | ||
| "moduleResolution": "Bundler", | ||
| "strict": true, | ||
| "noEmit": true, | ||
| "skipLibCheck": true, | ||
| "jsx": "react-jsx", | ||
| "jsxImportSource": "@weaver/sdk", | ||
| "types": [], | ||
| "baseUrl": ".", | ||
| "paths": { | ||
| "@weaver/sdk": ["../../../sdk/index.d.ts"], | ||
| "@weaver/sdk/jsx-runtime": ["../../../sdk/jsx-runtime.d.ts"] | ||
| } | ||
| }, | ||
| "include": ["widget.tsx"] | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| import { useState, widget } from "@weaver/sdk"; | ||
|
|
||
| // Capture smoke fixture: a progress fill whose width is a number-typed | ||
| // template hole, `w-[${px}px]`. weaver check validates the utility statically; | ||
| // the runtime class compiler validates the number on every change. Three | ||
| // clicks on "Log" move the fill from 0 to 42 logical pixels. | ||
| export default widget({ name: "Class Hole", size: [200, 72] }, () => { | ||
| const [sessions, setSessions] = useState(0); | ||
| return ( | ||
| <column class="p-3 gap-2 bg-[#11141c]"> | ||
| <row class="w-full h-[8px] rounded-full bg-[#ffffff]/10"> | ||
| <stack class={`w-[${sessions * 14}px] h-full rounded-full bg-[#5eead4]`} /> | ||
| </row> | ||
| <button accessibilityLabel="Log" class="h-[24px] rounded-[6px] bg-[#5eead4]" onPress={() => setSessions((count) => count + 1)}> | ||
| <text class="text-[11px]">Log</text> | ||
| </button> | ||
| </column> | ||
| ); | ||
| }); | ||
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The capture fixture that is meant to prove
w-[${sessions * 14}px]updates after interaction does not render on the available Linux null backend. Both the baseline capture and the three-click capture fail withUnsupportedViewKindbefore emitting a frame or accessibility snapshot, so the expected 0px-to-42px width transition is not covered by an executable regression check in this environment.