-
Notifications
You must be signed in to change notification settings - Fork 14k
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 page xlsx export #24005
feat: dashboard page xlsx export #24005
Conversation
Hello @EugeneTorap, it's done. |
Hi @vitoldi, can you merge |
@vitoldi, pls, fix the prettier error
|
@EugeneTorap, prettier error fixed. |
renderWrapper(props); | ||
expect(props.exportXLSX).toBeCalledTimes(0); | ||
userEvent.hover(screen.getByText('Download')); | ||
userEvent.click(await screen.findByText('Export to .XLSX')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vitoldi pls, fix the unit test. Use Excel
instead of .XLSX
Error: Unable to find an element with the text: Export to .XLSX.
This could be because the text is broken up by multiple elements.
In this case, you can provide a function for your text matcher to make your matcher more flexible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codecov Report
@@ Coverage Diff @@
## master #24005 +/- ##
=======================================
Coverage 68.27% 68.28%
=======================================
Files 1952 1952
Lines 75468 75476 +8
Branches 8202 8203 +1
=======================================
+ Hits 51529 51537 +8
Misses 21832 21832
Partials 2107 2107
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
@villebro @dpgaspar @michael-s-molina Can you review this PR? |
Officially requested these reviewers. |
} | ||
|
||
exportXLSX() { | ||
this.exportTable('xlsx', false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is totally fine for now, but just wondering if folks will also want to do a "Full Excel" export like we do with CSV (when that feature flag is enabled). I'm totally fine skipping it for now, since it might cause performance issues, but it just made me wonder ¯\_(ツ)_/¯
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While I'm on the topic, I wonder if the logger should also discern between regular and "full" CSV exports, in case anyone is trying to discern performance impact. Maybe an additional log for full CSV exports?
Again, not the point of this PR, but mentioning the bycatch...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM, but haven't tested it yet. Couple of comments about bycatch that might be worth exploring in a subsequent PR.
@vitoldi I think we can merge this, but now there's a conflict. Would you mind doing a quick rebase? |
@rusackas, I have resolved the conflict. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This feature is released with version 3.0.0. |
SUMMARY
The Superset 2.1.0 release has new feature: excel export. But the feature is only available on the Chart page. Our customers have no access to the Chart page, so the Dashboard page is a primary place where we wanted Excel Export option.
This PR adds the ability to export to Excel on the Dashboard page.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Before:
After:
ADDITIONAL INFORMATION
Resolves #23711