-
Notifications
You must be signed in to change notification settings - Fork 149
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
feat: global screen wrapper #1321
base: main
Are you sure you want to change the base?
feat: global screen wrapper #1321
Conversation
Signed-off-by: Mostafa Gamal <[email protected]>
Signed-off-by: Mostafa Gamal <[email protected]>
Signed-off-by: Mostafa Gamal <[email protected]>
Signed-off-by: Mostafa Gamal <[email protected]>
Signed-off-by: Mostafa Gamal <[email protected]>
Signed-off-by: Mostafa Gamal <[email protected]>
Quality Gate passedIssues Measures |
//Customizing Terms screen custom header | ||
/* | ||
this.container.registerInstance(TOKENS.OBJECT_ONBOARDING_CONFIG, { | ||
...DefaultScreenOptionsDictionary, | ||
[Screens.Terms]: { | ||
...DefaultScreenOptionsDictionary[Screens.Terms], | ||
headerShown: false, | ||
}, | ||
}) | ||
this.container.registerInstance(TOKENS.OBJECT_LAYOUT_CONFIG, { | ||
...DefaultScreenLayoutOptions, | ||
[Screens.Terms]: { | ||
...DefaultScreenLayoutOptions[Screens.Terms], | ||
customEdges: ['bottom'], | ||
safeArea: true, | ||
Header: () => ( | ||
<View style={{ backgroundColor: 'red', height: 129, justifyContent: 'center', alignItems: 'center' }}> | ||
<Text style={{ color: 'white' }}>Custom Header</Text> | ||
</View> | ||
), | ||
}, | ||
}) | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
const { safeArea, customEdges, style, Header } = screenProps || { | ||
safeArea: false, | ||
customEdges: ['top', 'left', 'right', 'bottom'], | ||
style: {}, | ||
header: undefined, | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It shouldn't be? :
const { safeArea, customEdges, style, Header } = screenProps || {
safeArea: false,
customEdges: ['top', 'left', 'right', 'bottom'],
style: {},
+ Header: undefined,
}
[Screens.Terms]: { | ||
customEdges: ['top', 'left', 'right'], | ||
}, | ||
//TODO: Add more screens here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be clear that adding new screens here requires submitting a new PR to include the wrapper at the screen level as well.
However, I wonder if it might be more efficient to handle everything within this PR instead.
Summary of Changes
This is a first step into having a global screen wrapper to allow more customization over pages layout
Included
Replace this text with a high-level summary of the changes included in this PR.
Related Issues
Please reference here any issue #'s that are relevant to this PR, or simply enter "N/A" if this PR does not relate to any existing issues.
Pull Request Checklist
Tick all boxes below to demonstrate that you have completed the respective task. If the item does not apply to your this PR check it anyway to make it apparent that there's nothing to do.
Signed-off-by
line (we use the DCO GitHub app to enforce this);If you have any questions to any of the points above, just submit and ask! This checklist is here to help you, not to deter you from contributing!
Pro Tip 🤓
PR template adapted from the Python attrs project.