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

feat: add disabledButtonTintColor prop in ActionSheetIOS #46883

Closed

Conversation

henninghall
Copy link
Contributor

@henninghall henninghall commented Oct 8, 2024

Summary:

Problem

Setting the tintColor prop in ActionSheetIOS also changes the tint of disabled entries. This could make them visually indistinguishable from enabled items. The degree to which they are indistinguishable depends on the tint color.

Solution

This new prop disabledButtonTintColor allows customization of disabled items' tint color.

Related PR: #31972

Changelog:

[IOS] [ADDED] - added disabledButtonTintColor prop to ActionSheetIOS

Test Plan:

Tested in RNTester project.

Before After
Screenshot Before Screenshot After
Before After

@facebook-github-bot
Copy link
Contributor

Hi @henninghall!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

@henninghall henninghall changed the title feat: add disabledButtonTintColor prop in ActionSheetIOS feat: add disabledButtonTintColor prop in ActionSheetIOS Oct 8, 2024
@facebook-github-bot
Copy link
Contributor

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 8, 2024
@henninghall henninghall marked this pull request as ready for review October 8, 2024 10:18
@facebook-github-bot facebook-github-bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Oct 8, 2024
@henninghall
Copy link
Contributor Author

@cortinico I there anything I can do to get someone to take a look at this PR? 🙏

@cortinico cortinico requested a review from cipolleschi November 4, 2024 19:37
Copy link
Contributor

@cipolleschi cipolleschi 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 good, thanks for the contribution

@facebook-github-bot
Copy link
Contributor

@cipolleschi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@lunaleaps
Copy link
Contributor

Commented on the imported PR but wondering about this

Setting the tintColor prop in ActionSheetIOS also changes the tint of disabled entries

Could we change ActionSheetIOS to not set the same tintColor to disabled entries? Or is that out of our control?

@lunaleaps
Copy link
Contributor

lunaleaps commented Nov 12, 2024

In addition, if a user didn't set disabledButtonTintColor, but did set tintColor, with this PR, would we still set the disabled action button tint color to tintColor? Should we also do the same thing for the cancel form?

@cipolleschi
Copy link
Contributor

Could we change ActionSheetIOS to not set the same tintColor to disabled entries? Or is that out of our control?

@lunaleaps this will break other apps that depend on the color being set.

@lunaleaps
Copy link
Contributor

Could we change ActionSheetIOS to not set the same tintColor to disabled entries? Or is that out of our control?

@lunaleaps this will break other apps that depend on the color being set.

Would it be worth a breaking change? Or is this component something we don't want to actively support? Overall I'd say my comments aren't blocking but since we're looking at this anyway

@cipolleschi
Copy link
Contributor

Would it be worth a breaking change?

This would be a subtle breaking change, because it's just a behavioral one. So it easier for it to go unnoticed. I'd rather to avoid breaking the component to avoid the confusion.

Or is this component something we don't want to actively support?

So far, we are supporting it. However, it is an amazing candidate to go into Lean Core 2.0.

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Nov 18, 2024
@facebook-github-bot
Copy link
Contributor

@cipolleschi merged this pull request in 089c87e.

@react-native-bot
Copy link
Collaborator

This pull request was successfully merged by @henninghall in 089c87e

When will my fix make it into a release? | How to file a pick request?

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. Merged This PR has been merged. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants