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

refactor(components-native): surface--element instead of background as background color for non surface/container components #2231

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

edison-cy-yang
Copy link
Contributor

@edison-cy-yang edison-cy-yang commented Dec 10, 2024

Depends on #2227

Motivations

  • UI components that use surface--background have poor contrast on some surfaces

Changes

  • Components in components-native that use surface--background now have better visibility on all surfaces
  • Note that Chip in components-native will need a followup task to set background color for inactive state to surface--element instead of using the inactiveBackgroundColor prop.

Added

Changed

  • Changed all UI components in the components-native package (excluding surfaces & containers) that used color-surface--background to use color-surface--element instead

Deprecated

Removed

Fixed

Security

Testing

Changes can be
tested via Pre-release


In Atlantis we use Github's built in pull request reviews.

Random photo of Atlantis

Copy link

cloudflare-workers-and-pages bot commented Dec 10, 2024

Deploying atlantis with  Cloudflare Pages  Cloudflare Pages

Latest commit: 0b30717
Status: ✅  Deploy successful!
Preview URL: https://13e11fe7.atlantis.pages.dev
Branch Preview URL: https://job-111369-do-it-components-jphz.atlantis.pages.dev

View logs

@edison-cy-yang edison-cy-yang marked this pull request as ready for review December 10, 2024 22:51
@edison-cy-yang edison-cy-yang requested a review from a team as a code owner December 10, 2024 22:51
Copy link
Contributor

@chris-at-jobber chris-at-jobber left a comment

Choose a reason for hiding this comment

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

Same as web, mostly good with a few small changes!

@@ -29,6 +29,6 @@ export const styles = StyleSheet.create({
padding: tokens["space-smaller"],
},
activeDismissIcon: {
backgroundColor: tokens["color-surface--background"],
backgroundColor: tokens["color-interactive--background"],
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't actually recall why we need a different background color here, but that's probably a question for another day

@@ -14,7 +14,7 @@ export const styles = StyleSheet.create({
height: BAR_HEIGHT,
},
lightTheme: {
backgroundColor: tokens["color-surface--background"],
backgroundColor: tokens["color-interactive--background"],
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
backgroundColor: tokens["color-interactive--background"],
backgroundColor: tokens["color-surface--background"],

This is the toolbar above the native keyboard for things like the "Done" button, this isn't a "UI element" in the sense of the other components here

@@ -7,7 +7,7 @@ export const styles = StyleSheet.create({
justifyContent: "space-between",
alignItems: "center",
paddingHorizontal: tokens["space-small"],
backgroundColor: tokens["color-surface--background"],
backgroundColor: tokens["color-interactive--background"],
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
backgroundColor: tokens["color-interactive--background"],
backgroundColor: tokens["color-surface--background"],

Fairly sure this is related to the same element as the previous file

Copy link
Contributor

@chris-at-jobber chris-at-jobber left a comment

Choose a reason for hiding this comment

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

And that's the lot of them! Good to go @edison-cy-yang

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants