-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
[VISUAL ISSUE] Global create menu buttons don’t fill container on iPad #6453
Comments
Triggered auto assignment to @tjferriss ( |
Current assignee @tjferriss is eligible for the AutoAssignerTriage assigner, not assigning anyone new. |
Triggered auto assignment to @puneetlath ( |
Adding external label as I am an engineer and can confirm that it can be fixed this way. cc @puneetlath |
Assigning Weekly as this is a visual issue, and is also really easy to fix. |
Proposed Solution:Here is the problem:
So createMenuContainer always set Lines 826 to 829 in 36558e0
Solution: Add const propTypes = {
...,
// eslint-disable-next-line react/forbid-prop-types
containerStyles: PropTypes.object, // *** Add this code
...,
};
const defaultProps = {
...,
containerStyles: {}, // *** Add this code
};
// *** Update style as shown below
<View style={this.props.isSmallScreenWidth ? {} : [styles.createMenuContainer, this.props.containerStyles]}>
....
</View> Add below code to return (
<BasePopoverMenu
// eslint-disable-next-line react/jsx-props-no-spreading
{...this.props}
onMenuHide={this.onMenuHide}
onItemSelected={item => this.selectItem(item)}
containerStyles={styles.w100} // *** Add this code
/>
); Update below code to // *** Update style as shown below
<View style={this.props.isSmallScreenWidth ? {} : [styles.createMenuContainer, styles.w100]}>
....
</View> So this will solve problem everywhere for native iPad etc. For native small screen it behave as it is. Below is screen record: It works as expected after this updates. 6453-iPad.mp4 |
Makes sense thanks @Santhosh-Sellavel. And thanks for taking the time to make a proposal @PrashantMangukiya! |
#6278 would be reworked. It was reverted for regression. The author will fix the regression and resubmit. |
Then we are good here! |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Upload.from.GitHub.for.iOS.MOV
Action Performed:
Expected Result:
The button should flex grow to fill the entire container.
Actual Result:
The buttons have the same width they'd have on an iPhone.
Workaround:
N/A
Platform:
Where is this issue occurring?
Version Number:
Reproducible in staging?:
Reproducible in production?:
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
Expensify/Expensify Issue URL:
Issue reported by:
Slack conversation:
View all open jobs on GitHub
The text was updated successfully, but these errors were encountered: