feat: Allow directly creating dashboard template from table #30855
+16
−4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Allow users to create new dashboard template direct from table, not just the
New
modal, which can take more clicks.This is a UX suggestion - since it was so small I didn't raise an Issue first, so feel free to close if it doesn't fit with ya'lls product goals.
Problem
As a user of Posthog, I was confused when I wasn't able to interact and create a new Dashboard directly from a template in the list - I had to first decide which one I liked, and then open up the
New Dashboard
modal, search for the one I wanted, and then click it. There was more friction than I had hoped.My ideal flow as a user would be:
Changes
👉 Stay up-to-date with PostHog coding conventions for a smoother review.
Updated the table of Dashboard template options so that the name is a clickable button (which creates a new dashboard with that template, same as choosing from modal) rather than just text string.
Does this work well for both Cloud and self-hosted?
How did you test this code?
Developing Locally
doc might be out of date, becausepnpm test:unit
doesn't seem to be a valid command - or my setup is wonky. Went with what I hoped was close to same level of coverage: