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

fix(dashboards): Fixed add widget from discover to new dashboard not creating widget #28827

Merged
merged 3 commits into from
Sep 27, 2021

Conversation

edwardgou-sentry
Copy link
Contributor

@edwardgou-sentry edwardgou-sentry commented Sep 24, 2021

Clicking Add Widget on a saved query from the discover landing page and selecting Create New Dashboard does not add the widget to the create dashboard view. This pr fixes that bug.

Updated the create view to use useState and added newWidget handling to dashboard componentDidUpdate as well.

@edwardgou-sentry edwardgou-sentry requested a review from a team September 24, 2021 15:24
Copy link
Member

@shruthilayaj shruthilayaj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know what caused the regression? Should we add tests too?

@edwardgou-sentry
Copy link
Contributor Author

Do you know what caused the regression? Should we add tests too?

Hey Shruthi, added tests! Not sure exactly what caused the regression but the code to create the new widget from the query parameters was a little fragile. I've updated the componentDidUpdate and componentOnMount to be more robust.

@edwardgou-sentry edwardgou-sentry merged commit b5c5a98 into master Sep 27, 2021
@edwardgou-sentry edwardgou-sentry deleted the fix/saved-query-add-widget-new-dashboard branch September 27, 2021 15:56
vuluongj20 pushed a commit that referenced this pull request Sep 30, 2021
…creating widget (#28827)

Fixed add widget from discover to new dashboard not creating widget
@github-actions github-actions bot locked and limited conversation to collaborators Oct 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants