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

feat(explore): support show annotation label [ID-8] #17307

Merged
merged 10 commits into from
Dec 2, 2021

Conversation

stephenLYZ
Copy link
Member

SUMMARY

As a user, it's better to have an option to ALWAYS see the annotation label once annotation is added to charts, instead of hovering to view. This PR adds show label control to do this.

related pr: apache-superset/superset-ui#1449

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

interval

image

events

image

TESTING INSTRUCTIONS

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • 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 closed this Nov 1, 2021
@stephenLYZ stephenLYZ reopened this Nov 1, 2021
@stephenLYZ stephenLYZ changed the title feat(explore): support show annotation label feat(explore): support show annotation label [ID-8] Nov 1, 2021
@codecov
Copy link

codecov bot commented Nov 2, 2021

Codecov Report

Merging #17307 (a407a3d) into master (a959e6d) will decrease coverage by 0.20%.
The diff coverage is 100.00%.

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

@@            Coverage Diff             @@
##           master   #17307      +/-   ##
==========================================
- Coverage   77.01%   76.80%   -0.21%     
==========================================
  Files        1049     1049              
  Lines       56682    56683       +1     
  Branches     7851     7851              
==========================================
- Hits        43651    43533     -118     
- Misses      12778    12897     +119     
  Partials      253      253              
Flag Coverage Δ
hive ?
mysql 82.03% <100.00%> (+<0.01%) ⬆️
postgres 82.04% <100.00%> (+<0.01%) ⬆️
presto ?
python 82.12% <100.00%> (-0.41%) ⬇️
sqlite 81.72% <100.00%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
...ontrols/AnnotationLayerControl/AnnotationLayer.jsx 84.28% <100.00%> (ø)
superset/charts/schemas.py 99.33% <100.00%> (+<0.01%) ⬆️
superset/db_engines/hive.py 0.00% <0.00%> (-85.19%) ⬇️
superset/db_engine_specs/hive.py 70.27% <0.00%> (-16.99%) ⬇️
superset/db_engine_specs/presto.py 83.50% <0.00%> (-6.48%) ⬇️
superset/views/database/mixins.py 81.03% <0.00%> (-1.73%) ⬇️
superset/connectors/sqla/models.py 86.85% <0.00%> (-1.58%) ⬇️
superset/models/core.py 89.26% <0.00%> (-0.74%) ⬇️
superset/db_engine_specs/base.py 88.15% <0.00%> (-0.39%) ⬇️
... and 1 more

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 a959e6d...944860d. Read the comment docs.

superset/charts/schemas.py Outdated Show resolved Hide resolved
Copy link
Member

@geido geido left a comment

Choose a reason for hiding this comment

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

Code LGTM. Spinning up an env

@geido
Copy link
Member

geido commented Nov 4, 2021

/testenv up

@github-actions
Copy link
Contributor

github-actions bot commented Nov 4, 2021

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

Copy link
Member

@zhaoyongjie zhaoyongjie left a comment

Choose a reason for hiding this comment

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

LGTM, wait for bumping superset-ui

@@ -884,6 +884,9 @@ class AnnotationLayerSchema(Schema):
allow_none=True,
)
show = fields.Boolean(description="Should the layer be shown", required=True)
showLabel = fields.Boolean(
description="Should the label always be shown", required=True,
Copy link
Member

Choose a reason for hiding this comment

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

I am wondering whether we should make this optional to avoid a breaking change

Copy link
Member Author

Choose a reason for hiding this comment

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

That's a good point. I think allowNone=True is better

@pull-request-size pull-request-size bot added size/S and removed size/M labels Nov 29, 2021
Copy link
Contributor

@riahk riahk left a comment

Choose a reason for hiding this comment

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

Is the superset-ui bump still relevant?

@rusackas rusackas merged commit a3cce57 into apache:master Dec 2, 2021
@github-actions
Copy link
Contributor

github-actions bot commented Dec 2, 2021

Ephemeral environment shutdown and build artifacts deleted.

@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.5.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/S 🚢 1.5.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants