Skip to content

Add support for textDecorationLine to Android - #3816

Closed
mfenniak wants to merge 1 commit into
react:masterfrom
mfenniak:android-text-decoration
Closed

mfenniak wants to merge 1 commit into
react:masterfrom
mfenniak:android-text-decoration

Conversation

@mfenniak

@mfenniak mfenniak commented Nov 1, 2015

Copy link
Copy Markdown

Attached PR adds support for the none, underline, line-through, and 'underline line-through' textDecorationLine style elements to Android, and, updates the UIExplorer to display these options.

Note that textDecorationColor and textDecorationStyle have not been added as well because there is no straight-forward way to support these options in Android.

@facebook-github-bot

Copy link
Copy Markdown
Contributor

By analyzing the blame information on this pull request, we identified @mkonicek, @kmagiera and @andreicoman11 to be potential reviewers.

@facebook-github-bot facebook-github-bot added GH Review: review-needed CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. labels Nov 1, 2015

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Rather than checking for this specific ordering of options, it'd be more robust to start with no paint flags, split the string on spaces (so we get an array of options), and apply them each to the bitmask so we'd support "line-through underline" and potentially also combinations with "overline" one day.

It looks like the iOS side is similarly constrained but it seems like a good change to make.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I did consider that, but I weighed precise compatibility with the iOS side as more valuable than the future flexibility. It prevents an Android developer from writing a style (eg. 'line-through underline') that works only on Android without being aware of it.

That said, I'd be happy to add compatible flexible parsing to both platforms. Do you think it would make sense to include that change in this PR?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Good point about x-platform parity. Would you like to submit a follow-up PR that adds flexible parsing to Android and iOS? That'd be awesome!

@mrcasals

Copy link
Copy Markdown
Contributor

Maybe close this PR in favor of #3819. Discussion is happening there.

@ide

ide commented Nov 12, 2015

Copy link
Copy Markdown
Contributor

Yeah. As the other PR mentions, this one can be closed.

@ide ide closed this Nov 12, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants