Skip to content

codelessly_sdk 7.1.0: render badge, chip and segmented button nodes - #61

Merged
rayliverified merged 1 commit into
masterfrom
claude/hopeful-brown-c8o8x7
Oct 13, 2026
Merged

rayliverified merged 1 commit into
masterfrom
claude/hopeful-brown-c8o8x7

Conversation

@rayliverified

Copy link
Copy Markdown
Contributor

Adds passive transformers for the new codelessly_api 5.1.0 nodes.

Changes

  • Badge: builds Flutter's Badge.
    • It wraps the node named by childID.
    • When that node is missing, the badge shows on its own at its alignment.
  • Chip: builds the matching widget for each chip type (basic, action, choice, filter, input).
    • Presses and the input chip's delete icon fire click.
    • Selecting a choice or filter chip sets selected, then fires changed and click with the new value.
  • SegmentedButton: builds SegmentedButton<String> and reads and writes selected.
    • The branch wrote selectedSegments but read selected; that bug is fixed.
    • Selections Flutter would assert on are cleaned up first.
    • An empty segment list renders an empty box.
  • All three transformers are registered in PassiveNodeTransformerManager.
  • The widget constructors CodelesslyEditor calls are unchanged.
  • Version 7.1.0, now depending on codelessly_api: ^5.1.0.

Testing

  • smoke_test pumps every badge, chip and segmented button variant, and checks that taps fire their reactions.
  • All three nodes are added to transformers_test.
  • flutter test: 49/49 pass. Analyze and format are clean.
  • flutter build web --wasm of example/ succeeds.
  • CodelesslyEditor builds for web against this branch, and its widget library shows the new chip widgets.

Merge and publish after the CodelesslyAPI 5.1.0 PR. CI resolves codelessly_api from pub.dev, so it will fail until 5.1.0 is published.

🤖 Generated with Claude Code

https://claude.ai/code/session_01A67XoQYsLVvoMtiKcXXUxY


Generated by Claude Code

Port the badge, chip and segmented button transformers from the
unmerged migrate-json-serializable branch onto SDK 7 and codelessly_api
5.1.0, and register them with PassiveNodeTransformerManager.

- Badge: Material 3 Badge as a dot, label or count (capped at
  maxCount), wrapping the node named by childID when it exists; label
  and visibility can be bound; click reactions handled by the manager.
- Chip: Chip, ActionChip, ChoiceChip, FilterChip or InputChip; presses
  fire click, selection updates `selected` and fires changed and click.
- SegmentedButton<String>: selection updates `selected` (the branch
  read and wrote different properties) and fires changed; selections
  Flutter would assert on are sanitized. Previews keep local state.

Add smoke tests for every badge/chip type and segmented button
configuration, including reactions firing on selection.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A67XoQYsLVvoMtiKcXXUxY

Copy link
Copy Markdown
Contributor Author

check fails at flutter pub get: codelessly_sdk depends on codelessly_api ^5.1.0 which doesn't match any versions. 5.1.0 is the release added in Codelessly/CodelesslyAPI#35 and isn't on pub.dev yet. No fix is possible from this PR: lowering the constraint to ^5.0.0 would break the build, because the new transformers need the 5.1.0 nodes.

Locally, against the API branch, flutter test passes 49/49 and flutter analyze is clean. Once codelessly_api 5.1.0 is published, re-run this check; it should go green with no code changes.


Generated by Claude Code

@rayliverified
rayliverified merged commit ded583e into master Oct 13, 2026
0 of 3 checks passed
rayliverified added a commit that referenced this pull request Oct 13, 2026
)

Port the badge, chip and segmented button transformers from the
unmerged migrate-json-serializable branch onto SDK 7 and codelessly_api
5.1.0, and register them with PassiveNodeTransformerManager.

- Badge: Material 3 Badge as a dot, label or count (capped at
  maxCount), wrapping the node named by childID when it exists; label
  and visibility can be bound; click reactions handled by the manager.
- Chip: Chip, ActionChip, ChoiceChip, FilterChip or InputChip; presses
  fire click, selection updates `selected` and fires changed and click.
- SegmentedButton<String>: selection updates `selected` (the branch
  read and wrote different properties) and fires changed; selections
  Flutter would assert on are sanitized. Previews keep local state.

Add smoke tests for every badge/chip type and segmented button
configuration, including reactions firing on selection.
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.

2 participants