Skip to content

[Dashboard] Hide slice titles when they're empty#8018

Merged
john-bodley merged 1 commit into
apache:masterfrom
etr2460:erik-ritter--fix-empty-slice-title
Aug 13, 2019
Merged

[Dashboard] Hide slice titles when they're empty#8018
john-bodley merged 1 commit into
apache:masterfrom
etr2460:erik-ritter--fix-empty-slice-title

Conversation

@etr2460
Copy link
Copy Markdown
Member

@etr2460 etr2460 commented Aug 9, 2019

CATEGORY

Choose one

  • Bug Fix
  • Enhancement (new features, refinement)
  • Refactor
  • Add tests
  • Build / Development Environment
  • Documentation

SUMMARY

After #7084 slices can no longer have whitespace as a name. This means that there's no way to remove the title from a slice in a dashboard. This PR removes the <empty> text from a slice when viewing it in a dashboard.

This also prevents you from saving a slice with whitespace as a title.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Before:
Screen Shot 2019-08-09 at 10 20 41 AM

After:
Screen Shot 2019-08-09 at 10 20 23 AM

TEST PLAN

View slices with and without titles in dashboards. See titles when not set to NULL, but see no titles when the slice doesn't have one

ADDITIONAL INFORMATION

  • Has associated issue:
  • Changes UI
  • Requires DB Migration.
  • Confirm DB Migration upgrade and downgrade tested.
  • Introduces new feature or API
  • Removes existing feature or API

REVIEWERS

@graceguo-supercat @john-bodley @kristw

@codecov-io
Copy link
Copy Markdown

codecov-io commented Aug 9, 2019

Codecov Report

Merging #8018 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #8018   +/-   ##
=======================================
  Coverage   65.58%   65.58%           
=======================================
  Files         469      469           
  Lines       22461    22461           
  Branches     2438     2438           
=======================================
  Hits        14730    14730           
  Misses       7611     7611           
  Partials      120      120
Impacted Files Coverage Δ
...et/assets/src/dashboard/components/SliceHeader.jsx 24% <ø> (ø) ⬆️

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 aebffe0...05d97df. Read the comment docs.

@etr2460 etr2460 force-pushed the erik-ritter--fix-empty-slice-title branch from 05d97df to e7ffb6c Compare August 9, 2019 17:49
@pull-request-size pull-request-size Bot added size/S and removed size/XS labels Aug 9, 2019
@mistercrunch
Copy link
Copy Markdown
Member

Oh wait, we need to make sure there's an easy way to edit (currently you'd click on the <empty> text) in the explore view when the text is empty. Different handling of the empty text for dashboard and explore?

@@ -109,6 +109,7 @@ class SliceHeader extends React.PureComponent {
: '')
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@mistercrunch the line above this allows you to click on the title to edit it from the dashboard ^^^

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

oh nice! Never mind my comment then!

@etr2460 etr2460 closed this Aug 9, 2019
@etr2460 etr2460 reopened this Aug 9, 2019
@john-bodley john-bodley merged commit 0754f29 into apache:master Aug 13, 2019
etr2460 pushed a commit to airbnb/superset-fork that referenced this pull request Aug 13, 2019
@syazshafei
Copy link
Copy Markdown

@etr2460 How to make slice title in dashboard is hidden but in chart list view it has the title?

@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.35.0 First shipped in 0.35.0 labels Feb 28, 2024
qfcwell pushed a commit to qfcwell/superset that referenced this pull request May 12, 2026
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/S 🚢 0.35.0 First shipped in 0.35.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants