Skip to content
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

935 trend legend #3434

Merged
merged 13 commits into from
Feb 25, 2021
Merged

935 trend legend #3434

merged 13 commits into from
Feb 25, 2021

Conversation

EDsCODE
Copy link
Member

@EDsCODE EDsCODE commented Feb 22, 2021

Changes

Please describe.

  • addresses Show legends on graphs #935
  • first version of trend legend. It allows you to see the exact numbers of the trend result and switch on/off certain entities
  • *does not handle extra breakdown values yet

If this affects the frontend, include screenshots.

Checklist

  • All querysets/queries filter by Organization, by Team, and by User
  • Django backend tests
  • Jest frontend tests
  • Cypress end-to-end tests

@timgl timgl temporarily deployed to posthog-935-trend-legen-doisyo February 22, 2021 22:14 Inactive
@EDsCODE EDsCODE temporarily deployed to posthog-935-trend-legen-doisyo February 23, 2021 23:08 Inactive
@EDsCODE EDsCODE temporarily deployed to posthog-935-trend-legen-doisyo February 24, 2021 00:30 Inactive
@EDsCODE EDsCODE temporarily deployed to posthog-935-trend-legen-doisyo February 24, 2021 14:36 Inactive
@EDsCODE EDsCODE mentioned this pull request Feb 24, 2021
6 tasks
logic={trendsLogic}
props={{ dashboardItemId: null, view: activeView }}
>
<TrendLegend />
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should only display the legend if there's something to breakdown by - either breakdown or multiple entities graphed.

Otherwise it's a waste of space most times.

Copy link
Member Author

Choose a reason for hiding this comment

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

Agreed pending conclusion below (whether we show values or not)

import { PHCheckbox } from 'lib/components/PHCheckbox'
import { getChartColors } from 'lib/colors'

export function TrendLegend(): JSX.Element {
Copy link
Contributor

Choose a reason for hiding this comment

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

Q: Why do we show the values here? It feels like it duplicates the graph, makes the table view unneeded and makes the whole thing too wide to fit on the side.

Copy link
Member Author

@EDsCODE EDsCODE Feb 24, 2021

Choose a reason for hiding this comment

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

I went this route because putting the legend on the right side of the trend graph would add a lot of horizontal density. By putting the legend below, there's a lot of space so I figured we could just fill up the exact numbers for easier comparison.

tagging @timgl @corywatilo for drive by thoughts
Screen Shot 2021-02-24 at 10 32 42 AM

Copy link
Collaborator

Choose a reason for hiding this comment

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

I like the table, especially when breaking down it's nice to get the numbers as well. When I'm using amplitude I found myself looking at the table below a lot to get the precise numbers.

I think we should add something like this too, definitely for dashboards at least.
image

I'm not super convinced about the


and the spacing. Doesn't look quite right to me. Also i think the table should hit the sides?

(also made a quick commit to make the table small)

@EDsCODE EDsCODE temporarily deployed to posthog-935-trend-legen-doisyo February 24, 2021 15:11 Inactive
@EDsCODE EDsCODE temporarily deployed to posthog-935-trend-legen-doisyo February 24, 2021 15:28 Inactive
@EDsCODE EDsCODE marked this pull request as ready for review February 24, 2021 15:30
@EDsCODE EDsCODE temporarily deployed to posthog-935-trend-legen-doisyo February 24, 2021 15:40 Inactive
@timgl timgl temporarily deployed to posthog-935-trend-legen-doisyo February 24, 2021 19:05 Inactive
@macobo
Copy link
Contributor

macobo commented Feb 25, 2021

How do we want to handle overflows? This looks quite bad on linux:

2021-02-25_08-57

@EDsCODE
Copy link
Member Author

EDsCODE commented Feb 25, 2021

Overflow would just be scrolling. Hard to get around that because you can filter something for 90 days where you definitely will need to scroll

Copy link
Contributor

@macobo macobo left a comment

Choose a reason for hiding this comment

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

Let's ship this and see the feedback.

Couple of UX suggestions:

  1. Disable the last checkbox - it'd be weird if user ever got to a "no graph" situtation
  2. Make the whole cell with the label clickable rather than only the checkbox. Makes it easier to toggle things.

@EDsCODE EDsCODE temporarily deployed to posthog-935-trend-legen-doisyo February 25, 2021 15:26 Inactive
@EDsCODE EDsCODE temporarily deployed to posthog-935-trend-legen-doisyo February 25, 2021 15:33 Inactive
@EDsCODE EDsCODE temporarily deployed to posthog-935-trend-legen-doisyo February 25, 2021 15:45 Inactive
@EDsCODE EDsCODE merged commit cd660e5 into master Feb 25, 2021
@EDsCODE EDsCODE deleted the 935-trend-legend branch February 25, 2021 15:59
EDsCODE added a commit that referenced this pull request Feb 25, 2021
EDsCODE added a commit that referenced this pull request Feb 25, 2021
EDsCODE added a commit that referenced this pull request Feb 25, 2021
EDsCODE added a commit that referenced this pull request Feb 25, 2021
* Revert "Revert "935 trend legend (#3434)" (#3487)"

This reverts commit 5784f90.

* patch bug

* format breakdown label

* add ff
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.

3 participants