-
Notifications
You must be signed in to change notification settings - Fork 169
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
Markdown renderer replacement #432
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
app/src/main/java/com/jerboa/ui/components/common/InputFields.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/jerboa/ui/components/common/InputFields.kt
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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