-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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
Avoid fetch fav dashboard stat not logged in #8527
Avoid fetch fav dashboard stat not logged in #8527
Conversation
Codecov Report
@@ Coverage Diff @@
## master #8527 +/- ##
==========================================
- Coverage 66.68% 66.67% -0.01%
==========================================
Files 449 449
Lines 22687 22698 +11
Branches 2366 2368 +2
==========================================
+ Hits 15128 15135 +7
- Misses 7421 7425 +4
Partials 138 138
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, thanks for adding tests too!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 🎉
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue |
nudge to @dpgaspar, @mistercrunch, and @craig-rueda that this appears ready for merge. |
CATEGORY
Choose one
SUMMARY
As explained in #8501, if you allow non logged in users to see dashboards, the favorite status of that dashboard will still be fetched, causing an error toast to appear.
To fix it I check if the userId present on the dashboardInfo prop of the Header component is valid, and only if it is, the span related to the fav-star is rendered.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TEST PLAN
There's already a test that verifies if the fav-start is displayed and works correctly
ADDITIONAL INFORMATION
REVIEWERS