this post was submitted on 01 May 2024
4 points (100.0% liked)

Arctic

373 readers
3 users here now

Arctic is a Lemmy client for iOS built on pure Swift. It currently supports iOS 15+ and Lemmy v0.17+

Get the latest version on TestFlight, or check it out on the AppStore.

If you would like to support Arctic’s development, feel free to Buy Me A Coffee

founded 1 year ago
MODERATORS
4
Another test table (self.arctic)
submitted 6 months ago* (last edited 6 months ago) by JaymesRS to c/arctic@lemmy.world
 

Edge cases can be weird, so I thought I’d share one. We used a markdown table to create a bingo card here And it renders goofy due to word wrap. I’m not sure what the best solution is for this so it’s more of just an FYI. Maybe wrapping text in the cell could help? It also seems like it might be ignoring text justification settings in the table

Thanks a ton.

top 2 comments
sorted by: hot top controversial new old
[–] CreatureSurvive@lemmy.world 6 points 6 months ago (1 children)

This is actually an issue I was aware of. Unfortunately textview on iOS does not have any native support for tables like the MacOS counterpart does. For tables in Arctic, I rolled my own using tab breaks for the layout, and some custom drawing for the background. This solution does not allow word wrapping within columns in the table, nor does text alignment work correctly when using tabs.

In the end, what I’ll end up doing for this, is embedding a custom view within the text view for rendering tables. This will come later as I plan to include this in a larger text rendering update that will allow for in-line media rendering, link previews and improved code and block quotes etc.

This would be a relatively trivial task using SwiftUI, but in UIKit, it’s going to take me some time to develop a custom solution.

[–] JaymesRS 2 points 6 months ago

You’re probably already aware of this, but since I occasionally use Mlem as well (in case I need to copy and paste between two different spots) so I checked there and it looks like their solution is to just scroll the table back-and-forth, which isn’t great, but it is another alternative. I like your solution, and appreciate the work you do. Thanks so much.