Skip to content

Formulas, runtime style bindings, show toast, and screen reader names - #71

Merged
rayliverified merged 7 commits into
masterfrom
claude/project-thread-1mdfl3
Oct 19, 2026
Merged

rayliverified merged 7 commits into
masterfrom
claude/project-thread-1mdfl3

Conversation

@rayliverified

Copy link
Copy Markdown
Contributor

Requested by Ray · project thread

Before: text and action values could only insert variables, not compute anything (no prices, totals or plurals). Fill, opacity and size couldn't follow variables. Apps couldn't show a confirmation message. Screen readers announced tappable frames and icon buttons as nothing at all, and offered a long press that did nothing.

After:

  • ${= expression} formulas work in any text, bound property, condition or action value, e.g. ${= money(sum(storage.cart, 'total'))}. A value that is exactly one formula keeps its type, lists and maps included.
  • Fill, stroke, opacity, width and height follow bound formulas at runtime.
  • The show toast action shows a message near the bottom of the app.
  • A tappable node reads as a button. One without text is named after its node, or its icon when the node keeps a default name.

How:

  • A small expression parser and evaluator, plus style overrides applied before each node builds.
  • An overlay-based toast.
  • MergeSemantics + Semantics(button: true) around tappable nodes. Long press is registered only when a long-press action exists.
  • Tests: formula_test, style_overrides_test, toast_test and semantics_test.

Known issues: pubspec.yaml and example/pubspec.yaml temporarily override codelessly_api with the branch of Codelessly/CodelesslyAPI#37, which adds the toast action. Remove the override once that API release is published.


Generated by Claude Code

Formulas compute values in text, bound properties, conditions and action
values. Fill, stroke, opacity, width and height follow conditions, bound
variables and set value actions.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YaHo5D7kD3eWcagvzh3o3K
…tes safely

A list or map value written as JSON is substituted value by value, so text
with quotes can't break it and a value that is exactly one formula or path
keeps its type. A text node's fill sets its color at runtime.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YaHo5D7kD3eWcagvzh3o3K
A setStorage or setVariable value of `${= item}` now stores the item's map
(or list) instead of its text.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YaHo5D7kD3eWcagvzh3o3K
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YaHo5D7kD3eWcagvzh3o3K
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YaHo5D7kD3eWcagvzh3o3K
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YaHo5D7kD3eWcagvzh3o3K
@rayliverified rayliverified self-assigned this Oct 19, 2026
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YaHo5D7kD3eWcagvzh3o3K
@rayliverified
rayliverified merged commit fee5756 into master Oct 19, 2026
2 checks passed
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