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

[modules][system-ui] Persist user selected background color #22773

Merged

Conversation

alanjhughes
Copy link
Collaborator

Why

Closes ENG-8736

How

Setting the background color is now persisted and restored when the app is launched (on iOS). On Android, a new function had to be added to restore the color on app start. If no color is provided the default will be black when in dark mode or white otherwise.

Test Plan

Tested on physical devices and emulators with bare expo.

@alanjhughes alanjhughes requested a review from tsapeta June 6, 2023 22:42
@expo-bot expo-bot added the bot: suggestions ExpoBot has some suggestions label Jun 6, 2023
@expo-bot expo-bot added bot: passed checks ExpoBot has nothing to complain about and removed bot: suggestions ExpoBot has some suggestions labels Jun 6, 2023
@alanjhughes alanjhughes requested a review from tsapeta June 8, 2023 19:51
@brentvatne
Copy link
Member

waiting on review from @tsapeta

packages/expo-system-ui/src/SystemUI.ts Outdated Show resolved Hide resolved
Kudo added a commit that referenced this pull request Dec 15, 2023
# Why

expo-system-ui config plugin will setup `RCTRootViewBackgroundColor`
from app.json's `ios.backgroundColor` to info.plist. from #22773, we
break this and expo-system-ui will always use system default color as
the background color:
https://github.com/expo/expo/blob/e281adb30e978c382220686ffb0cb1b665f8d3c5/packages/expo-system-ui/ios/ExpoSystemUI/ExpoSystemUIModule.swift#L44-L60

# How

if the color is not persisted yet, we should respect the color from
`RCTRootViewBackgroundColor`
onizam95 pushed a commit to onizam95/expo-av-drm that referenced this pull request Jan 15, 2024
)

# Why

expo-system-ui config plugin will setup `RCTRootViewBackgroundColor`
from app.json's `ios.backgroundColor` to info.plist. from expo#22773, we
break this and expo-system-ui will always use system default color as
the background color:
https://github.com/expo/expo/blob/e281adb30e978c382220686ffb0cb1b665f8d3c5/packages/expo-system-ui/ios/ExpoSystemUI/ExpoSystemUIModule.swift#L44-L60

# How

if the color is not persisted yet, we should respect the color from
`RCTRootViewBackgroundColor`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot: passed checks ExpoBot has nothing to complain about
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants