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(dashboard): Highlight tabs that contain a chart in scope of focused native filter #14865

Merged
merged 5 commits into from
May 28, 2021

Conversation

kgabryje
Copy link
Member

SUMMARY

When a user focuses a native filter, tabs that contain charts in scope of that filter should get highlighted to indicate that the native filter affects contents of those tabs.
I didn't highlight active tabs as I thought it would be an overkill, since we also highlight visible charts

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Screen.Recording.2021-05-27.at.13.03.33.mov

TESTING INSTRUCTIONS

  1. Set DASHBOARD_NATIVE_FILTERS feature flag to true
  2. Create a dashboard with tabs (dashboard level tabs and nested tabs)
  3. Create a native filter, play around with scoping
  4. Focus on the native filter and verify that tabs that contain charts in scope of that filter are highlighed

ADDITIONAL INFORMATION

  • Has associated issue:
  • 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

CC: @villebro @junlincc @graceguo-supercat

@codecov
Copy link

codecov bot commented May 27, 2021

Codecov Report

Merging #14865 (e818930) into master (d46aa60) will decrease coverage by 0.04%.
The diff coverage is 34.78%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #14865      +/-   ##
==========================================
- Coverage   77.62%   77.58%   -0.05%     
==========================================
  Files         963      963              
  Lines       49236    49304      +68     
  Branches     6192     6213      +21     
==========================================
+ Hits        38219    38252      +33     
- Misses      10817    10851      +34     
- Partials      200      201       +1     
Flag Coverage Δ
javascript 72.41% <34.78%> (-0.08%) ⬇️

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

Impacted Files Coverage Δ
...nd/src/dashboard/containers/DashboardComponent.jsx 84.84% <ø> (ø)
...d/src/dashboard/components/gridComponents/Tabs.jsx 76.31% <21.05%> (-11.06%) ⬇️
...nd/src/dashboard/components/gridComponents/Tab.jsx 86.20% <100.00%> (+0.75%) ⬆️
...onfigModal/FiltersConfigForm/FiltersConfigForm.tsx 68.37% <0.00%> (-4.27%) ⬇️
...nfigModal/FiltersConfigForm/getControlItemsMap.tsx 97.05% <0.00%> (-2.95%) ⬇️
...mponents/nativeFilters/FiltersConfigModal/utils.ts 67.94% <0.00%> (-0.81%) ⬇️
...perset-frontend/src/views/CRUD/chart/ChartList.tsx 73.75% <0.00%> (-0.35%) ⬇️
...src/dashboard/components/FiltersBadge/selectors.ts 76.69% <0.00%> (-0.23%) ⬇️
...-frontend/src/visualizations/presets/MainPreset.js 0.00% <0.00%> (ø)
...veFilters/FilterBar/FilterControls/FilterValue.tsx 67.44% <0.00%> (ø)
... and 6 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 d46aa60...e818930. Read the comment docs.

Copy link
Member

@villebro villebro left a comment

Choose a reason for hiding this comment

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

Yet another awesome improvement to the already awesome highlighting feature! 🤩 LGTM, minor non-blocking comment

) {
return;
}
dashboardLayout[childId].children.forEach(childId =>
Copy link
Member

Choose a reason for hiding this comment

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

Just to avoid confusion, would it make sense to call the second childId something like subChildId?

Copy link
Member Author

Choose a reason for hiding this comment

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

Nice catch, I haven't noticed that name clash. Fixed

@junlincc junlincc self-requested a review May 28, 2021 06:11
Copy link
Member

@junlincc junlincc left a comment

Choose a reason for hiding this comment

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

product signoff, thank you so much!🙏 i will take a better look after all PR merged.

@junlincc junlincc added dashboard:native-filters Related to the native filters of the Dashboard dashboard:indicator Related to the filter indicator of a Dashboard labels May 28, 2021
@junlincc junlincc added this to In progress in Native dashboard filters via automation May 28, 2021
@junlincc junlincc moved this from In progress to In review in Native dashboard filters May 28, 2021
@kgabryje kgabryje merged commit f82a085 into apache:master May 28, 2021
Native dashboard filters automation moved this from In review to Done May 28, 2021
cccs-RyanS pushed a commit to CybercentreCanada/superset that referenced this pull request Dec 17, 2021
…sed native filter (apache#14865)

* feat(dashboard): Highlight tabs that contain a chart in scope of focused native filter

* Optimizations and improvements

* Use Set instead of array

* Simplify logic

* Change variable name
QAlexBall pushed a commit to QAlexBall/superset that referenced this pull request Dec 29, 2021
…sed native filter (apache#14865)

* feat(dashboard): Highlight tabs that contain a chart in scope of focused native filter

* Optimizations and improvements

* Use Set instead of array

* Simplify logic

* Change variable name
cccs-rc pushed a commit to CybercentreCanada/superset that referenced this pull request Mar 6, 2024
…sed native filter (apache#14865)

* feat(dashboard): Highlight tabs that contain a chart in scope of focused native filter

* Optimizations and improvements

* Use Set instead of array

* Simplify logic

* Change variable name
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.3.0 labels Mar 12, 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 dashboard:indicator Related to the filter indicator of a Dashboard dashboard:native-filters Related to the native filters of the Dashboard size/M 🚢 1.3.0
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

4 participants