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

Dashboard list filters & favouriting & archival [WIP] #4868

Merged
merged 27 commits into from
Apr 28, 2017

Conversation

attekei
Copy link
Contributor

@attekei attekei commented Apr 25, 2017

TODO

  • Add filter widget
  • Add "Saved by me" filter
  • Add "Favorites" filter
  • Add favouriting button to each list item
  • Add archival button to each list item
  • Add archive list
  • Add unarchive button
  • Separate URL for the archive page
  • Use real API endpoints instead of mocks
  • Empty states for filters & archive list
  • for the dropdown filters (favorites, saved by me), let’s use the same empty state that we use for the text-based filters (the empty dashboard illustration plus text)
  • for the archive empty state, let’s repurpose the Collection empty state: icon should change to the archive box icon, and the text should read “No dashboards have been archived yet”
  • if the dashboard archive is non-empty, the icon for it should appear in the top-right of the dashboard list empty state
  • Change "Delete" button in dashboard editing state to "Archive"
  • Check why there is some tiny flickering when you change active filter
  • Dashboard list item UI changes, specifically:
  • move the dashboard icon to the right (i’ve depicted how to handle the hover states, which remain essentially unchanged)
  • change the box’s hover state (it adds a box-shadow now instead of making the bg blue, and it makes the title text blue)
  • change the font style of dashboard titles to match the style used for question titles in the list of questions (dark gray/black, 18pt)
  • Add E2E tests (and sync again w/ Tom about how to make them stable)

Maybe skipped for now because of implementation complexity:

  • Add "Recently viewed" filter (check if the backend has everything set)
  • Add "Most popular" filter (also might require something from the backend)

@salsakran
Copy link
Contributor

salsakran commented Apr 25, 2017

@attekei for things like most popular where we don't have a sort method on the endpoint, let's just skip that option for now

@attekei
Copy link
Contributor Author

attekei commented Apr 25, 2017

roger

@attekei attekei changed the title Dashboard list filters & favouriting [WIP] Dashboard list filters & favouriting & archival [WIP] Apr 25, 2017
@attekei
Copy link
Contributor Author

attekei commented Apr 26, 2017

updated this 9:15pm

Ready for first UI review cycle, please note that:

  • empty states are missing for "Favorites" + "Saved by me" filters and "Archive". I could recycle the same empty states that are in Questions list with slightly modified texts. Questions archive doesn't currently have an empty state but imho both question and dashboard archives should have one.
  • dashboard deletion in the single dashboard editing view has to still be changed to dashboard archival

@attekei attekei force-pushed the dashboard-list-filters-favouriting branch from f4a7c1a to 4df781f Compare April 26, 2017 03:34
@mazameli
Copy link
Contributor

mazameli commented Apr 26, 2017

Looking good. Here are some things I noticed:

  • We never explicitly talked about this, but I didn't necessarily expect dashboards to have their own archive page as opposed to questions — though I think it makes sense now that I see it. Only reason it gave me pause was because archived collections and archived questions go in the same archive bucket.
  • I think that the list of dashboards in the archive should look visually like the question archive page. We intentionally made that archive page a bit more stripped down to make it feel more like a recycling bin type view.
  • When the archive button appears on hover with a dashboard with a long name, the ellipsified state of the title is still too close to the archive icon. I'd like it to have padding-right == to the space between the archive icon and the star. Ellipsified titles are actually also too close to the star icon even when not in the hover state.
  • In the filter dropdown, I think the all dashboards icon should be our dashboard icon instead of the stack/collections icon.

@attekei attekei added this to the 0.24.0 milestone Apr 27, 2017
@attekei attekei requested review from tlrobinson and kdoh April 28, 2017 00:08
@attekei attekei requested a review from salsakran April 28, 2017 00:55
@salsakran
Copy link
Contributor

thanks for putting up with my OCD tendencies and moving the icon.
👍 on this once we get a few tests wired up

Copy link
Member

@kdoh kdoh left a comment

Choose a reason for hiding this comment

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

Just a couple small class usage things but after those are fixed this looks good.

<div className="flex-align-right cursor-pointer text-grey-5">
<Link to="/dashboards/archive">
<Icon name="viewArchive"
className="mr2 text-brand-hover Icon Icon-viewArchive"
Copy link
Member

Choose a reason for hiding this comment

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

I think the Icon element should get these Icon classes automatically based on the name so no need to duplicate them here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Icon class doesn't currently merge them to the provided className parameter but I will make it do that :-)


{!noDashboardsCreated &&
<Icon name="add"
className="text-brand-hover Icon Icon-add"
Copy link
Member

Choose a reason for hiding this comment

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

Same deal here r.e. Icon classes.

<li className="Grid-cell shrink-below-content-size" style={{maxWidth: "550px"}}>
<Link to={Urls.dashboard(id)}
data-metabase-event={"Navbar;Dashboards;Open Dashboard;" + id}
className={cx(
Copy link
Member

Choose a reason for hiding this comment

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

Don't actually need to use cx here since there aren't any conditional classes on this element.

@attekei attekei force-pushed the dashboard-list-filters-favouriting branch from 8e87c4a to d3ca537 Compare April 28, 2017 19:40
@attekei attekei merged commit 4a9822b into master Apr 28, 2017
@attekei attekei deleted the dashboard-list-filters-favouriting branch April 28, 2017 19:45
@kdoh kdoh mentioned this pull request Apr 28, 2017
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.

None yet

4 participants