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

Switch to write-excel-file for table export #525

Merged
merged 7 commits into from
Jul 27, 2023

Conversation

paulwarren-wk
Copy link
Contributor

Reason for change

See #416 - a large part of the viewer JS file was the exceljs library.

Description of change

Replace the use of exceljs with the much smaller write-excel-file. This change reduces the size of the production ixbrlviewer.js from 1.8MiB to 834KiB.

Steps to Test

Open a report with tables in it, and confirm that the "Export Table" output works as it did before.

review:
@Workiva/xt
@paulwarren-wk

brettkail-wk
brettkail-wk previously approved these changes Jul 18, 2023
data = JSON.parse(jsonString);
}
catch (e) {
return;
Copy link
Contributor

Choose a reason for hiding this comment

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

Out of curiosity, why is this needed? Does write-excel-file send messages internally to itself?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Seemingly - something is creating 20 or so messages at the point that the file is downloaded. I couldn't immediately make sense of it, but I think it might be coming from jsZip which write-excel-file depends on.

Copy link
Contributor

Choose a reason for hiding this comment

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

It would be good to add a comment explaining that we're swallowing exceptions in order to ignore messages coming from the write-excel-file dependency.

iXBRLViewerPlugin/viewer/src/js/tableExport.js Outdated Show resolved Hide resolved
@aviary2-wf
Copy link

Security Insights

No security relevant content was detected by automated scans.

Action Items

  • Review PR for security impact; comment "security review required" if needed or unsure
  • Verify aviary.yaml coverage of security relevant code

Questions or Comments? Reach out on Slack: #support-infosec.

@paulwarren-wk paulwarren-wk requested a review from a team as a code owner July 27, 2023 08:59
@aviary-wf
Copy link

Security Insights

No security relevant content was detected by automated scans.

Action Items

  • Review PR for security impact; comment "security review required" if needed or unsure
  • Verify aviary.yaml coverage of security relevant code

Questions or Comments? Reach out on Slack: #support-infosec.

@austinmatherne-wk austinmatherne-wk linked an issue Jul 27, 2023 that may be closed by this pull request
@austinmatherne-wk austinmatherne-wk merged commit a147609 into Arelle:master Jul 27, 2023
30 checks passed
@austinmatherne-wk austinmatherne-wk added the minor-release Pull requests that should trigger a minor version bump label Jul 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Merge Requirements Unmet minor-release Pull requests that should trigger a minor version bump
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Minimize exceljs build size
6 participants