Skip to content

Commit 94c520c

Browse files
sean-parentclaude
andcommitted
fix(begin): add SpTextfield id prop, versions.toml version note, workspace default-members
- Add `id: String` prop to `SpTextfield` and emit `"id": "{id}"` so the DOM `for`/`id` link between `SpFieldLabel` and `SpTextfield` is live. - Pass `id: field_id` in `inspector.rs` (`SpFieldLabel` keeps `.clone()` as the first use; `SpTextfield` moves the value as the second use). - Add comment to `versions.toml` noting 0.45.4 does not exist on npm so future maintainers don't revert to a non-existent version. - Add `default-members` to root `Cargo.toml` excluding `xtask` from `cargo build --workspace` / `cargo test --workspace` default targets. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 9c64e5f commit 94c520c

4 files changed

Lines changed: 12 additions & 0 deletions

File tree

Cargo.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,13 @@ members = [
2828
"begin",
2929
"xtask",
3030
]
31+
default-members = [
32+
"cel-runtime",
33+
"cel-parser",
34+
"cel-rs-macros",
35+
"property-model",
36+
"begin",
37+
]
3138

3239
[lib]
3340
name = "cel_rs"

begin/assets/versions.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ url = "https://cdn.jsdelivr.net/npm/d3@7.9.0/dist/d3.min.js"
44
file = "d3.v7.min.js"
55

66
[spectrum-web-components]
7+
# 0.45.4 does not exist on npm; 0.45.0 is the latest 0.45.x release.
8+
# URL uses esm.sh bundled endpoint for a self-contained single-file ESM bundle.
79
version = "0.45.0"
810
url = "https://esm.sh/@spectrum-web-components/bundle@0.45.0/es2022/elements.bundle.mjs"
911
file = "swc.js"

begin/src/inspector.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ fn CellRow(id: CellId, sheet: Signal<Sheet>, labels: Signal<Labels>) -> Element
6868
style: "margin-bottom: 8px;",
6969
SpFieldLabel { for_: field_id.clone(), "{label}" }
7070
SpTextfield {
71+
id: field_id,
7172
value: input.read().clone(),
7273
invalid: *has_error.read(),
7374
oninput: move |e: FormEvent| {

begin/src/spectrum.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ pub fn SpTheme(color: String, scale: String, children: Element) -> Element {
3636
/// and `aria-invalid`).
3737
#[component]
3838
pub fn SpTextfield(
39+
id: String,
3940
value: String,
4041
invalid: bool,
4142
oninput: EventHandler<FormEvent>,
@@ -44,6 +45,7 @@ pub fn SpTextfield(
4445
) -> Element {
4546
rsx! {
4647
sp-textfield {
48+
"id": "{id}",
4749
"value": "{value}",
4850
// Boolean attribute: omit entirely when false; presence = invalid.
4951
"invalid": if invalid { "true" },

0 commit comments

Comments
 (0)