Use Marked and marked-mfm for MFM rendering #29

Merged
floatingghost merged 7 commits from nbsp/pleroma-fe:marked-mfm into develop 2022-07-15 09:57:17 +00:00
Contributor

significantly simplifies completely removes mfm_content.jsx, instead relying on RichContent. moves styling to mfm.css.

  • mfm attributes with values (.speed=3s, .deg=20) don't work, since the css attr() function doesn't work on animation or transform. need to mutate the output HTML manually.
  • mentions and hashtags don't work (akkomagang/akkoma#58)
  • general ugliness that i need to fix before it's ready
~~significantly simplifies~~ *completely removes* `mfm_content.jsx`, instead relying on `RichContent`. moves styling to `mfm.css`. - [x] mfm attributes with values (`.speed=3s`, `.deg=20`) don't work, since the css `attr()` function doesn't work on `animation` or `transform`. need to mutate the output HTML manually. - [x] mentions and hashtags don't work (akkomagang/akkoma#58) - [x] general ugliness that i need to fix before it's ready
nbsp added 2 commits 2022-07-09 11:40:37 +00:00
Author
Contributor

this last commit doesn't work on current akkoma, as it relies on the proposed changes to the backend, where status.content_type is a thing and the MFM content is in raw_html wait no i'm dumb actually i should be able to do more than this

~~this last commit doesn't work on current akkoma, as it relies on the proposed changes to the backend, where `status.content_type` is a thing and the MFM content is in `raw_html`~~ wait no i'm dumb actually i should be able to do more than this
nbsp force-pushed marked-mfm from 465db46dac to 52b19abaa3 2022-07-10 19:54:30 +00:00 Compare
nbsp force-pushed marked-mfm from 52b19abaa3 to faeadbb778 2022-07-10 19:57:17 +00:00 Compare
Author
Contributor

apart from search being completely and utterly broken, this works well!
i'll try to fix the search tomorrow

apart from search being completely and utterly broken, this works well! i'll try to fix the search tomorrow
nbsp force-pushed marked-mfm from faeadbb778 to 8861835580 2022-07-12 17:40:34 +00:00 Compare
Author
Contributor

with search yeeted, this pr is ready to merge

with search yeeted, this pr is ready to merge
nbsp changed title from [WIP] Use Marked and marked-mfm for MFM rendering to Use Marked and marked-mfm for MFM rendering 2022-07-12 17:44:42 +00:00

:hanaPog: i'll try this tomorrow and make sure it all works gud(tm)

it'll be nice to purge that hacky mfm renderer

:hanaPog: i'll try this tomorrow and make sure it all works gud(tm) it'll be nice to purge that hacky mfm renderer
nbsp added 1 commit 2022-07-13 18:01:00 +00:00
ci/woodpecker/pr/woodpecker Pipeline was successful Details
a8f9734400
Don't greentext MFM
Author
Contributor

quick update: disabled meme arrows for MFM since they should be actual quotes anyway
and it messes with HTML tags

quick update: disabled meme arrows for MFM since they should be actual quotes anyway and it messes with HTML tags

getting errors running the pr

Uncaught (in promise) TypeError: proxy set handler returned false for property '"greentext"'
render rich_content.jsx:75

seeing if there's an easy fix

getting errors running the pr >Uncaught (in promise) TypeError: proxy set handler returned false for property '"greentext"' > render rich_content.jsx:75 seeing if there's an easy fix

ah right the quick fix applied on this pr changes props which vue does not like, i'll shuffle the scope around

ah right the quick fix applied on this pr changes props which vue does not like, i'll shuffle the scope around

but otherwise it all works, nice

i'll patch the two bugs i found, but the rest looks good

but otherwise it all works, nice i'll patch the two bugs i found, but the rest looks good
floatingghost merged commit 931ed3d3c7 into develop 2022-07-15 09:57:17 +00:00
nbsp deleted branch marked-mfm 2022-07-15 10:14:51 +00:00
Sign in to join this conversation.
No description provided.