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

chore: implement new mockup to the new viz gallery (2nd iteration) #15868

Merged
merged 5 commits into from
Jul 26, 2021

Conversation

stephenLYZ
Copy link
Member

@stephenLYZ stephenLYZ commented Jul 23, 2021

SUMMARY

This PR is the second iteration of viz gallery.

  • To relocate the search bar to main section
  • Search to take up the entire row
  • Stack tags above category list, only display Highly-used, ECharts, Advanced-Analytics
  • Click to expand and show 4 sections:
    • recommended tags
    • all
    • category
    • tags
  • from global new button - anchor to show recommended tags (implemented)
  • from explore(switching viz) -anchor to show existing chart and its category (implemented)
  • open from dataset list -> explore -> anchor to show recommended tags (not implemented)

related: #15734
design: https://www.figma.com/file/LMnulBPitqSh5GeElVbsUV/chart-popover?node-id=0%3A1

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

image

show existing chart and scroll to the category, enable the user to see the selected category.

2021-07-24.12.25.59.mov

TESTING INSTRUCTIONS

ADDITIONAL INFORMATION

  • Has associated issue:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@stephenLYZ stephenLYZ changed the title chore: implement new mockup to the new viz gallery chore: implement new mockup to the new viz gallery (2nd iteration) Jul 23, 2021
`;

const CategoriesWrapper = styled.div`
const Wrapper = styled.div`
Copy link
Member

Choose a reason for hiding this comment

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

Wrapper isn't a very descriptive name. I was going to suggest renaming it so that it indicates what it is wrapping, but then I noticed that it lives directly within the LeftPane. Is it possible to merge these styles into LeftPane and remove the Wrapper component?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think it's possible, I'll try it.

@suddjian
Copy link
Member

suddjian commented Jul 23, 2021

Suggestion, non-blocking:
Is Advanced-Analytics the longest tag we're dealing with? It looks like it should be able to fit within the left pane. Perhaps we can have the left pane size itself to fit its contents to avoid the need for a popover.

@suddjian
Copy link
Member

/testenv up

@github-actions
Copy link
Contributor

@suddjian Ephemeral environment spinning up at http://54.188.201.103:8080. Credentials are admin/admin. Please allow several minutes for bootstrapping and startup.

@stephenLYZ
Copy link
Member Author

Suggestion, non-blocking:
Is Advanced-Analytics the longest tag we're dealing with? It looks like it should be able to fit within the sidebar. Perhaps we can have the sidebar size itself to fit its contents to avoid the need for a popover.

Good idea! I agree that we do not limit the sidebar size, and we also don't need tooltip.

}
key={COLLAPSE_LABEL.ALL_CHARTS}
>
<Selector
Copy link
Member

Choose a reason for hiding this comment

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

It's a bit strange to have a collapse panel that will only ever have one item in it. Should we put the "All Charts" selector at the top of the left pane instead, outside of the collapse?

ghost
defaultActiveKey={Object.values(COLLAPSE_LABEL)}
>
<Collapse.Panel
Copy link
Member

Choose a reason for hiding this comment

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

Might be able to reduce some duplication by making an array of selector groups and maping that to render a collapse panel for each group.

Copy link
Member

Choose a reason for hiding this comment

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

Or actually I think a better way to reduce duplication would be adding a component <SelectorGroup> that renders a Collapse Panel and its contents.

@suddjian
Copy link
Member

Played with this in the ephemeral env, looks good! Awesome work.

@junlincc
Copy link
Member

@suddjian thanks for the review!!

@codecov
Copy link

codecov bot commented Jul 24, 2021

Codecov Report

Merging #15868 (fe8120f) into master (d408ff8) will increase coverage by 0.01%.
The diff coverage is 82.66%.

❗ Current head fe8120f differs from pull request most recent head 6a49026. Consider uploading reports for the commit 6a49026 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master   #15868      +/-   ##
==========================================
+ Coverage   77.08%   77.09%   +0.01%     
==========================================
  Files         984      984              
  Lines       51787    51819      +32     
  Branches     7031     7043      +12     
==========================================
+ Hits        39918    39949      +31     
  Misses      11644    11644              
- Partials      225      226       +1     
Flag Coverage Δ
javascript 71.75% <85.91%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
superset-frontend/src/components/Icons/index.tsx 100.00% <ø> (ø)
...frontend/src/views/CRUD/alert/AlertReportModal.tsx 61.70% <ø> (ø)
superset/exceptions.py 93.18% <ø> (ø)
superset/views/base.py 75.86% <ø> (ø)
superset/views/core.py 75.21% <0.00%> (+0.16%) ⬆️
...c/components/ErrorMessage/DatabaseErrorMessage.tsx 90.90% <83.33%> (-3.83%) ⬇️
...ponents/controls/VizTypeControl/VizTypeGallery.tsx 93.65% <86.15%> (-0.62%) ⬇️
superset/config.py 91.24% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d408ff8...6a49026. Read the comment docs.

@github-actions
Copy link
Contributor

@stephenLYZ Ephemeral environment creation is currently limited to committers.

@suddjian
Copy link
Member

/testenv up

@github-actions
Copy link
Contributor

@suddjian Ephemeral environment spinning up at http://34.212.3.120:8080. Credentials are admin/admin. Please allow several minutes for bootstrapping and startup.

@kgabryje
Copy link
Member

Looks nice! 1 nit which is probably not related to this PR - there's a short vertical scroll in some charts' descriptions which looks a bit weird. I wonder if we could get rid of it somehow (shorter descriptions? fewer tags? larger modal?)

Screen.Recording.2021-07-26.at.19.09.58.mov

cc @junlincc

@suddjian
Copy link
Member

I would like to see the "All Charts" section moved to the top and outside of a Collapse. Thoughts @junlincc ?

@kgabryje
Copy link
Member

1 more thing - we have an "X" button on "All charts" label, which doesn't do anything. Maybe "All charts" shouldn't have that button?

@junlincc
Copy link
Member

👍Let's make above changes in a follow up PR>

Copy link
Member

@junlincc junlincc left a comment

Choose a reason for hiding this comment

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

Product sign-off ❣️great jobs everyone!! thank you so much! 🙇‍♀️

Copy link
Member

@suddjian suddjian left a comment

Choose a reason for hiding this comment

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

code looks good, nice job

@suddjian suddjian merged commit fb5dce0 into apache:master Jul 26, 2021
@github-actions
Copy link
Contributor

Ephemeral environment shutdown and build artifacts deleted.

opus-42 pushed a commit to opus-42/incubator-superset that referenced this pull request Nov 14, 2021
…pache#15868)

* chore: implement new mockup to the new viz gallery

* fix: update package-lock

* fix: add license

* fix: reduce duplication and fit within the sidebar

* fix: ut
cccs-RyanS pushed a commit to CybercentreCanada/superset that referenced this pull request Dec 17, 2021
…pache#15868)

* chore: implement new mockup to the new viz gallery

* fix: update package-lock

* fix: add license

* fix: reduce duplication and fit within the sidebar

* fix: ut
QAlexBall pushed a commit to QAlexBall/superset that referenced this pull request Dec 29, 2021
…pache#15868)

* chore: implement new mockup to the new viz gallery

* fix: update package-lock

* fix: add license

* fix: reduce duplication and fit within the sidebar

* fix: ut
cccs-rc pushed a commit to CybercentreCanada/superset that referenced this pull request Mar 6, 2024
…pache#15868)

* chore: implement new mockup to the new viz gallery

* fix: update package-lock

* fix: add license

* fix: reduce duplication and fit within the sidebar

* fix: ut
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.3.0 labels Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/L 🚢 1.3.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants