Skip to content

feat(site): dismiss health section warnings #11059

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

Merged
merged 9 commits into from
Dec 6, 2023

Conversation

BrunoQuaresma
Copy link
Collaborator

Screen.Recording.2023-12-06.at.10.05.05.mov

@BrunoQuaresma BrunoQuaresma requested review from Parkreiner and a team December 6, 2023 13:07
@BrunoQuaresma BrunoQuaresma self-assigned this Dec 6, 2023
Copy link
Member

@Parkreiner Parkreiner left a comment

Choose a reason for hiding this comment

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

Looks good! Just had a question about how we had the enabled/dismiss mutations set up

const queryClient = useQueryClient();
const healthSettingsQuery = useQuery(healthSettings());
// They call the same mutation but are used in diff contexts so we don't want
// to merge their states
Copy link
Member

Choose a reason for hiding this comment

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

What edge cases were you running into by having just one mutation? I trust you, but I'm just curious, since the output looks so similar across each of the if branches

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Updated the comments to include a use case:

They call the same mutation but are used in diff contexts so we don't want
to merge their states. Eg. You dismiss a warning and when it is done it
will show the enable button but since the mutation is still invalidating
other queries it will be in the loading state when it should be idle.

@BrunoQuaresma BrunoQuaresma merged commit 44f9613 into main Dec 6, 2023
@BrunoQuaresma BrunoQuaresma deleted the bq/add-dismissable-warning branch December 6, 2023 15:50
@github-actions github-actions bot locked and limited conversation to collaborators Dec 6, 2023
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.

2 participants