Skip to content
This repository was archived by the owner on May 1, 2024. It is now read-only.

[Core] Added TextTransform property #3690

Merged
merged 10 commits into from
May 8, 2020
Merged

[Core] Added TextTransform property #3690

merged 10 commits into from
May 8, 2020

Conversation

paymicro
Copy link
Contributor

@paymicro paymicro commented Aug 31, 2018

Description of Change

Added TextTransform property to the Label

Issues Resolved

API Changes

Added:

  • TextTransform InputView.TextTransform { get; set; } //Bindable Property
Internals.TextTransform.Uppercase
Internals.TextTransform.Lowercase
Internals.TextTransform.None

Platforms Affected

  • Core (all platforms)

Before/After Screenshots

Not applicable

Testing Procedure

  • run Issue 3667
  • click on button "Change TextTransform"
  • check result

PR Checklist

  • Has automated tests
  • Rebased on top of the target branch at time of PR
  • Changes adhere to coding standard

Copy link
Member

@rmarinho rmarinho left a comment

Choose a reason for hiding this comment

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

We might need some discussion with the rest of the team, but we might want this on ITextElement as this will need to work with css text-transform,
Definitely needs some unit tests if it's on Core.
Some screenshots to make sure to make a previous screenshot so we make sure we don't break existing Labels.

I wonder if instead of Title we should use Capitalize

Copy link
Member

@StephaneDelcroix StephaneDelcroix left a comment

Choose a reason for hiding this comment

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

If this is an effect, it should only be applied before being rendered, and not on the Text property itself.

I think TitleCase should be left out of this.

@samhouts samhouts removed e/4 🕓 4 excellent-report has-stacktrace Bugs without reproductions but that contain a stack trace. labels Oct 4, 2018
@xamarin-release-manager xamarin-release-manager added the API-change Heads-up to reviewers that this PR may contain an API change label Oct 5, 2018
@jfversluis
Copy link
Member

How are we doing on this? Still feel it would be a valuable addition. @paymicro can you still do it? Else I might take a look :)

Copy link
Member

@rmarinho rmarinho left a comment

Choose a reason for hiding this comment

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

Setting it back to None does't work on Android, and GTK the other stuff seems to work fine.
GTK text on button doesn't respect it seems (not important)

@paymicro
Copy link
Contributor Author

@rmarinho on Android text changes on one way... It may be wrong to lose original text.

@rmarinho
Copy link
Member

@paymicro can you rebase please?

@rmarinho
Copy link
Member

@paymicro I wonder if we could while we are doing this add a virtual method called UpdateFormsText on the Renderers or something, so users could more easily override this behaviour if they want since we are messing with that part of the code.

@jsuarezruiz
Copy link
Contributor

droid3690

@rmarinho
Copy link
Member

rmarinho commented May 5, 2020

@jsuarezruiz i fixed that issue on Android , can you double check ?!
THanks

@samhouts samhouts removed the request for review from StephaneDelcroix May 7, 2020 00:20
@samhouts samhouts requested a review from StephaneDelcroix May 7, 2020 00:20
@samhouts samhouts added the approved Has two approvals, no pending reviews, and no changes requested label May 7, 2020
@rmarinho rmarinho merged commit abd7aa9 into xamarin:master May 8, 2020
@paymicro paymicro deleted the fix-gh3667-textTransform branch May 8, 2020 12:23
@Mikilll94
Copy link

In which version of XF this feature is available?

@jfversluis
Copy link
Member

@Mikilll94 this was merged into master so that would be 4.8

@samhouts samhouts added this to the 4.8.0 milestone Jun 27, 2020
samhouts added a commit that referenced this pull request Jul 1, 2020
bmacombe pushed a commit to bmacombe/Xamarin.Forms that referenced this pull request Jul 7, 2020
* [C] Added TextTransform property

* [UITests] Update test Issue3667

* [Android] Don't update Forms text with text with transform

* [Android] Don't always use text on button with uppercase

* [Controls] Fix initial set of transformation

* [Android] Don't update Forms text with text with transform

* Update TextElement.cs

* Update InlineCSS.xaml.cs

* [UITests] Fix test

Co-authored-by: Rui Marinho <[email protected]>
@davidortinau
Copy link
Contributor

This doesn't work when using FormattedString or on Span. Tested on Android API29

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a/label a/Xaml </> API-change Heads-up to reviewers that this PR may contain an API change approved Has two approvals, no pending reviews, and no changes requested ControlGallery Core F100 in-progress This issue has an associated pull request that may resolve it! p/Android p/gtk p/iOS 🍎 p/macOS p/UWP p/WPF proposal-open stale This PR has been awaiting changes for a long time. It should either be closed or revised! t/enhancement ➕
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Enhancement] Add text-transforms to Label
9 participants