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

refactor: Rewrites ColorSchemeControl with Typescript #21496

Merged

Conversation

michael-s-molina
Copy link
Member

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
Copy link

codecov bot commented Sep 16, 2022

Codecov Report

Merging #21496 (7f711d6) into master (b739e27) will decrease coverage by 0.00%.
The diff coverage is 68.18%.

❗ 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%) ⬇️

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%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@geido
Copy link
Member

geido commented Sep 20, 2022

/testenv up

@apache apache deleted a comment from github-actions bot Sep 20, 2022
@apache apache deleted a comment from github-actions bot Sep 20, 2022
@github-actions
Copy link
Contributor

@geido Container image not yet published for this PR. Please try again when build is complete.

@github-actions
Copy link
Contributor

@geido Ephemeral environment creation failed. Please check the Actions logs for details.

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. Would be nice to have QA approval

@michael-s-molina
Copy link
Member Author

@jinghua-qa Can you fetch this branch locally and test it? It seems ephemeral environments are failing for this PR.

@jinghua-qa
Copy link
Member

I have tested this pr locally, worked as expected

Copy link
Member

@jinghua-qa jinghua-qa left a comment

Choose a reason for hiding this comment

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

LGTM

@michael-s-molina michael-s-molina merged commit bbac67a into apache:master Sep 22, 2022
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 2.1.0 and removed 🚢 2.1.3 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 🚢 2.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants