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

[C, iOS, AND, UWP] TabbedPage SelectedTabColor and UnselectedTabColor #4899

Merged
merged 13 commits into from Mar 1, 2019

Conversation

@jfversluis
Copy link
Contributor

jfversluis commented Jan 4, 2019

Description of Change

I opened a previous PR (#3519) for this but that was an iOS-specific one, after the idea of #3478.
In that PR, we got the idea to make it available in general rather than via platform-specifics. This is the PR to do that.

There was already an Android platform-specific for this, I have marked that as obsolete in favor of this.

Issues Resolved

API Changes

Added:

  • Color TabbedPage.UnselectedTabColorProperty { get; set; } //Bindable Property
  • Color TabbedPage.SelectedTabColorProperty { get; set; } //Bindable Property

Platforms Affected

  • Core/XAML (all platforms)
  • iOS
  • Android
  • UWP

Behavioral/Visual Changes

The user is now able to specify a separate color for a selected and unselected tab. There shouldn't be any behavioral changes. Android users of the "old" On<Android>().SetBarItemColor(Color.Red); and On<Android>().SetBarSelectedItemColor(Color.White); will notice that these are now marked as obsolete and are directed to this new method which does the same.

Before/After Screenshots

Android

Before:

Android before

After:

Android after

iOS

Before:

iOS before

After:

iOS after

UWP

Before:

UWP before

After:

UWP after

Testing Procedure

Added a case to the gallery root page RootPages Gallery -> Tab->Content.

Testing on iOS

Original: https://www.dropbox.com/s/4zred5fkizo9y92/SelectedTabColor.mov?dl=0

PR Checklist

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

@jfversluis jfversluis requested a review from StephaneDelcroix as a code owner Jan 4, 2019

@jfversluis jfversluis changed the title Feature/3478 unselectedtabcolor [C, iOS, AND, UWP] TabbedPage SelectedTabColor and UnselectedTabColor Jan 4, 2019

@jfversluis

This comment has been minimized.

Copy link
Contributor Author

jfversluis commented Jan 7, 2019

Can I do anything about the failing tests?

jfversluis added some commits Jan 7, 2019

@mattleibow
Copy link
Contributor

mattleibow left a comment

LGTM

@StephaneDelcroix
Copy link
Member

StephaneDelcroix left a comment

almost there

Show resolved Hide resolved Xamarin.Forms.Core/TabbedPage.cs Outdated
Show resolved Hide resolved Xamarin.Forms.Core/PlatformConfiguration/AndroidSpecific/TabbedPage.cs Outdated

@samhouts samhouts moved this from In Review to In Progress in vCurrent (3.6.0) Jan 15, 2019

@jfversluis jfversluis force-pushed the jfversluis:feature/3478-unselectedtabcolor branch from 3818039 to c5b382b Jan 23, 2019

@jfversluis

This comment has been minimized.

Copy link
Contributor Author

jfversluis commented Jan 23, 2019

Removed last calls to (now) obsolete members in Android which caused the build to fail, sorry about that 🙂

@mattleibow
Copy link
Contributor

mattleibow left a comment

I think we accidentally dropped support for the platform specific. What we can do is make the platform specific just set the real property. This way, we have all new and beautiful code, but the old platform specifics still work.

@jfversluis

This comment has been minimized.

Copy link
Contributor Author

jfversluis commented Jan 24, 2019

@mattleibow I see your point, I'm just not a big fan of multiple ways to do the same thing, that is why I chose to deprecate the one method. Still, for that time I might be able to change the implementation to set the new property. Else we'll have two properties and two ways of doing the same thing. I'm even less of a fan of that 😉

This would also solve the (accidental) dropping the old way. Does that make sense?

Edit: Already made some changes, just awaiting the naming and deprecation then I guess!

@jfversluis jfversluis force-pushed the jfversluis:feature/3478-unselectedtabcolor branch from e550bac to 8d15d7b Jan 24, 2019

@mattleibow
Copy link
Contributor

mattleibow left a comment

Looking better. Just had a thought that if we are setting the new property via the old one, we don't actually need to check the old one anymore.

@samhouts samhouts added this to In Progress in vNext (4.0.0) Feb 2, 2019

@samhouts samhouts removed this from In Progress in vCurrent (3.6.0) Feb 2, 2019

@jfversluis jfversluis force-pushed the jfversluis:feature/3478-unselectedtabcolor branch from 4e9ea26 to e08f1f9 Feb 8, 2019

jfversluis added some commits Feb 8, 2019

@jfversluis

This comment has been minimized.

Copy link
Contributor Author

jfversluis commented Feb 8, 2019

Thanks @mattleibow ! Makes sense, I think I got all that you meant

@mattleibow
Copy link
Contributor

mattleibow left a comment

I think we are good.

@samhouts samhouts added the API-change label Feb 21, 2019

Apply suggestions from code review
Co-Authored-By: jfversluis <github@geraldversluis.nl>
@jfversluis

This comment has been minimized.

Copy link
Contributor Author

jfversluis commented Feb 22, 2019

Suggestion batch committed 😎 thanks @samhouts !

@samhouts samhouts changed the base branch from master to 4.0.0 Mar 1, 2019

@samhouts samhouts merged commit e60bfde into xamarin:4.0.0 Mar 1, 2019

11 of 12 checks passed

VSTS: iOS10 Validation UITests Finished
Details
VSTS: Android API19 Validation Fast Renderers UITests Finished
Details
VSTS: Android API19 Validation Legacy Renderers UITests Finished
Details
VSTS: Android API23 Validation Fast Renderers UITests Finished
Details
VSTS: Android API23 Validation Legacy Renderers UITests Finished
Details
VSTS: Android API25 Validation Fast Renderers UITests Finished
Details
VSTS: Android API25 Validation Legacy Renderers UITests Finished
Details
VSTS: Android API28 Validation Fast Renderers UITests Finished
Details
VSTS: Android API28 Validation Legacy Renderers UITests Finished
Details
VSTS: iOS11 Validation UITests Finished
Details
VSTS: iOS12 Validation UITests Finished
Details
license/cla All CLA requirements met.
Details

vNext (4.0.0) automation moved this from In Progress to Done Mar 1, 2019

@jfversluis jfversluis deleted the jfversluis:feature/3478-unselectedtabcolor branch Mar 2, 2019

@samhouts samhouts added this to the 4.0.0 milestone Mar 8, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.