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

[Dark Mode] Standardize Overlay Colors #13408

Merged
merged 9 commits into from
Dec 13, 2022
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ PODS:
- React-Core
- react-native-image-manipulator (1.0.5):
- React
- react-native-image-picker (4.10.1):
- react-native-image-picker (4.10.2):
grgia marked this conversation as resolved.
Show resolved Hide resolved
- React-Core
- react-native-netinfo (8.3.1):
- React-Core
Expand Down Expand Up @@ -980,7 +980,7 @@ SPEC CHECKSUMS:
react-native-document-picker: f68191637788994baed5f57d12994aa32cf8bf88
react-native-flipper: dc5290261fbeeb2faec1bdc57ae6dd8d562e1de4
react-native-image-manipulator: c48f64221cfcd46e9eec53619c4c0374f3328a56
react-native-image-picker: f2ab1215d17bcfe27b0eb6417cc236fd1f4775e7
react-native-image-picker: bf34f3f516d139ed3e24c5f5a381a91819e349ea
react-native-netinfo: 1a6035d3b9780221d407c277ebfb5722ace00658
react-native-pdf: 33c622cbdf776a649929e8b9d1ce2d313347c4fa
react-native-plaid-link-sdk: 77052f329310ff5a36ddda276793f40d27c02bc4
Expand Down
4 changes: 2 additions & 2 deletions src/components/Modal/BaseModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ class BaseModal extends PureComponent {
onSwipeComplete={this.props.onClose}
swipeDirection={swipeDirection}
isVisible={this.props.isVisible}
backdropColor={themeColors.modalBackdrop}
backdropOpacity={hideBackdrop ? 0 : 0.5}
backdropColor={themeColors.overlay}
backdropOpacity={hideBackdrop ? 0 : 0.6}
grgia marked this conversation as resolved.
Show resolved Hide resolved
backdropTransitionOutTiming={0}
hasBackdrop={this.props.fullscreen}
coverScreen={this.props.fullscreen}
Expand Down
2 changes: 1 addition & 1 deletion src/components/RoomHeaderAvatars.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ const RoomHeaderAvatars = (props) => {
<View
style={[
styles.roomHeaderAvatar,
styles.screenBlur,
styles.roomHeaderAvatarOverlay,
]}
/>
<Text style={styles.avatarInnerTextChat}>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {Animated} from 'react-native';
import variables from '../../../styles/variables';
import getCardStyles from '../../../styles/cardStyles';
import themeColors from '../../../styles/themes/default';

export default (
isSmallScreenWidth,
Expand Down Expand Up @@ -34,9 +35,10 @@ export default (
},
cardStyle,
overlayStyle: {
backgroundColor: themeColors.overlay,
opacity: progress.interpolate({
inputRange: [0, 1],
outputRange: [0, 0.3],
outputRange: [0, 0.6],
grgia marked this conversation as resolved.
Show resolved Hide resolved
extrapolate: 'clamp',
}),
},
Expand Down
13 changes: 7 additions & 6 deletions src/styles/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -1734,7 +1734,8 @@ const styles = {
width: 28,
borderWidth: 2,
borderStyle: 'solid',
backgroundColor: themeColors.opaqueAvatar,
backgroundColor: themeColors.overlay,
opacity: variables.overlayOpacity,
borderRadius: 24,
zIndex: 6,
},
Expand Down Expand Up @@ -1972,14 +1973,14 @@ const styles = {
marginLeft: -16,
},

screenBlur: {
roomHeaderAvatarOverlay: {
position: 'absolute',
top: 0,
right: 0,
bottom: 0,
left: 0,
backgroundColor: themeColors.inverse,
opacity: 0.5,
backgroundColor: themeColors.overlay,
opacity: variables.overlayOpacity,
},

avatarInnerTextChat: {
Expand Down Expand Up @@ -2496,13 +2497,13 @@ const styles = {
},

cardOverlay: {
backgroundColor: themeColors.modalBackdrop,
backgroundColor: themeColors.overlay,
position: 'absolute',
top: 0,
left: 0,
width: '100%',
height: '100%',
opacity: 0.5,
opacity: variables.overlayOpacity,
},

communicationsLinkIcon: {
Expand Down
7 changes: 3 additions & 4 deletions src/styles/themes/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ const darkTheme = {
transparent: colors.transparent,

// Additional keys
overlay: colors.greenHighlightBackground,
inverse: colors.white,
shadow: colors.black,
componentBG: colors.greenAppBackground,
Expand All @@ -46,8 +47,7 @@ const darkTheme = {
textMutedReversed: colors.greenIcons,
textError: colors.red,
offline: colors.greenIcons,
opaqueAvatar: 'rgba(198, 201, 202, 0.64)',
modalBackdrop: colors.greenIcons,
modalBackdrop: colors.greenHighlightBackground,
modalBackground: colors.greenAppBackground,
cardBG: colors.greenHighlightBackground,
cardBorder: colors.greenHighlightBackground,
Expand Down Expand Up @@ -87,8 +87,6 @@ const oldTheme = {
textMutedReversed: colors.gray3,
buttonDefaultBG: colors.gray2,
offline: colors.gray3,
sidebarButtonBG: 'rgba(198, 201, 202, 0.25)',
opaqueAvatar: 'rgba(011, 027, 052, 0.64)',
modalBackdrop: colors.gray3,
modalBackground: colors.gray2,
buttonDisabledBG: colors.gray2,
Expand All @@ -104,6 +102,7 @@ const oldTheme = {
cardBG: colors.gray1,
cardBorder: colors.gray1,
checkBox: colors.blue,
overlay: colors.gray1,

// Merging new Keys for Dark Mode merge. Delete after new branding is implemented.
highlightBG: colors.gray1,
Expand Down
1 change: 1 addition & 0 deletions src/styles/variables.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ export default {
optionRowHeight: 64,
optionRowHeightCompact: 52,
optionsListSectionHeaderHeight: getValueUsingPixelRatio(54, 60),
overlayOpacity: 0.6,
lineHeightSmall: getValueUsingPixelRatio(14, 16),
lineHeightNormal: getValueUsingPixelRatio(16, 21),
lineHeightLarge: getValueUsingPixelRatio(18, 24),
Expand Down