superset icon indicating copy to clipboard operation
superset copied to clipboard

feat(plugins): Make comparison values on BigNumberPeriodOverPeriod toggleable

Open mkramer5454 opened this issue 1 year ago • 3 comments

SUMMARY

There are various scenarios where it is preferred to only show a subset of the three comparison values: previous period value, period difference, and period percent change. This change allows for hiding unwanted values.

(This is my first contribution on the frontend side so please let me know if I missed something obvious!)

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

https://github.com/apache/superset/assets/52328004/72d594b8-114f-49db-a571-0b4b31aa48bf

TESTING INSTRUCTIONS

ADDITIONAL INFORMATION

  • [ ] Has associated issue:
  • [x] Required feature flags: CHART_PLUGINS_EXPERIMENTAL
  • [ ] 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

mkramer5454 avatar May 20 '24 15:05 mkramer5454

/testenv up

eschutho avatar May 20 '24 17:05 eschutho

/testenv up FEATURE_CHART_PLUGINS_EXPERIMENTAL=true

Antonio-RiveroMartnez avatar May 20 '24 17:05 Antonio-RiveroMartnez

@Antonio-RiveroMartnez Ephemeral environment spinning up at http://35.93.65.110:8080. Credentials are admin/admin. Please allow several minutes for bootstrapping and startup.

github-actions[bot] avatar May 20 '24 17:05 github-actions[bot]

@eschutho any chance this gets reviewed and merged? We'd very much love the feature!

fontclos avatar Oct 30 '24 09:10 fontclos

/testenv up FEATURE_CHART_PLUGINS_EXPERIMENTAL=true

fontclos avatar Oct 30 '24 09:10 fontclos

@fontclos Ephemeral environment creation is currently limited to committers.

github-actions[bot] avatar Oct 30 '24 09:10 github-actions[bot]

/testenv up FEATURE_CHART_PLUGINS_EXPERIMENTAL=true

rusackas avatar Oct 30 '24 16:10 rusackas

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

github-actions[bot] avatar Oct 30 '24 16:10 github-actions[bot]

Thanks for the contribution @mkramer5454! This looks good to me. Can you write a few tests here: superset-frontend/packages/superset-ui-core/test/time-comparison/getComparisonInfo.test.ts

eschutho avatar Dec 06 '24 00:12 eschutho

And maybe one small UI improvement, when "Add color for positive/negative" is selected, there's an extra dialog that shows up. I'd suggest to keep the two fields together and minimize any jumpiness, we just move the "Add color" field to the bottom below the new checkboxes. Also cc @yousoph and @kasiazjc on any other design suggestions. Screenshot 2024-12-05 at 4 52 58 PM

eschutho avatar Dec 06 '24 00:12 eschutho

@eschutho Changes made!

mkramer5454 avatar Jan 13 '25 19:01 mkramer5454

@eschutho Processing your ephemeral environment request here. Action: up.

github-actions[bot] avatar Feb 12 '25 17:02 github-actions[bot]

@Antonio-RiveroMartnez Processing your ephemeral environment request here. Action: up.

github-actions[bot] avatar Mar 11 '25 18:03 github-actions[bot]

Hi @mkramer5454 Sorry for not getting back to you on this PR! We're actually looking at doing something similar for the table chart, and have come up with some designs for it. Would you be interested in updating your PR to match the new designs? Screenshot 2025-03-13 at 1 56 39 PM Screenshot 2025-03-13 at 1 56 21 PM

eschutho avatar Mar 13 '25 20:03 eschutho

@eschutho Is this along the lines of what you're looking for?

image

mkramer5454 avatar Mar 18 '25 20:03 mkramer5454

@mkramer5454 this looks great! Let me spin up a test environment. Thanks! In the meantime do you want to look at some of the linting/test errors?

eschutho avatar Mar 18 '25 21:03 eschutho

@eschutho Processing your ephemeral environment request here. Action: up. More information on how to use or configure ephemeral environments

github-actions[bot] avatar Mar 18 '25 21:03 github-actions[bot]

@eschutho errors are resolved!

mkramer5454 avatar Mar 19 '25 19:03 mkramer5454

@eschutho Processing your ephemeral environment request here. Action: up. More information on how to use or configure ephemeral environments

github-actions[bot] avatar Mar 20 '25 17:03 github-actions[bot]

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

github-actions[bot] avatar Mar 20 '25 17:03 github-actions[bot]

Looks like the feature flag wasn't picked up. I updated the PR description with FEATURE_CHART_PLUGINS_EXPERIMENTAL=true per the docs.

mkramer5454 avatar Mar 21 '25 15:03 mkramer5454

Looks like the feature flag wasn't picked up. I updated the PR description with FEATURE_CHART_PLUGINS_EXPERIMENTAL=true per the docs.

Thanks @mkramer5454!

eschutho avatar Mar 21 '25 20:03 eschutho

@eschutho Processing your ephemeral environment request here. Action: up. More information on how to use or configure ephemeral environments

github-actions[bot] avatar Mar 21 '25 20:03 github-actions[bot]

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

github-actions[bot] avatar Mar 21 '25 20:03 github-actions[bot]