-
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
Saved insights default 2 #5616
Saved insights default 2 #5616
Conversation
@clarkus What kind of dropdown options do you think makes sense for last modified? |
@liyiy I think we could mimic the time range options shown for visualizations. There are a lot of options here, but it does set some precedent for the presets users might expect. Let's start with this. We can update later after we see how it's being used. |
Here's a quick update that aligns the dashboard item menus to the ones used on insights. https://www.figma.com/file/gQBj9YnNgD8YW4nBwCVLZf/PostHog-App?node-id=3164%3A39543 |
Pretty swamped this week, @mariusandra @alexkim205 would you be able to help with a review here? |
@@ -67,7 +52,6 @@ export type DisplayedType = ChartDisplayType | 'RetentionContainer' | |||
interface DisplayProps { | |||
className: string | |||
element: (props: any) => JSX.Element | null | |||
icon: (props: any) => JSX.Element | null |
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.
Hmm, will removing icons here be consistent with how we want to use DashboardItems in InsightHistoryPanel and DashboardItems?
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.
I think we're getting rid of insight history panel and yes, it should be gone in the dashboard items I believe under the mocks chris posted?
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.
Yeah I've been dropping icons from the menus. I think we're overusing them in a few places. The exceptions for inline icons so far have been +
icons as prefixes in buttons.
}, | ||
setCreatedBy: () => { | ||
actions.loadInsights() | ||
}, |
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.
Kind of torn if it's worth the refactor to put all these parameters (tab, search term, dates, type, etc.) under a source of truth filters
like we have in our insight logics. It would make for less boilerplate code and could persist these options in the url (which is especially helpful if the user wants to navigate back to their saved_insights after clicking an insight row). @mariusandra what are your thoughts?
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.
It would indeed be great to persist these variables in the URL... and that's indeed easier to achieve if you have one filters
reducer, versus multiple other reducers, though this can work as well.
Hey @liyiy, looking nice! Left some inline comments + some bugs I ran into below: Not sure if my CH setup is being uncooperative, but I get stuck in a reload loop when I try to spin this up with Screen.Recording.2021-08-23.at.9.43.38.PM.movCounts start with 1 even if insights don't exist: |
@alexkim205 hmm how are you accessing that saved_insights endpoint? The feature flag needs to be on for it to work |
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.
I tested this (and the relevant part under insights), and found some mostly-UX problems.
-
a) It doesn't want to change the name, and b) clicking on "description" seems focuses the "name" field
-
The save button and its connected "save to dashboard" flow seems off here:
-
It wasn't obvious that to test this, I had to open the
/
path, which would take me to the saved insights page. This would be nice to include in the PR description for people who want to test (unrelated pet peeve of mine: screencasts that just omit the URL bar :D). There was also nothing I could click to open this page. -
I can filter by types, but in the "list" view I don't see what types are in the list. Perhaps icons to the rescue? :D
-
The "last modified" and "created by" columns just sort the current page, not the entire list:
-
With the "..." icon so close to the name, it doesn't feel like a row-level menu, but more like a user-level menu.
-
In the card view I lose the information about who made the insight. The old "home" view does contain this information for example:
.dashboard-item { | ||
border: 1px solid transparent; | ||
padding-bottom: 10px; | ||
cursor: pointer; | ||
|
||
.dashboard-item-container:not(.funnel) .dashboard-item-content { | ||
transform: scale(0.333); | ||
transform-origin: top left; | ||
overflow: inherit; | ||
position: inherit; | ||
& > div { | ||
height: 300% !important; | ||
width: 300% !important; | ||
} | ||
} | ||
.dashboard-item-header { | ||
cursor: pointer !important; | ||
} | ||
|
||
.svg-funnel-js__label * { | ||
font-size: 8px; | ||
} | ||
&:hover { | ||
border-color: var(--primary); | ||
} | ||
} |
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.
This and surrounding code (copied from InsightHistoryPanel.scss
?) seems so specific, it feels messy to write the same thing in two files. Even if we're getting rid of InsightHistoryPanel
eventually, I'd add some comment here to keep the scss files in sync... or then reuse the them in a more direct way.
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.
Yep, I can leave a comment here. The better update is probably for me to consolidate all the dashboard items into the new mock design
}, | ||
], | ||
searchTerm: [ | ||
'' as string, |
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.
nit: I think as string
is not needed here
}, | ||
setCreatedBy: () => { | ||
actions.loadInsights() | ||
}, |
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.
It would indeed be great to persist these variables in the URL... and that's indeed easier to achieve if you have one filters
reducer, versus multiple other reducers, though this can work as well.
Points 1-4 are very valid, the creation flow PR here should be tackling those issues and I will leave better instructions on how to reproduce my PRs 😄 . Will incorporate 5, 6, 7, and 8 9 I will hold off for because I feel like that's something that can be improved upon in a follow up PR and I'd also have to update that functionality for dashboard item renaming too |
… into saved-insights-default-2
Changes
Please describe.
If this affects the frontend, include screenshots.
Feature flag 3408-saved-insights should be on for this to work. After that, navigate to
/
and it should take you to/saved_insights
automaticallyUpdates to the search/filters bar, card layout, and insight action dropdowns
Screen.Recording.2021-08-19.at.1.11.50.AM.mov
Screen.Recording.2021-08-21.at.8.15.54.PM.mov
Checklist