NeuromatchAcademy / mastodon

A glitchy but lovable microblogging server
https://glitch-soc.github.io/docs/
GNU Affero General Public License v3.0
7 stars 2 forks source link

Mathjax from Mathstodon - Local #3

Closed sneakers-the-rat closed 1 year ago

sneakers-the-rat commented 1 year ago

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

sneakers-the-rat commented 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

j6k4m8 commented 1 year ago

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!!)

j6k4m8 commented 1 year ago

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!

sneakers-the-rat commented 1 year ago

OK I think it's good, i'm gonna pull to dev