-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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(product-analytics): Hide filtering by dashboard if there are none #19530
fix(product-analytics): Hide filtering by dashboard if there are none #19530
Conversation
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.
Hi @baristaGeek, thank you very much for your contribution!
Peeking into this PR it looks like all filters are hidden when there are no dashboards. It would be great to only hide the dashboards filter in this case.
It seems you also made some changes to the persons dropdown. Would you mind moving this to a separate PR or at least explaining the changes there?
@thmsobrmlr gotcha! I'll do the change and re-run the tests later today. Regarding the change in the selector, it's probably like that because I mixed up something. |
I made the update to only hide the dashboards selector. Please lmk what you think |
…ropdown-if-dashboard-count-is-0
…ropdown-if-dashboard-count-is-0
…ropdown-if-dashboard-count-is-0
…PostHog#19530) * Add conditional rendering based on the length of the sorted dashboards array * Add conditional rendering to dashboard selection * Only hide the dashboards filter --------- Co-authored-by: Michael Matloka <[email protected]>
Problem
If there are no dashboards, users can select from an empty list: #19519
Changes
I added a conditional render to fix this. This is how it looks:
noDashboardsSelector8MBs.mov
👉 Stay up-to-date with PostHog coding conventions for a smoother review.
How did you test this code?
Other than manually testing on my local env, I ran the tests for scenes/insights and everything seems to be fine: