Repository navigation
Chart transitions: updateChart() never applied the buffer, and the package had no prose - #5830
Conversation
β¦g documented the package SeriesTransition.updateChart() is documented as animateChart() with a duration of 0 and was a bare chart.repaint(). The buffer was never read, so every value written into it was discarded by the next initTransition() and the series kept the numbers it already had -- silently: no exception, no log, a chart that simply did not change. It now runs the three steps the animation reaches through, back to back: initTransition(), update(100), cleanup(). The regression test fails against the old body with 'expected: <5.0> but was: <1.0>'. com.codename1.charts.transitions had no prose in the guide at all, so the charts chapter now explains what the buffer means -- the shape to end at, every point of it, not a delta -- and shows both entry points.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
βΉοΈ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with π while any review is running, comments if it has suggestions, and reacts with π once all reviews finish with no findings. |
There was a problem hiding this comment.
π‘ Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7dee5216c2
βΉοΈ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with π.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
β¦eplaces updateChart() on a transition animateChart() had already registered left it registered, and its own initTransition() restarted the motion. The next frame therefore ran update() at a low progress against start values captured a moment earlier, walking the series back off the numbers the caller had just asked for -- so an immediate update issued during an animation was undone and replayed as one. Deregister first, latch finished after applying, so a frame already queued behind the call finds the transition complete and returns false instead of moving anything. The regression test fails against the previous body with 'the transition is still animating'.
β Continuous Quality ReportTest & Coverage
Static Analysis
Generated automatically by the PR CI workflow. |
There was a problem hiding this comment.
π‘ Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4753689852
βΉοΈ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with π.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Developer Guide build artifacts are available for download from this workflow run:
Developer Guide quality checks: |
Cloudflare Preview
|
|
Compared 151 screenshots: 151 matched. Native Android coverage
β Native Android screenshot tests passed. Native Android coverage
Benchmark ResultsDetailed Performance Metrics
|
a5a0cf2 to
4753689
Compare
There was a problem hiding this comment.
π‘ Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a5a0cf2b45
βΉοΈ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with π.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Compared 181 screenshots: 181 matched. |
|
Compared 160 screenshots: 160 matched. Benchmark Results
Detailed Performance Metrics
|
The buffer is created lazily by getBuffer(), so initTransition() read a null cachedSeries and threw. animateChart() has always done that; the previous commit gave updateChart() the same lifecycle and so the same crash, on a call that used to be a harmless repaint. Reading through getBuffer() fixes both: an empty buffer copies no values, the tween has nothing to move, and the series is left exactly as it is -- which is what 'apply no pending changes' should mean.
There was a problem hiding this comment.
π‘ Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2de27de0a2
βΉοΈ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with π.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
updateChart() ends the transition itself, and a frame already queued behind it reaches animate()'s terminal branch -- so cleanup() ran twice for one pass. The built-ins only clear a buffer, but the method is overridable and a subclass can release something or fire a completion effect in it. A flag reset by initTransition() makes it once per pass, whichever route out gets there first. The test counts the calls and reports 2 against the previous body.
The gate only asks for one on a file a change adds or modifies, so an untouched sibling keeps going without it -- which is why this surfaced now rather than when the file was written.
|
Compared 217 screenshots: 217 matched. |
|
Compared 149 screenshots: 149 matched. Benchmark Results
Build and Run Timing
Detailed Performance Metrics
|
|
Compared 144 screenshots: 144 matched. |
|
Compared 148 screenshots: 148 matched. Benchmark Results
Detailed Performance Metrics
|
Two things, one package.
The bug.
SeriesTransition.updateChart()is documented asanimateChart()with a duration of 0. Its whole body waschart.repaint(). Values written into the transition buffer weretherefore never read -- the next
initTransition()discarded them --and the series kept the numbers it already had. Nothing threw and
nothing was logged; the chart just did not change. It now runs the
three steps the animated path reaches through the animation, back to
back:
initTransition(),update(100),cleanup(). Draining thebuffer at the end leaves the transition in the state an animation would
have left it in, so it can be reused either way.
XYTransitionsTest.updateChartAppliesTheBufferWithoutAnimatingwas runagainst the old body first and fails there with
expected: <5.0> but was: <1.0>; the existingupdateChartForcesRepaintstill passes, since the repaint is stillthere.
The prose.
com.codename1.charts.transitionswas not mentionedanywhere in the developer guide. The charts chapter now explains the
buffer -- the shape to end at, every point of it, rather than a delta,
which is the part that is easy to get wrong -- along with easing,
duration, and both entry points.