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

5.0/create chart images for dashboard emails 2 #380

Closed

Conversation

sunnavy
Copy link
Member

@sunnavy sunnavy commented Dec 20, 2023

No description provided.

bconry-bps and others added 5 commits December 20, 2023 15:07
This change allows the dashboard emails to contain image versions of
JSChart graphs obtained using WWW::Mechanize::Chrome.

Previously it was only possible to generate graph images for emails
using the GD module.

This Feature has been tested with Chrome, Chromium, Microsoft Edge, and
Opera.
The issue was initially noticed from dashboard jschart tests: tests
could pass with devel mode on but not without it. Turned out that
ckeditor.min.js has UTF-8 BOM and encoding the BOM twice broke js
syntax. Unlike devel mode where js files are wrapped into independent
"script" tags, squished js is wrapped into a single tag, thus JSChart
related code couldn't run because of earlier syntax error.

This commit makes sure that all text contents are decoded consistently.
Note that unlike css that $res->decoded_content automatically decodes
since its content type starts with "text/", js is not automatically
decoded by $res->decoded_content as its content type starts with
"application/".
The easiest approach is to convert these files using dos2unix.
@bestpractical-mirror bestpractical-mirror deleted the 5.0/create-chart-images-for-dashboard-emails-2 branch April 12, 2024 19:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants