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: Adding report bug #16065

Merged
merged 2 commits into from Aug 4, 2021
Merged

Conversation

AAfghahi
Copy link
Member

@AAfghahi AAfghahi commented Aug 4, 2021

SUMMARY

The reducer for the add reports feature was being sent the wrong information, this fixes it. It also adds margin left to the toggle active button.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Screen.Recording.2021-08-04.at.11.37.37.AM.mov

Screen Shot 2021-08-04 at 12 14 41 PM
Screen Shot 2021-08-04 at 12 14 22 PM

TESTING INSTRUCTIONS

Go to dashboards with ALERT_REPORTS set to true, and a role that has admin. Add a report.

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

@codecov
Copy link

codecov bot commented Aug 4, 2021

Codecov Report

Merging #16065 (f305df3) into master (1917464) will decrease coverage by 0.00%.
The diff coverage is 16.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #16065      +/-   ##
==========================================
- Coverage   76.80%   76.80%   -0.01%     
==========================================
  Files         995      995              
  Lines       52866    52868       +2     
  Branches     6713     6714       +1     
==========================================
  Hits        40605    40605              
- Misses      12035    12037       +2     
  Partials      226      226              
Flag Coverage Δ
javascript 71.29% <16.66%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
superset-frontend/src/reports/actions/reports.js 10.86% <0.00%> (ø)
.../ReportModal/HeaderReportActionsDropdown/index.tsx 24.32% <25.00%> (-1.39%) ⬇️

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 1917464...f305df3. Read the comment docs.

@@ -60,14 +60,15 @@ export default function HeaderReportActionsDropDown({
};

const menu = () => (
<Menu selectable={false}>
<Menu selectable={false} css={{ width: '200px' }}>
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't this be style instead of css?

https://ant.design/components/menu/#Menu

Copy link
Member

Choose a reason for hiding this comment

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

emotion uses css, and I believe we prefer that over style which hits the dom directly.

<Menu.Item>
{t('Email reports active')}
<Switch
data-test="toggle-active"
checked={report?.active}
onClick={(checked: boolean) => toggleActiveKey(report, checked)}
size="small"
css={{ marginLeft: '8px' }}
Copy link
Member

Choose a reason for hiding this comment

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

Same here?

Also, should we use grid units here?

Copy link
Member

Choose a reason for hiding this comment

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

+1 on the grid units

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 point! Added, ty.

@pull-request-size pull-request-size bot added size/S and removed size/XS labels Aug 4, 2021
@eschutho
Copy link
Member

eschutho commented Aug 4, 2021

@betodealmeida I'm going to merge, but feel free to comment if you think something wasn't addressed (looks like everything was).

@eschutho eschutho merged commit 4359650 into apache:master Aug 4, 2021
@eschutho eschutho deleted the ch21501_alertReportBug branch August 4, 2021 18:37
@rosemarie-chiu
Copy link
Contributor

🏷 2021.31

henryyeh pushed a commit to preset-io/superset that referenced this pull request Aug 6, 2021
* report add fix

* added theme

(cherry picked from commit 4359650)
villebro pushed a commit that referenced this pull request Aug 9, 2021
* report add fix

* added theme

(cherry picked from commit 4359650)
@villebro villebro added the v1.3 label Aug 9, 2021
villebro pushed a commit that referenced this pull request Aug 10, 2021
* report add fix

* added theme

(cherry picked from commit 4359650)
opus-42 pushed a commit to opus-42/incubator-superset that referenced this pull request Nov 14, 2021
* report add fix

* added theme
cccs-RyanS pushed a commit to CybercentreCanada/superset that referenced this pull request Dec 17, 2021
* report add fix

* added theme

(cherry picked from commit 4359650)
QAlexBall pushed a commit to QAlexBall/superset that referenced this pull request Dec 28, 2021
* report add fix

* added theme
QAlexBall pushed a commit to QAlexBall/superset that referenced this pull request Dec 29, 2021
* report add fix

* added theme

(cherry picked from commit 4359650)
cccs-rc pushed a commit to CybercentreCanada/superset that referenced this pull request Mar 6, 2024
* report add fix

* added theme

(cherry picked from commit ccfd16d)
@mistercrunch mistercrunch added 🍒 1.3.0 🍒 1.3.1 🍒 1.3.2 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.4.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 preset:2021.31 size/S v1.3 🍒 1.3.0 🍒 1.3.1 🍒 1.3.2 🚢 1.4.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants