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

fix: Preserves selected scopes when toggling between scope types #23475

Conversation

michael-s-molina
Copy link
Member

SUMMARY

Preserves selected scopes when toggling between scope types.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Screen.Recording.2023-03-23.at.13.54.34.mov
Screen.Recording.2023-03-23.at.13.51.03.mov

TESTING INSTRUCTIONS

Make sure the selected scopes are preserved when toggling between scope types

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 Mar 23, 2023

Codecov Report

Merging #23475 (fcdac5c) into master (b077314) will increase coverage by 0.01%.
The diff coverage is 85.41%.

❗ Current head fcdac5c differs from pull request most recent head b92f123. Consider uploading reports for the commit b92f123 to get more accurate results

@@            Coverage Diff             @@
##           master   #23475      +/-   ##
==========================================
+ Coverage   67.64%   67.65%   +0.01%     
==========================================
  Files        1908     1910       +2     
  Lines       73739    73747       +8     
  Branches     7988     7988              
==========================================
+ Hits        49879    49894      +15     
+ Misses      21814    21811       -3     
+ Partials     2046     2042       -4     
Flag Coverage Δ
javascript 53.85% <84.44%> (+0.03%) ⬆️

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

Impacted Files Coverage Δ
...t-ui-chart-controls/src/shared-controls/mixins.tsx 16.66% <ø> (ø)
...s/superset-ui-core/src/components/SafeMarkdown.tsx 66.66% <ø> (ø)
...plugins/legacy-plugin-chart-heatmap/src/Heatmap.js 0.00% <0.00%> (ø)
...Filters/FiltersConfigModal/FilterConfigurePane.tsx 100.00% <ø> (ø)
...tersConfigModal/FiltersConfigForm/DefaultValue.tsx 9.09% <0.00%> (ø)
...rsConfigModal/FiltersConfigForm/DependencyList.tsx 52.45% <ø> (ø)
...onfigModal/FiltersConfigForm/FiltersConfigForm.tsx 55.17% <ø> (ø)
...ters/FiltersConfigModal/FiltersConfigForm/utils.ts 76.31% <ø> (-0.61%) ⬇️
.../src/explore/components/ControlPanelsContainer.tsx 69.76% <0.00%> (ø)
...odal/FiltersConfigForm/FilterScope/FilterScope.tsx 74.19% <60.00%> (+5.22%) ⬆️
... and 8 more

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

@@ -78,10 +80,13 @@ const FilterScope: FC<FilterScopeProps> = ({

const onUpdateFormValues = useCallback(
(formValues: any) => {
if (formScopingType === ScopingType.specific) {
setLastSpecificScope(formValues.scope);
Copy link
Member

Choose a reason for hiding this comment

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

I personally prefer to use useRef for this case (since it won't need to re-render)

Copy link
Member Author

Choose a reason for hiding this comment

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

Good call! Done.

Copy link
Member

@justinpark justinpark left a comment

Choose a reason for hiding this comment

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

Thanks for updates

@michael-s-molina michael-s-molina merged commit 80d1e4f into apache:master Mar 28, 2023
michael-s-molina added a commit to airbnb/superset-fork that referenced this pull request Apr 7, 2023
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 3.0.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 🚢 3.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants