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

Decrease chart.js bytes #1368

Merged
merged 3 commits into from
Feb 19, 2019
Merged

Decrease chart.js bytes #1368

merged 3 commits into from
Feb 19, 2019

Conversation

geppy
Copy link
Contributor

@geppy geppy commented Feb 18, 2019

Description

Excluded data for unsupported locales, and removed an unused dependency.

More Details

  • Configured Webpack to exclude moment.js locale data for locales ifme doesn't support.
  • Removed unused chartjs dependency (typo of chart.js)

Corresponding Issue

Issues

unlocalized charts

We aren't actually configuring the locale for charts: time axis labels are always in English (at least on /moments: tested in prod, and tested in a container with my changes).

chart.js pulls in all the moment.js locales, but only ever uses the builtin English locale data (unless you reconfigure moment.js before using chart.js). They're abandoning time axis labeling altogether, so we'll need to handle labels ourselves:

@julianguyen Has anyone worked on #726?

Copy link
Member

@julianguyen julianguyen left a comment

Choose a reason for hiding this comment

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

Awesome work - just one comment 🎉 Thanks so much!

@@ -30,7 +30,6 @@
"axios": "^0.18.0",
"babel-core": "7.0.0-bridge.0",
"chart.js": "^2.6.0",
"chartjs": "^0.3.24",
Copy link
Member

Choose a reason for hiding this comment

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

Great catch! Oh wow, we had that and chart.js 🤔

client/webpack.config.js Outdated Show resolved Hide resolved
@geppy geppy merged commit dd17384 into ifmeorg:master Feb 19, 2019
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.

2 participants