Skip to content

feat: Allow directly creating dashboard template from table #30855

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

I-Dont-Remember
Copy link

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:

  • Read through all the entries in table
  • Decide on one and click the row name to create it

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.

screenshot-posthog-clickable-template-name

Does this work well for both Cloud and self-hosted?

How did you test this code?

  • Ran the app locally (see screenshot). Created a new dashboard in the local environment by using the new button.
  • Tried to run all the relevant frontend tests - though it feels like Developing Locally doc might be out of date, because pnpm 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:
> pnpm --filter frontend test
....
Test Suites: 157 passed, 157 total
Tests:       3 skipped, 1670 passed, 1673 total
Snapshots:   76 passed, 76 total
Time:        354.551 s
Ran all test suites matching /(frontend\/|products\/|common\/)/i.

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

This change updates the DashboardTemplatesTable component to enable direct dashboard creation by making the template name a clickable link. It streamlines the user experience by integrating newDashboardLogic for creating dashboards without extra clicks.

  • Updated /frontend/src/scenes/dashboard/dashboards/templates/DashboardTemplatesTable.tsx to render template names as clickable LemonTableLink components.
  • Invokes createDashboardFromTemplate with appropriate template details and variables.
  • Integrates seamlessly with newDashboardLogic while preserving permissions and existing state management.

💡 (1/5) You can manually trigger the bot by mentioning @greptileai in a comment!

1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile

@posthog-bot
Copy link
Contributor

This PR hasn't seen activity in a week! Should it be merged, closed, or further worked on? If you want to keep it open, post a comment or remove the stale label – otherwise this will be closed in another week. If you want to permanentely keep it open, use the waiting label.

@I-Dont-Remember
Copy link
Author

Bumping to keep from closing

@posthog-bot posthog-bot removed the stale label Apr 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants