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

MFM support in frontend #646

Open
aumetra opened this issue Feb 19, 2025 · 4 comments
Open

MFM support in frontend #646

aumetra opened this issue Feb 19, 2025 · 4 comments
Labels
enhancement New feature or request

Comments

@aumetra
Copy link
Member

aumetra commented Feb 19, 2025

Is your feature request related to a problem? Please describe.

N/A

Describe the solution you'd like

Implementing MFM for Kitsune. Animations are fun.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context

To quote @Y0ngg4n:
Image

Unfortunately will probably require a full custom parser for MFM. Still torn on whether I want to implement everything myself at that point, or if I want to just implement the superset features they added on top of markdown, and then just pass the transformed output to pulldown-cmark (the latter is probably the better option)

@aumetra aumetra added the enhancement New feature or request label Feb 19, 2025
@tesaguri
Copy link
Contributor

Misskey renders every Note as MFM no matter where it originated, from Misskey or otherwise, which is found controversial by some people (misskey-dev/misskey#15217). Is your intention to follow Misskey's spec and process every post as MFM, or only posts explicitly marked as MFM (e.g. source.mediaType === "text/x.misskeymarkdown")?

Also, even Misskey has end-user options to restrict the range of MFM features to accept (Enable advanced MFM and Enable animated MFM) and I think it'd be sensible to have similar restrictions for obvious accessibility reasons.

@aumetra
Copy link
Member Author

aumetra commented Feb 19, 2025

My intention was to only apply the transformation where source.mediaType === "text/x.misskeymarkdown", and for anything moving there'd be settings in the frontend to disable, for example, spin, tada, or shake (or just run them when hovering)

@aumetra
Copy link
Member Author

aumetra commented Feb 19, 2025

And as for the parser.. I'm right now prototyping something with Logos, but especially for nested functions (e.g. $[tada $[shake $[3x hello!]]]) it seems a little verbose.. maybe I can do some things with winnow instead.

@aumetra
Copy link
Member Author

aumetra commented Feb 19, 2025

Ugh, that nesting just makes things so much more complex than if I had a depth of 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants