Markdown renderer replacement#432
Conversation
This allows us to remove the markdown scaling applied to the editor which forced the text content to also be increased. Removed the compose-markdown package and created our own wrapper around the markwon libraries with a custom resolver for images. LemmyNet#373
|
I tested this out and it seems to work quite well. Text size is correct, and images render correctly and don't cause weird resizing and snapping issues I was experiencing with the previous renderer. |
|
Some follow up notes from testing:
Here is an excellent thread for testing: https://beehaw.org/post/433016 |
|
Thanks for the feedback @twizmwazin I found the issue / fix for the very small pictures. I will take a look at the other items soon |
|
Actually the best option will be to use image-coil as the backend. Testing it now with my other fix seems to work very well. No image unloading. Will do more testing and try and apply the same preview etc we use for post images. |
|
Did you look at this PR at all? #274 RichText material 3 seems to be the best future-proof option for markdown rendering... I just couldn't get images working properly with it. IMO it would be better to work on that directly to add better image support, since that would positively affect all jetpack-compose projects that need markdown. |
|
@dessalines I will take a look. So far I have updated the pull request with the coil implementation. So far it works pretty well (with limited testing) Apologies if i butchered the PR. Its my first stab at doing it "properly" |
|
Its no problem, I should be able to get to this tomorrow. |
dessalines
left a comment
There was a problem hiding this comment.
In my testing, I'd say this is already better than the current renderer, so great job! Just fix that one issue above, and we can merge.
dessalines
left a comment
There was a problem hiding this comment.
Also, there's one merge conflict.
Images show at approx 45% size in the markdown renderer.
This allows us to remove the markdown scaling applied to the editor which forced the text content to also be increased which made it inconsistent with the rest of the app.
Removed the compose-markdown package and created our own wrapper around the markwon libraries with a custom resolver for images.
#373