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

Fix overlay size #26385

Merged
merged 3 commits into from
Sep 13, 2023
Merged
Changes from all 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
11 changes: 8 additions & 3 deletions src/styles/styles.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {defaultStyles as defaultPickerStyles} from 'react-native-picker-select/src/styles';
import {StyleSheet} from 'react-native';
import lodashClamp from 'lodash/clamp';
import fontFamily from './fontFamily';
import addOutlineWidth from './addOutlineWidth';
Expand Down Expand Up @@ -1520,8 +1519,14 @@ const styles = {
},

overlayStyles: (current) => ({
...StyleSheet.absoluteFillObject,
backgroundColor: themeColors.overlay,
Copy link
Contributor

Choose a reason for hiding this comment

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

This caused a regression #27353. The background color should have kept as overlay.

position: 'fixed',
Copy link
Member

@rushatgabhane rushatgabhane Aug 31, 2023

Choose a reason for hiding this comment

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

Does this work on iPad? If i'm not wrong, position type fixed doesn't work in react native.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, but the overlay is visible only for wide view and that's something we don't support yet on iOS and Android.

Copy link
Contributor

Choose a reason for hiding this comment

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

ios safari with ipad on landscape?

Copy link
Member

@rushatgabhane rushatgabhane Sep 1, 2023

Choose a reason for hiding this comment

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

could we think of some alternative solution that will work on landscape iPad?
I know that we don't support it yet, but I'd prefer to solve this problem for all platforms.

What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

By iOS and Android, I meant the native apps. It will work on safari/chrome mobile.

We could think about alternative solutions but supporting three pane view in native apps requires more changes anyway. I am not sure if it's worth doing now if the code can change.

Copy link
Contributor

Choose a reason for hiding this comment

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

@rushatgabhane I think it does not work at all in native ipad now so we should not spend time on it now, but I agree that making it work in ipad landscape should be on our list soon


// We need to stretch the overlay to cover the sidebar and the translate animation distance.
left: -2 * variables.sideBarWidth,
top: 0,
bottom: 0,
right: 0,
backgroundColor: Colors.black,
opacity: current.progress.interpolate({
inputRange: [0, 1],
outputRange: [0, variables.overlayOpacity],
Expand Down