HabitRPG / habitica-android

Native Android app for Habitica
GNU General Public License v3.0
1.42k stars 507 forks source link

Table markdown doesn't format correctly #1715

Closed saraolson closed 2 months ago

saraolson commented 2 years ago

Device: samsung SM-G960F Android Version: 29 AppVersion: Version 3.5 (3236) User ID: e8041fdf-aff4-44ba-829d-ea1790f2ab1d Level: 3 Class: warrior Is in Inn: false Uses Costume: false Custom Day Start: 0 Timezone Offset: -60 Details: Table markdown code doesn't work in Android. It shows unformatted at least in tasks (habits, dailies, to-do) notes and in chats like tavern chat.

Markdown code example used: Option Description
data path to data files to supply the data that will be passed into templates.
engine engine to be used for processing templates. Handlebars is the default.
EanLombardo commented 2 months ago

Dug into the code for this unfortunately this is a complex thing to fix. Right now the way markdown works in the app is by using markwon on to parse markdown into styled spans that get set on TextViews.

This doesn't work for things that cannot be rendered by textviews, like tables. The library has a way to render to tables, but every UI widget that is displaying markdown would have to be replaced with a dynamic widget that can understand when it needs to render more complex things like text.

There are a lot of places using markdown in the app and most of them are text views. It would take a large effort to cover them all, and also to make sure they all look good when given complex markdown like tables.

saraolson commented 2 months ago

@EanLombardo Thanks for looking into this! I agree this would be a relatively large project, and with little added benefit. Opting to close this issue to focus on prioritizing other features/bugs that help the majority of our player base.