posthog icon indicating copy to clipboard operation
posthog copied to clipboard

feat(insights): Add edit button for dashboard filters

Open webjunkie opened this issue 1 year ago â€ĸ 11 comments

Problem

I read about some confusion that adjusting the filters saves the insight for everyone in the team immediately.

Changes

  • disable filters and put an edit button

Apr-25-2024 14-22-43

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

n/a

How did you test this code?

  • tbd

webjunkie avatar Apr 25 '24 08:04 webjunkie

📸 UI snapshots have been updated

4 snapshot changes in total. 0 added, 4 modified, 0 deleted:

  • chromium: 0 added, 4 modified, 0 deleted (diff for shard 1)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

posthog-bot avatar Apr 25 '24 09:04 posthog-bot

Size Change: +524 B (0%)

Total Size: 1.05 MB

â„šī¸ View Unchanged
Filename Size Change
frontend/dist/toolbar.js 1.05 MB +524 B (0%)

compressed-size-action

github-actions[bot] avatar Apr 25 '24 09:04 github-actions[bot]

📸 UI snapshots have been updated

1 snapshot changes in total. 0 added, 1 modified, 0 deleted:

  • chromium: 0 added, 1 modified, 0 deleted (diff for shard 2)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

posthog-bot avatar Apr 25 '24 09:04 posthog-bot

📸 UI snapshots have been updated

1 snapshot changes in total. 0 added, 1 modified, 0 deleted:

  • chromium: 0 added, 1 modified, 0 deleted (diff for shard 2)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

posthog-bot avatar Apr 25 '24 09:04 posthog-bot

@mariusandra and @Twixes is this something that would make sense?

webjunkie avatar Apr 25 '24 09:04 webjunkie

In general, improving this makes sense, but I'd change the flow here:

  • I expected that when I change the filters, the dashboard would update automatically, just not save each insight
  • Then I could press "save" to persist the changes, or "cancel" (or "reset") to reset them.

Is it easy to add a "soft apply" on filter change?

Also, do we want to show if any filters are applied? A visually easy way to do it would be a red notification bubble/dot with the number of filters inside.

2024-04-25 12 56 11

mariusandra avatar Apr 25 '24 10:04 mariusandra

Thanks for the input!

the dashboard would update automatically, just not save each insight

Yeah this soft apply or preview is exactly the problem.. we don't have it. It saves the whole dashboard and only this applies the filters to all insights and then you can recalculate them to see them. So even "hey let's update and then roll back" would mean that meanwhile someone else opening the dashboard somewhere else would see your changes.

Not sure what to make of it. Maybe we make all insights grey when you adjust the filters until you save or cancel? 🙈

A visually easy way to do it would be a red notification bubble

Good idea. And that also leads me to the realization that now with my change you don't see what this dashboard's filter and time is.

webjunkie avatar Apr 25 '24 11:04 webjunkie

New idea:

Show filters as disabled. Show insights as stale while editing filters.

Apr-25-2024 14-22-43

webjunkie avatar Apr 25 '24 12:04 webjunkie

📸 UI snapshots have been updated

1 snapshot changes in total. 0 added, 1 modified, 0 deleted:

  • chromium: 0 added, 1 modified, 0 deleted (diff for shard 1)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

posthog-bot avatar Apr 25 '24 12:04 posthog-bot

📸 UI snapshots have been updated

1 snapshot changes in total. 0 added, 1 modified, 0 deleted:

  • chromium: 0 added, 1 modified, 0 deleted (diff for shard 2)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

posthog-bot avatar Apr 29 '24 09:04 posthog-bot

📸 UI snapshots have been updated

1 snapshot changes in total. 0 added, 1 modified, 0 deleted:

  • chromium: 0 added, 1 modified, 0 deleted (diff for shard 2)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

posthog-bot avatar Apr 29 '24 10:04 posthog-bot

I think the "stale" insight card state is no longer needed (adding dead code 🤔)

Not sure I follow. I made it undead, added the stale. It shows up when you change filters so you don't wonder why nothing is happening. Do you mean this?

webjunkie avatar Apr 30 '24 08:04 webjunkie

I think the "stale" insight card state is no longer needed (adding dead code 🤔)

Not sure I follow. I made it undead, added the stale. It shows up when you change filters so you don't wonder why nothing is happening. Do you mean this?

Ignore me then đŸ˜Ŧ

mariusandra avatar Apr 30 '24 09:04 mariusandra

📸 UI snapshots have been updated

2 snapshot changes in total. 0 added, 2 modified, 0 deleted:

  • chromium: 0 added, 2 modified, 0 deleted (diff for shard 1)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

posthog-bot avatar Apr 30 '24 11:04 posthog-bot

📸 UI snapshots have been updated

2 snapshot changes in total. 0 added, 2 modified, 0 deleted:

  • chromium: 0 added, 2 modified, 0 deleted (diff for shard 1)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

posthog-bot avatar Apr 30 '24 11:04 posthog-bot

📸 UI snapshots have been updated

2 snapshot changes in total. 0 added, 2 modified, 0 deleted:

  • chromium: 0 added, 2 modified, 0 deleted (diff for shard 1)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

posthog-bot avatar Apr 30 '24 12:04 posthog-bot

📸 UI snapshots have been updated

2 snapshot changes in total. 0 added, 2 modified, 0 deleted:

  • chromium: 0 added, 2 modified, 0 deleted (diff for shard 1)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

posthog-bot avatar Apr 30 '24 12:04 posthog-bot