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

Add Permissions Button color customization #84

Merged
merged 3 commits into from
Feb 16, 2021

Conversation

bjtitus
Copy link
Collaborator

@bjtitus bjtitus commented Feb 13, 2021

Adds permissions button colors properties to KanvasColors:

  • KanvasColors.permissionsButtonColor
  • KanvasColors.permissionsButtonAcceptedBackgroundColor

We want to customize these colors a bit for WordPress iOS: #54

@bjtitus bjtitus self-assigned this Feb 16, 2021
@bjtitus bjtitus marked this pull request as ready for review February 16, 2021 04:08
Copy link
Collaborator

@danielebogo danielebogo left a comment

Choose a reason for hiding this comment

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

LGTM! One question:
Do you think the function func cameraColors() -> KanvasColors in KanvasCustomUI may return .shared instead? It seems like the KanvasColors value returned there is the same generated by the shared function.

@bjtitus
Copy link
Collaborator Author

bjtitus commented Feb 16, 2021

Thanks @danielebogo! 😀

It looks like a few of the colors are slightly different, causing 42 tests to fail the snapshot diffs if I switch to KanvasColors.shared. I guess it's kind of nice that we are testing that the overridden colors work 🤷‍♂️.

I think the Colors + Fonts override API should change so that we aren't mutating the static KanvasColors.shared property. I feel like that's not a very safe way to do things, but it would have required more extensive code changes to access them inside of Kanvas.

@danielebogo
Copy link
Collaborator

Thanks @bjtitus !

@bjtitus bjtitus merged commit 6bb8c87 into main Feb 16, 2021
@bjtitus bjtitus deleted the stories/permissionsButtonColors branch February 16, 2021 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants