superset
superset copied to clipboard
refactor: Rewrites ColorSchemeControl with Typescript
SUMMARY
This PR rewrites the ColorSchemeControl
component using Typescript and a functional component. The main reason for refactoring the component was that the previous version was re-rendering the Select
component many times by mutating the options
property when the user hovered the elements. This caused a bug in reordering the selected items when hovering in/out.
TESTING INSTRUCTIONS
We shouldn't have any function changes and the selected items should remain on top when hovering in/out.
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
Codecov Report
Merging #21496 (7f711d6) into master (b739e27) will decrease coverage by
0.00%
. The diff coverage is68.18%
.
:exclamation: Current head 7f711d6 differs from pull request most recent head bf8d8a4. Consider uploading reports for the commit bf8d8a4 to get more accurate results
@@ Coverage Diff @@
## master #21496 +/- ##
==========================================
- Coverage 66.66% 66.66% -0.01%
==========================================
Files 1793 1793
Lines 68492 68494 +2
Branches 7277 7282 +5
==========================================
- Hits 45663 45660 -3
- Misses 20967 20972 +5
Partials 1862 1862
Flag | Coverage Δ | |
---|---|---|
javascript | 52.81% <68.18%> (-0.02%) |
:arrow_down: |
Flags with carried forward coverage won't be shown. Click here to find out more.
Impacted Files | Coverage Δ | |
---|---|---|
...e/components/controls/ColorSchemeControl/index.tsx | 68.18% <68.18%> (ø) |
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
/testenv up
@geido Container image not yet published for this PR. Please try again when build is complete.
@geido Ephemeral environment creation failed. Please check the Actions logs for details.
@jinghua-qa Can you fetch this branch locally and test it? It seems ephemeral environments are failing for this PR.
I have tested this pr locally, worked as expected