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

feat(ios): support for html in AttributedStrings #13569

Merged
merged 15 commits into from
Oct 12, 2023

Conversation

Brianggalvez
Copy link
Contributor

Added support for html key when creating an AttributedString. If html is not present it fallbacks to previous behavior

Added support for html key when creating an AttributedString. If html is not present it fallbacks to previous behavior
@Brianggalvez Brianggalvez changed the title FEAT iOS: support for html in AttributedStrings FEAT (ios) support for html in AttributedStrings Sep 15, 2022
@Brianggalvez Brianggalvez changed the title FEAT (ios) support for html in AttributedStrings feat (ios) support for html in AttributedStrings Sep 15, 2022
@m1ga m1ga changed the title feat (ios) support for html in AttributedStrings feat(ios): support for html in AttributedStrings Sep 15, 2022
@m1ga
Copy link
Contributor

m1ga commented Sep 15, 2022

Hi, thanks for the contribution. Can you add a simple example please so people can quickly test it.

And have a look at https://github.com/tidev/titanium_mobile/blob/master/apidoc/Titanium/UI/AttributedString.yml and ad your property so it is visible in the documentation.

Check this page https://github.com/tidev/organization-docs/blob/main/AUTHORIZED_CONTRIBUTORS.md on how to become a contributor.

@hansemannn
Copy link
Collaborator

Once the CLA is signed, we can go ahead!

Copy link
Collaborator

@hansemannn hansemannn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code changes look fine

@Brianggalvez
Copy link
Contributor Author

Once the CLA is signed, we can go ahead!

I've signed on Wednesday, don't know if I need to do anything else

@hansemannn
Copy link
Collaborator

cc @joshualambert ?

@joshualambert
Copy link

Confirmed -- we now have a CLA signature for @Brianggalvez. Added him to authorized CLA list here: https://github.com/tidev/organization-docs/blob/main/AUTHORIZED_CONTRIBUTORS.md

CC: @Brianggalvez @hansemannn @m1ga

@hansemannn
Copy link
Collaborator

The CLA action seems to have an issue:

Run tidev/tidev-cla-action@v1
User Brianggalvez for commit 3ab3a60b1a50416d38083034f135990130d2499d is authorized
User Brianggalvez for commit 02b21cabc076df800f86adc18fed236e2623b31c is authorized
file:///home/runner/work/_actions/tidev/tidev-cla-action/v1/index.js:37
for (const { author: { login }, sha } of pr.data) {
                       ^

TypeError: Cannot read properties of null (reading 'login')
    at file:///home/runner/work/_actions/tidev/tidev-cla-action/v1/index.js:37:24
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

Maybe because of Brianggalvez vs brianggalvez? Mhh.

@hansemannn
Copy link
Collaborator

I've tested a bit with this PR (it works great!) and noticed that on Android, there is the "html" property on the label itself already. I am wondering if iOS could potentially also use this property and construct the NSAttributedString internally. That way, it's 100 % cross platform! Aside that, other attributes in NSAttributedString will be ignored anyways, so we could have one single API for both.

@hansemannn
Copy link
Collaborator

@Brianggalvez I've added the suggested changes in this PR to your branch: Brianggalvez#38

Great new API!

@hansemannn hansemannn merged commit ca4a7a9 into tidev:master Oct 12, 2023
4 of 5 checks passed
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.

4 participants