Closed sneakers-the-rat closed 1 year ago
we could probs use glitch-soc flavors for this: https://github.com/NeuromatchAcademy/mastodon/blob/main/app/javascript/flavours/glitch/theme.yml
that's if we wanted to make it something we could pull upstream - i imagine people would want the ability to turn off having to load 760KB of unnecessary JS if they didn't want to have mathjax enabled
760KB is so tiny compared to the ~5ish MB that automatically load that I don't know we need to worry about lazy-loading that or anything (there's so much that we could optimize first), but adding a switch to disable would be a good second PR I think!
(two PRs also has the advantage of making it super easy to PR back into our upstreams!!)
As a sidenote, this looks good modulo some linting/codestyle in the imported files, but I think probably more important to have the same code as the upstreams than to make it match our styleguide? i.e., cleaner diffs is probably more important here? I can convert this into a format code review when you think it's ready!
OK I think it's good, i'm gonna pull to dev
In order to edit the initial PR so that we don't pull the fonts into our repository (maybe?) making a temporary branch and then merging into the feature branch, where we can then pull it into dev.
Continues: https://github.com/NeuromatchAcademy/mastodon/pull/2 Wiki page: https://wiki.neuromatch.io/Mastodon/Mathjax
TODO