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: Cross-referenced Dashboards in Chart list (Column + Filter) #21760

Merged
merged 19 commits into from
Oct 13, 2022

Conversation

geido
Copy link
Member

@geido geido commented Oct 10, 2022

SUMMARY

This PR adds the ability to filter the Charts by the cross-referenced Dashboards. It also shows the referenced Dashboards in a new column.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

DEV.Superset.mp4

TESTING INSTRUCTIONS

  1. Filter the Charts list by a Dashboard and make sure the list is filtered correctly
  2. Add a Chart to multiple Dashboards, make sure the references are appearing in the "Dashboards added to" column
  3. Add more Dashboards than what fits the "Dashboards added to" column. Make sure the tooltip is appearing
  4. Add more than 20 Dashboards. Make sure the "Plus X more" is appearing in the tooltip

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 Oct 10, 2022

Codecov Report

Merging #21760 (ab591cf) into master (8f74e46) will decrease coverage by 0.00%.
The diff coverage is 50.00%.

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

@@            Coverage Diff             @@
##           master   #21760      +/-   ##
==========================================
- Coverage   66.86%   66.85%   -0.01%     
==========================================
  Files        1803     1805       +2     
  Lines       68996    69053      +57     
  Branches     7349     7368      +19     
==========================================
+ Hits        46132    46165      +33     
- Misses      20971    20991      +20     
- Partials     1893     1897       +4     
Flag Coverage Δ
javascript 53.20% <56.33%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
...rd/components/nativeFilters/FilterCard/NameRow.tsx 85.71% <ø> (ø)
superset/views/core.py 76.06% <ø> (ø)
superset/migrations/shared/utils.py 36.06% <12.50%> (ø)
superset-frontend/src/hooks/useTruncation/index.ts 44.73% <16.66%> (ø)
...perset-frontend/src/views/CRUD/chart/ChartList.tsx 56.61% <42.10%> (-2.36%) ⬇️
.../explore/exploreUtils/getParsedExploreURLParams.ts 83.33% <50.00%> (-8.10%) ⬇️
...tend/src/components/ListView/CrossLinksTooltip.tsx 77.77% <77.77%> (ø)
...et-frontend/src/components/ListView/CrossLinks.tsx 88.23% <88.23%> (ø)
...nents/nativeFilters/FilterCard/DependenciesRow.tsx 80.00% <100.00%> (+1.05%) ⬆️
...d/components/nativeFilters/FilterCard/ScopeRow.tsx 61.11% <100.00%> (+2.28%) ⬆️
... and 7 more

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

@kgabryje
Copy link
Member

Left some minor comments. Tagging @kasiazjc for truncation behaviour review 🙂

@kgabryje
Copy link
Member

/testenv up FEATURE_CROSS_REFERENCES=true

@github-actions
Copy link
Contributor

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

@geido
Copy link
Member Author

geido commented Oct 11, 2022

/testenv up FEATURE_CROSS_REFERENCES=true

Copy link
Member

@michael-s-molina michael-s-molina 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 the PR @geido! I left some first-pass comments.

superset-frontend/src/views/CRUD/chart/ChartList.tsx Outdated Show resolved Hide resolved
superset-frontend/src/views/CRUD/chart/ChartList.tsx Outdated Show resolved Hide resolved
superset-frontend/src/views/CRUD/chart/ChartList.tsx Outdated Show resolved Hide resolved
superset-frontend/src/views/CRUD/chart/ChartList.tsx Outdated Show resolved Hide resolved
@github-actions
Copy link
Contributor

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

Copy link
Member

@zhaoyongjie zhaoyongjie left a comment

Choose a reason for hiding this comment

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

Tested in my local. work as expected.

@michael-s-molina
Copy link
Member

Can you make the +n hoverable? It feels natural to hover the +n to see the hidden dashboards.

Screen.Recording.2022-10-12.at.7.48.04.AM.mov

@geido
Copy link
Member Author

geido commented Oct 12, 2022

/testenv up FEATURE_CROSS_REFERENCES=true

@github-actions
Copy link
Contributor

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

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

Copy link
Member

@michael-s-molina michael-s-molina left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for addressing all the comments!

@geido geido merged commit 49b48ee into master Oct 13, 2022
@github-actions
Copy link
Contributor

Ephemeral environment shutdown and build artifacts deleted.

@john-bodley
Copy link
Member

@geido I believe there's an issue with this feature when backend querying is required, i.e., the following request,

 http://localhost:5000/api/v1/chart/?q=(columns:!(dashboard_title,id),filters:!((col:dashboards,opr:rel_m_m,value:d)),keys:!(none),order_column:dashboard_title,order_direction:asc,page:0,page_size:100)

throws the following FAB error:

"Invalid order by column: dashboard_title"

@geido
Copy link
Member Author

geido commented Jan 17, 2023

@geido I believe there's an issue with this feature when backend querying is required, i.e., the following request,

 http://localhost:5000/api/v1/chart/?q=(columns:!(dashboard_title,id),filters:!((col:dashboards,opr:rel_m_m,value:d)),keys:!(none),order_column:dashboard_title,order_direction:asc,page:0,page_size:100)

throws the following FAB error:

"Invalid order by column: dashboard_title"

Thanks @john-bodley I will have a look

@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
@mistercrunch mistercrunch deleted the feat/d2d-charts-crud-filter-col branch March 26, 2024 16:11
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/XL 🚢 2.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants