every time i try akkoma-fe it's just so so bad. Everything is outdated. Everything is misaligned. Everything is half-assed. Everything is poorly designed. It's like they don't care about front-end at all.
Post
Remote status
Context
9@hj The top bar changes are crimes against frontend design. Settings profiles are interesting though. And MFM is something I would want to do some time, but it requires writing a proper parser like BBCode, the Akkoma one is a hack.
I think even a hack is ok for MFM, since MFM itself is a hack.
@hj MFM only works in text without any formatting, which is something I don't like. I would want it to be a switch you can enable for any input type and it act as a preprocessor that generates the HTML.
@hj It's just a series of $[something] directives, how hard can it be. Famous last words.
There are two parts for this, the BE pre-processing parser that takes input when post has MFM enabled and generates a string with the MFM tags replaced with the HTML representation that is then sent to either another parser (like BBCode) or straight through. The second part is FE that provides the styling for the HTML.
For the BE parser, Nimble Parsec used by BBCode is pretty comfy at least to me, Akkoma implements their own lexer and everything.
You could implement it fully in FE, but then other frontends like Nicolium wouldn't be able to make use of it easily.
Replies
16The backend could also parse it in stages so "$[jelly.speed=2s idk] [i]italics[/i] the rest", would first be:
<span class="mfm-jelly" data-mfm-jelly="2s">idk</span> [i]italics[/i] the rest
and then:
<span class="mfm-jelly" data-mfm-jelly="2s">idk</span> <i>italics</i> the rest
It'll be like a cooler version of when everyone was spamming spinning, resized, and colored text a few years ago.
Imagine the possibilities.
<span>$[whatever </span>]
would result into
<span><span class="mfm-whatever"></span></span>.
where the last closing span is the one inserted by the parser. An empty span isn't an issue I think, removing the first span is worse, because there now is a closing span tag for nothing.
Still, both of those should be sanitized before that matters.