The Wayback Machine - https://web.archive.org/web/20211009132718/https://github.com/NativeScript/NativeScript/pull/9598
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

fix(android): text-transform: capitalize consistency #9598

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

@kinshukdua
Copy link

@kinshukdua kinshukdua commented Oct 6, 2021

PR Checklist

What is the current behavior?

For Android text is split on " " (space) to get an array of words, then each word is lower-cased, then the first character of each word is changed to upper-case. iOS also splits on special characters like hyphen (-).
For example -
Input: "this is kind-Of-Magic - or a bUG?"
Android output: "This Is Kind-of-magic - Or A Bug?"
iOS output: "This Is Kind-Of-Magic - Or A Bug?"

What is the new behavior?

Any non-whitespace character that is preceded by the start of the string, whitespace, or any of these characters (-"'([{), gets replaced with its uppercase variant.
This is now consistent with iOS. Output for the same example
"this is kind-Of-Magic - or a bUG?" is now
"This Is Kind-Of-Magic - Or A Bug?" for both Android and iOS

Fixes/Implements/Closes #7059.

BREAKING CHANGES:
Output for text-transform: capitalize might differ for android.

make it consistent for android and ios

fix NativeScript#7059
@cla-bot cla-bot bot added the cla: yes label Oct 6, 2021
Copy link
Member

@rigor789 rigor789 left a comment

LGTM, but I think we should land this in 8.2 rather than a patch release given the breaking change in behavior

@rigor789 rigor789 added this to the 8.2 milestone Oct 6, 2021
@rigor789 rigor789 marked this pull request as draft Oct 6, 2021
@rigor789
Copy link
Member

@rigor789 rigor789 commented Oct 6, 2021

Converted to Draft so we don't accidentally merge before we start the 8.2 merges.

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

Successfully merging this pull request may close these issues.

2 participants