Skip to content
This repository has been archived by the owner on Sep 16, 2024. It is now read-only.

Link layout issues #3

Open
kevinrenskers opened this issue Mar 8, 2020 · 5 comments
Open

Link layout issues #3

kevinrenskers opened this issue Mar 8, 2020 · 5 comments

Comments

@kevinrenskers
Copy link

This is how the text is supposed to be laid out:

Screen Shot 2020-03-08 at 11 55 39

But this is what happens to links:

Screen Shot 2020-03-08 at 11 55 26

Screen Shot 2020-03-08 at 11 55 58

@mralexhay
Copy link

Also seeing this issue

@andr-ec
Copy link
Contributor

andr-ec commented Apr 21, 2020

Yes this is currently a limitation with SwiftUI. As soon as we add a modifier to text to allow for a clickable link, it becomes a view and we can no longer compose the text. So in this case links become their own line. We could fix this by dipping into UIKit for the links.

Unfortunately I don’t have a ton of time to look at this at the moment, but contributions are welcome!

@brett-eugenelabs
Copy link

I had a go at writing my own CommonMark Text widget in SwiftUI and also hit this problem, as Andre mentioned it is due to the way SwiftUI works, hopefully we get more support for attributed strings in SwiftUI 2.0 or even a wrap around stack which means we could mix Buttons and Text.

@mralexhay
Copy link

@acarrera94 that makes sense, thanks for the response 👍🏻

@andr-ec
Copy link
Contributor

andr-ec commented Aug 19, 2020

Looks like this might be possible in swiftUI. From blog and code.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants