Skip to content

codelessly_sdk 8.3.0: computed variables, new formula functions, gauges, sheet dialogs, text field fixes - #76

Merged
BuildCodelessly merged 10 commits into
masterfrom
claude/happy-shannon-8ze4t7
Oct 24, 2026
Merged

BuildCodelessly merged 10 commits into
masterfrom
claude/happy-shannon-8ze4t7

Conversation

@BuildCodelessly

Copy link
Copy Markdown
Contributor

Summary

Runtime changes found by rebuilding a coded reference app (an equipment rental yard) in the editor. Released as 8.3.0 (version bump and CHANGELOG are included). Requires codelessly_api 6.2.0 (Codelessly/CodelesslyAPI PR, same branch name).

  • Computed variables: a variable whose value is a ${= ...} formula is evaluated when read. Bound widgets update when the variables it uses change, and cycles resolve to null.
  • Formula functions: obj, set, merge, keys, values, range, slice, first, last, concat, indexOf, daysInMonth, padLeft, padRight, substring, split, replace, coalesce, formatNumber, matches (regex). money takes a digit count.
  • URL query parameters are part of route on the web (${route.date}).
  • Rendering:
    • Repeating linear gradients (RepeatingGradientTransform).
    • Arc progress bars with ticks, needle and zone bands (ArcProgressPainter).
    • Dialog canvases open as bottom sheets, adaptively, or aligned to a side or corner.
  • Text fields:
    • obscureText, enabled and readOnly follow bindings.
    • A one-line field with a set height stays one line. It used to expand to multi-line, which silently disabled password obscuring and made Enter insert a newline.
    • Prefix and suffix icon constraints apply when set.
  • Delay actions wait as long as their duration formula says.
  • Fix: an API document without a directory no longer fails the API list.

Tests: formula_maps_text_test, formula_matches_test, computed_variables_test, route_url_query_test, gradient_repeat_test, progress_arc_test, dialog_presentation_test, text_field_bindings_test, delay_duration_test. Locally all 676 tests pass, and flutter analyze and dart format are clean.

Known Issues

  • CI will fail at flutter pub get until codelessly_api 6.2.0 is on pub.dev. CI resolves the API from pub, not from a path. Re-run CI after publishing 6.2.0.

Merge order: the CodelesslyAPI PR, then publish 6.2.0, then this PR, then publish 8.3.0, then the CodelesslyEditor PR.


Generated by Claude Code

- A variable whose value is a ${= ...} formula is computed: reads
  evaluate it against the other variables, and nodes bound to it rebuild
  when the variables it reads change.
- Formulas: obj, set, merge, keys, values (formulas have no {} literals,
  so these build and update maps, e.g. one item of a list via map + set),
  range, slice, first, last, concat, indexOf, padLeft, padRight,
  substring, split, replace, coalesce, daysInMonth.
- On the web, the page URL's query parameters are in route, so a
  published site can link to a state (?date=...); navigation params win.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011fXBKiHRftTsgsVPHEZAWz
RepeatingGradientTransform squeezes one run of the stops into the period
along the gradient's axis, then rotates like GradientRotation; with
TileMode.repeated the stops repeat every N px whatever the box size.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011fXBKiHRftTsgsVPHEZAWz
ArcProgressPainter draws the track, zone bands, progress, ticks and a
needle that overshoots slightly past the max, fitted to the box, with
the bound currentValue and progressColor. HttpApiData.directory defaults
to the root folder instead of throwing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011fXBKiHRftTsgsVPHEZAWz
presentCanvas shows a canvas as a dialog at an alignment (e.g. a menu at
the top right) or as a modal bottom sheet; adaptive picks the sheet below
600 px wide, as phones expect.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011fXBKiHRftTsgsVPHEZAWz
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011fXBKiHRftTsgsVPHEZAWz
…ches()

- obscureText, enabled and readOnly follow variables, conditions and
  set-property actions, so a show-password toggle works.
- A one-line text field with a set height stayed multi-line (expands),
  which silently turned off obscuring and made Enter insert a newline.
  It now stays one line and fills its height through its decoration.
- Prefix and suffix icon constraints apply when set.
- New formula function matches(text, pattern) for regular expressions.

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

Copy link
Copy Markdown
Contributor Author

CI check fails at flutter pub get: codelessly_sdk depends on codelessly_api ^6.2.0 which doesn't match any versions. Nothing in this PR's code is broken. This PR needs codelessly_api 6.2.0 (Codelessly/CodelesslyAPI#41), which isn't on pub.dev yet. There's no fix to port; it clears once 6.2.0 is published, and then CI needs one re-run.

Locally, with the API as a path dependency: 676 tests pass, and flutter analyze and dart format are clean.


Generated by Claude Code

Master added computed variables and many of the same formula functions
in parallel. Keeps master's implementation of computed variables, route
link parameters and the duplicate functions (first, last, slice, range,
indexOf, merge, set, keys, values); keeps this branch's functions master
lacks, its rendering, text field and delay changes. Drops the URL query
test that master's link parameters replace, and fixes two quote lints in
master's formula_math_test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011fXBKiHRftTsgsVPHEZAWz
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