Jump to content

Mastodon/Mathjax: Difference between revisions

1,856 bytes added ,  19:20, 12 December 2022
no edit summary
(→‎Discord: new section)
No edit summary
Line 15: Line 15:
** (Supercedes original) Pulled into local <code>mathstodon-4.0.2</code> branch, removing font before pulling to feature branch: [[Has Pull Request::https://github.com/NeuromatchAcademy/mastodon/pull/3]]
** (Supercedes original) Pulled into local <code>mathstodon-4.0.2</code> branch, removing font before pulling to feature branch: [[Has Pull Request::https://github.com/NeuromatchAcademy/mastodon/pull/3]]
* '''Feature Branch:''' [[Has Branch::https://github.com/NeuromatchAcademy/mastodon/tree/feature-mathtex]]
* '''Feature Branch:''' [[Has Branch::https://github.com/NeuromatchAcademy/mastodon/tree/feature-mathtex]]
== Details of Implementation ==
glitch-soc uses "flavors" to style the frontend, which is different than base mastodon! To do this we'll need to move the mathstodon implementation into the 'glitch' flavor.
To do that, we can take account of what the mathstodon implementation does:
=== New Components ===
'''Scripts'''
* <code>app/javascript/mastodon/features/compose/util/autolatex/autolatex.js</code> - utility functions for writing latex
'''Components'''
* <code>app/javascript/mastodon/components/autosuggest_latex.js</code> - autosuggestions menu
* <code>app/javascript/mastodon/features/compose/components/latex_dropdown.js</code> - latex dropdown menu
** <code>app/javascript/mastodon/features/compose/containers/latex_dropdown_container.js</code> container for ^
=== Integration ===
'''On Feeds'''
* <code>app/javascript/mastodon/components/status_content.js</code> - renders mathjax present in any existing status
'''Composing'''
* <code>app/javascript/mastodon/actions/compose.js</code> imports autolatex and integrated in the compose component
* <code>app/javascript/mastodon/components/autosuggest_input.js</code> Adds additional AutosuggestLatex component
* <code>app/javascript/mastodon/components/autosuggest_textarea.js</code> Text area that import AutosuggestLatex
* <code>app/javascript/mastodon/features/compose/components/compose_form.js</code> Adds latex selection button
** <code>app/javascript/mastodon/features/compose/containers/compose_form_container.js</code> Container for ^
== Git Patching the Glitch Flavor ==
Dang that's complicated. So why don't we try to just apply the diff from the mathstodon changes in the main code directory and apply them in the 'glitch' flavor subdirectory, which seems to have the same structure?
https://www.howtogeek.com/devops/how-to-apply-git-commit-diffs-to-different-files/


== TODO ==
== TODO ==