Skip to content
This repository was archived by the owner on Feb 5, 2025. It is now read-only.

Conversation

@emilylaguna
Copy link
Contributor

@emilylaguna emilylaguna commented Apr 29, 2021

WPiOS Related PR: wordpress-mobile/WordPress-iOS#16407

In order to achieve the design for the Jetpack Prologue screen I needed to be able to change the NUXButton style just for that view. But since the NUXButton relies on WordPressAuthenticator.shared.style this was not possible.

I updated the NUXButton to include a new NUXButtonStyle style struct that defines the 3 different states: normal, highlighted, and disabled. This uses an internal struct called ButtonStyle that groups the style into backgroundColor, borderColor, and titleColor .

I also added a new way to configure the style of the button, but will fallback to the "legacy" way if that is not used. This prevents the button from breaking for the other areas it is used in the app while adding new functionality.

Testing Steps

  • You can follow the steps on the related PR
  • Since this also can affect WCiOS, please also test there
  • The NUXButton is used throughout WPiOS as well you can test the following locations:
    • Prepublishing bottom sheet
    • Domain registration view
    • Site Assembly

@emilylaguna emilylaguna added the enhancement New feature or request label Apr 29, 2021
@emilylaguna emilylaguna self-assigned this Apr 29, 2021
Copy link
Contributor

@frosty frosty left a comment

Choose a reason for hiding this comment

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

This looks great to me – I tested with the Jetpack PR, as well as a range of places in WPiOS where we use NUX buttons 👍

@emilylaguna emilylaguna merged commit f1d1e2c into develop Apr 30, 2021
@emilylaguna emilylaguna deleted the task/nuxbutton-styles branch April 30, 2021 16:09
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants