Hi! I’m a developer for the Mlem iOS client. Join us on !mlemapp@lemmy.ml!

  • 0 Posts
  • 39 Comments
Joined 1 year ago
cake
Cake day: October 5th, 2023

help-circle


  • Sjmarf@lemmy.mltoProgrammer Humor@lemmy.mlSeen it coming
    link
    fedilink
    arrow-up
    4
    ·
    edit-2
    1 month ago

    Mlem dev here! Lemmy has a custom “flavor” of Markdown that is distinct from other social media platforms. Open-source markdown parsers and renderers exist for popular flavors of Markdown (e.g GitHub-flavor), but not for Lemmy-flavor. Most Lemmy clients choose to use an existing GitHub-flavor parser that is close enough to Lemmy’s to be indistinguishable in most cases. Mlem uses swift-markdown-ui to render markdown, which uses cmark-gfm as its parser.

    Lemmy’s spoiler format is unique to Lemmy-flavor markdown, so that’s one of the places where use of a third-party markdown parser is noticed by users. Other common parsing errors are subscript and footnotes.

    Adding spoiler support is not particularly easy, unfortunately. You can’t really apply spoiler-parsing logic on-top of another markdown parser - it has to be integrated into the parser itself. This is because the app needs to ignore spoiler markdown in certain situations, such as inside of a code block. The only good option is to write a custom markdown parser from scratch, or modify an existing markdown parser to support Lemmy’s markdown dialect. Both options can be difficult for developers for several reasons:

    • cmark-gfm is written in C, which the developer of the Lemmy client may not be familiar with.
    • If the app is using a third-party renderer, and not just a parser, that renderer also needs to be rewritten to support the new parsing logic.

    This takes a significant amount of time for comparatively little value for users, so most client developers didn’t prioritise it.

    In an upcoming Mlem version, we’re replacing our markdown parser renderer with a custom one that can render spoilers and subscripts, but we’ve got a way to go before we achieve full parity with Lemmy. If any developers of other apps are using cmark-gfm, you’re welcome to use our code from that repo under the terms of the licence.

    Sorry this is kinda long, I hope this answers your question









  • Mlem doesn’t have this option just yet, but we’re adding it the next beta. Memmy and Arctic have had it for a while.

    Adding such an option is very easy to do for iOS apps - Apple provides a simple API for it, so we just have to add a settings toggle. I’m not familiar with how it works in Android development, but it may be more complicated.





  • Hey there! We’re aware that the comment-collapse animation is a little jarring; this is something we want to improve in future.

    You can simplify the animations used when switching pages and when opening the image viewer by going into System Settings -> Accessibility -> Per-App Settings (right at the bottom) and enabling “Reduce Motion” and “Prefer cross-fade transitions” for Mlem.

    Disabling the comment-collapsing animation isn’t yet possible. I’ve opened an issue for this on our GitHub, and will look into disabling it when “Reduce Motion” is enabled 👍


  • Yep, that’s another way it could be done. We’re hoping to add a text-selecting popup in the next major update, which will make this possible. However, it’s not quite as seamless as having a dedicated “Translate” button that replaces the post/comment content inline, which I’d prefer to use if implementing it proves to be feasible.





  • Mlem is an open-source project developed by unpaid volunteers. Anyone is welcome to start or stop contributing to Mlem at any time.

    The number of people in our development team is the number of people who are passionate enough about the project to spend their free time working on it. We don’t control that number, and we certainly can’t just “expand our dev team” like a company can by employing more developers.

    The “crunch” you refer to was during the large influx of users migrating from Reddit. During that time more people (including myself) became interested in the project, and naturally a subset of those people were interested in developing for it. The development team grew because of the increased interest towards the project, not just because we wanted to expand it.

    If someone wants to contribute a custom low-level markdown renderer to the project, they’re more than welcome to.