Skip to content

Avoid rendering clientside no_update outputs - #4175

Open
FistOfMight wants to merge 2 commits into
plotly:devfrom
FistOfMight:fix/clientside-no-update-renders
Open

FistOfMight wants to merge 2 commits into
plotly:devfrom
FistOfMight:fix/clientside-no-update-renders

Conversation

@FistOfMight

Copy link
Copy Markdown

Fixes #4173.

Clientside no_update currently leaves an empty result entry for each skipped component. Applying that entry dispatches an empty property update, increments its layout hash and can render it despite all output values being unchanged.

Create a result entry only for a value that is not no_update. This matches the server-side omission of skipped components and preserves grouping when another property on the same component does update. Callback/loading bookkeeping is unchanged.

Validation:

  • Five render regressions fail before the fix and pass after rebuilding the renderer: single output, mixed outputs, an array of skipped outputs, one sentinel for multiple outputs, and pattern-matching outputs.
  • A sixth test verifies alternating actual/skipped updates to two properties on the same component.
  • New tests plus existing multiple-output sentinel and outputs_list tests: 11 passed.
  • Full renderer Karma suite in headless Chrome: 126 passed.
  • Renderer development and production bundles build successfully.
  • ESLint, Prettier and Python test lint/format checks pass. tsc --noEmit --skipLibCheck passes; plain tsc --noEmit encounters an existing missing react-dom declaration in the installed dependency tree.

Additional Python unit sweep: 742 passed across the initial run and a follow-up for three files after installing a missing test dependency; six skipped. The unrelated Firefox browser smoke test could not start in this environment, so the full Python unit sweep is not entirely green.

The skipped value remains unchanged, and the reproduction does not show downstream callbacks firing, remounts or a skipped Graph calling Plotly.react. This is a performance defect. Runtime probes reproduce it on 4.1.0, 4.5.0 and 4.5.1.

Contributor Checklist

  • Targets dev as a bug fix.
  • Omit result entries for skipped components.
  • Add and run regression tests and same-component update coverage.
  • Add a changelog entry.

@sonarqubecloud

Copy link
Copy Markdown

@FistOfMight
FistOfMight marked this pull request as ready for review November 23, 2026 14:40
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.

Clientside no_update dispatches empty props updates and unnecessarily renders skipped components

1 participant