Skip to content
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

Add Heading and Icon concatenation support #276

Closed

Conversation

bul-nick-al
Copy link
Contributor

@bul-nick-al bul-nick-al commented Aug 22, 2022

Add the ability to concatenate Icon and Heading of various styles in any order. Inspired by How to insert images into text.

This addition will allow us to create layouts with text akin to this
Screenshot 2022-08-22 at 23 47 17

@bul-nick-al bul-nick-al requested a review from a team as a code owner August 22, 2022 21:28
@sjavora
Copy link
Member

sjavora commented Aug 23, 2022

Thinking about it more, do we even need the wrapper? We could make a generic + instead...

@bul-nick-al
Copy link
Contributor Author

bul-nick-al commented Aug 23, 2022

Thinking about it more, do we even need the wrapper? We could make a generic + instead...

We need a wrapper, that is a view because that seems to be the only way to pass sizeCategory to each of the concatenated texts. The correct way would be using ViewModifier for such purposes but it does not allow to preserve the view type (and it is needed to use the concatenation), even if the applied modifier does not change that type. In this case I need to SwiftUI.Text to stay SwiftUI.Text and .modifier does not let me do that, there is a stack overflow question about that.

I am not 100% sure but it seems to me that later we could replace ContentSizeType in (ContentSizeType) -> SwiftUI.Text? with a struct that would collect any necessary post-processing information that can be applied to the final text, including accessibility identifiers, other dynamic environment values and so on. Probably it will allow us to one day add this support to Orbit.Text as well

@sjavora
Copy link
Member

sjavora commented Aug 23, 2022

Hmm that's quite a lot of failures 🤔

No idea how to trigger a manual job on a fork though...

@PavelHolec
Copy link
Collaborator

Hmm that's quite a lot of failures 🤔

No idea how to trigger a manual job on a fork though...

@sjavora @bul-nick-al it should be available for running from the fork repo

image

@sjavora
Copy link
Member

sjavora commented Aug 25, 2022

@PavelHolec nope. At least not for me.

Screenshot 2022-08-25 at 9 15 54

@PavelHolec PavelHolec closed this Aug 25, 2022
@PavelHolec
Copy link
Collaborator

@PavelHolec nope. At least not for me.

Thats because the repo owner has to first accept the workflows. And even then, it could be that only the author can see them (could also depend on the forked repo settings)

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

Successfully merging this pull request may close these issues.

None yet

4 participants