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: Disables email reports for unsaved charts #23588

Conversation

michael-s-molina
Copy link
Member

SUMMARY

Changes the Email report functionality in Explore to behave in the same way as the dashboards and only allow editing after a chart is saved. Previously, the user could try to setup an email report but would face many errors because many parts of the feature depend on the saved state.

It improves rendering by returning the same instance of an empty report, used in useEffect, when there's none in the Redux store.

It also creates an specific DELETE_REPORT action to clearly separate the logic and avoid unnecessary queries.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Screen.Recording.2023-04-05.at.11.42.15.mov
Screen.Recording.2023-04-05.at.11.36.05.mov

TESTING INSTRUCTIONS

Check the videos for instructions.

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

@pull-request-size pull-request-size bot added size/L and removed size/M labels Apr 5, 2023
@codecov
Copy link

codecov bot commented Apr 5, 2023

Codecov Report

Merging #23588 (9bb93db) into master (117360c) will decrease coverage by 0.01%.
The diff coverage is 55.55%.

❗ Current head 9bb93db differs from pull request most recent head 40453a8. Consider uploading reports for the commit 40453a8 to get more accurate results

@@            Coverage Diff             @@
##           master   #23588      +/-   ##
==========================================
- Coverage   67.72%   67.71%   -0.01%     
==========================================
  Files        1916     1916              
  Lines       74029    74039      +10     
  Branches     8040     8041       +1     
==========================================
+ Hits        50135    50137       +2     
- Misses      21846    21852       +6     
- Partials     2048     2050       +2     
Flag Coverage Δ
javascript 53.95% <55.55%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
superset-frontend/src/reports/reducers/reports.js 33.33% <0.00%> (-4.77%) ⬇️
superset-frontend/src/reports/actions/reports.js 41.17% <50.00%> (+1.78%) ⬆️
...ponents/ReportModal/HeaderReportDropdown/index.tsx 64.28% <66.66%> (-3.22%) ⬇️
...rset-frontend/src/components/ReportModal/index.tsx 79.03% <66.66%> (+0.69%) ⬆️
superset-frontend/src/views/CRUD/hooks.ts 47.05% <100.00%> (ø)

... and 1 file with indirect coverage changes

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

@michael-s-molina michael-s-molina merged commit 290920c into apache:master Apr 6, 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/L 🚢 3.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants