Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] dev from plotly:dev #280

Merged
merged 7 commits into from
Dec 11, 2024
Merged

[pull] dev from plotly:dev #280

merged 7 commits into from
Dec 11, 2024

Conversation

pull[bot]
Copy link

@pull pull bot commented Dec 11, 2024

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.1)

Can you help keep this open source service alive? 💖 Please sponsor : )

Summary by Sourcery

Fix the unresponsiveness of the Graph component when an invalid figure is passed and add a test to ensure correct behavior when toggling figures.

Bug Fixes:

  • Fix the Graph component becoming unresponsive when an invalid figure is passed.

Tests:

  • Add a test to verify the Graph component's behavior when toggling between valid and invalid figures.

Yuva and others added 7 commits December 10, 2024 11:49
This file specifies the coding styles for different file types and ensures consistent formatting across your project.
Bugfix: Graph component becomes unresponsive if an invalid figure is passed
@pull pull bot added the ⤵️ pull label Dec 11, 2024
Copy link

sourcery-ai bot commented Dec 11, 2024

Reviewer's Guide by Sourcery

This PR implements a fix for the Graph component's handling of invalid figures and adds corresponding test coverage. The main change involves adding null-safe property access in the Graph component and a new test case that verifies the component's behavior when toggling between valid and invalid figures.

No diagrams generated as the changes look simple and do not need a visual representation.

File-Level Changes

Change Details Files
Added null-safety checks in the Graph component's figure handling
  • Added optional chaining for figure.data, figure.layout, and figure.frames properties
  • Ensures the component remains responsive when figure is null or invalid
components/dash-core-components/src/fragments/Graph.react.js
Added integration test for Graph component with invalid figures
  • Created test case that toggles between valid and empty figures
  • Verifies graph title presence/absence based on figure validity
  • Ensures no console errors are generated during figure transitions
components/dash-core-components/tests/integration/graph/test_graph_basics.py
Updated changelog to document the Graph component fix CHANGELOG.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time. You can also use
    this command to specify where the summary should be inserted.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@pull pull bot merged commit 7ba267b into admariner:dev Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants