Skip to content

Gauge and chart nodes, computed variables, pulse, repeating gradients - #48

Open
BuildCodelessly wants to merge 13 commits into
masterfrom
claude/eager-lamport-ceal5j
Open

BuildCodelessly wants to merge 13 commits into
masterfrom
claude/eager-lamport-ceal5j

Conversation

@BuildCodelessly

Copy link
Copy Markdown
Contributor

Summary

Model changes found while recreating a factory-floor OEE dashboard ("Linewatch") in the editor. This PR is intended ONLY to add the nodes and model fields below. Rendering is in the matching SDK PR, and editor support is in the matching CodelesslyEditor PR.

  • gauge node (GaugeNode, GaugeProperties, GaugeZone)
    • A dial with a bindable value, zone bands, LED segments, ticks and labels.
    • Also a target notch, a needle with readout clearance, and value animation.
  • chart node (ChartNode, ChartProperties, ChartSeries, ChartReferenceLine)
    • Bar, line and timeline charts bound to a list through variables.data.
    • Series kinds bar / line / area / tick, with stacks, per-item colors, dashes, end dots and fill-between.
    • Reference lines, a bindable selectedIndex, and a changed trigger.
  • PaintModel.gradientTileMode: clamp, repeated or mirror, for stripes such as hazard tape.
  • BlendMixin.pulse (PulseModel): a looping opacity fade, for skeletons and blinking indicators. It defaults to null and is left out of JSON when unset.
  • Computed variables: VariableData.isComputed / isFormulaValue mark a variable whose value is a ${= ...} formula; getValue() returns null for it.
  • JSON leniency for hand- or tool-written node JSON:
    • Gauge and chart nodes read JSON without properties.
    • A grid delegate, scroll flags, and placeholder allowedTypes / deniedTypes default when left out.
    • A spacer reads JSON without its positioning mode, aspect lock and reactions.

The changelog has an Unreleased section.

Checks run locally (the same steps as CI):

  • build_runner: no generated-code diff
  • dart format: clean
  • dart analyze --fatal-infos: no issues
  • dart test: 305 tests pass
  • dart pub publish --dry-run: 0 warnings

Known Issues


Generated by Claude Code

GaugeNode draws a dial: bindable value, zones, segments, ticks, labels,
target notch and needle. ChartNode draws bar, line and timeline charts
from a bound list of items, with stacked or grouped bar series, lines,
areas with fill-between, ticks, reference lines and a bindable selected
index. PaintModel.gradientTileMode repeats or mirrors gradients, which
makes stripes from a short gradient with hard stops.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FeVQ6NCLHS9Vrfxhii4Mj8
VariableData.isComputed is true when the value is exactly ${= ...}. Type
sanitizing keeps the formula for every type, and getValue() returns null
for it: the runtime evaluates the formula.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FeVQ6NCLHS9Vrfxhii4Mj8
nodes.insertTree takes hand-written node JSON, which naturally leaves out
defaults; a list view without properties or isScrollable crashed. The
converter reads a missing properties map as defaults for every node, and
scroll flags, placeholder type lists and a grid's delegate get JSON
defaults.

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

Every other node defaults these; a hand-written or tool-written spacer
that left them out failed to load. Also regenerates VarianceNode for the
allowedTypes/deniedTypes defaults.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FeVQ6NCLHS9Vrfxhii4Mj8
BlendMixin.pulse (PulseModel: minOpacity, durationMillis), null by default
and left out of JSON when unset. For skeleton placeholders and blinking
alarm indicators.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FeVQ6NCLHS9Vrfxhii4Mj8
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FeVQ6NCLHS9Vrfxhii4Mj8
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FeVQ6NCLHS9Vrfxhii4Mj8
Icons are drawn from Google's icon set by base name and style, so a
filled icon named home_outlined pointed at an icon that doesn't exist
and drew nothing.

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