-
Notifications
You must be signed in to change notification settings - Fork 258
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
UI4: Modal Post-Migration Fixes #4718
Conversation
0ce9fad
to
b7f0224
Compare
justifyContent: 'space-between', | ||
alignSelf: 'center', // Shrink view around buttons | ||
alignItems: 'stretch', // Stretch our children out | ||
flexDirection: 'column' |
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.
Not needed, since the "column" direction is already the default.
|
||
return <MainButton key={key} label={label} marginRem={0.5} type={type} onPress={handlePress} /> | ||
})} | ||
return <MainButton key={key} label={label} marginRem={0.25} type={type} onPress={handlePress} layout="column" /> |
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.
Why not use ButtonUi4
directly, and avoid having to hack MainButton
?
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.
I wanted to avoid the rename of escape
to tertiary
, but you're right that's probably better since we barely use that button type in this modal.
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.
Ok, we can do it later then.
7230d23
to
4f746c6
Compare
</View> | ||
<ModalUi4 | ||
bridge={bridge} | ||
warning={warning} |
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.
I was unable to get the corner of the yellow border to round on iOS...
4f746c6
to
3e2e7f6
Compare
{ | ||
// Hack around the Android keyboard glitch: | ||
Platform.OS === 'android' ? <View style={{ flex: 1 }} /> : null | ||
} | ||
<ButtonsViewUi4 |
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.
Hack not needed. Keyboard is fine on Android on a small screen
<ModalMessage>{lstrings.password_reminder_enter_password_below}</ModalMessage> | ||
</ScrollView> | ||
<ModalUi4 bridge={bridge} title={lstrings.password_reminder_remember_your_password} onCancel={this.handleCancel}> | ||
<ModalMessage>{lstrings.password_reminder_you_will_need_your_password}</ModalMessage> |
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.
No need for a scrollview here, looks fine on a small Android.
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.
Added some comments in this PR
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.
Some small stuff we can hit post-staging if needed, but let's get this in.
@@ -220,59 +220,60 @@ export function WalletListModal(props: Props) { | |||
// #endregion Renderers | |||
|
|||
return ( | |||
<ThemedModal bridge={bridge} onCancel={handleCancel}> | |||
<ModalTitle center>{headerTitle}</ModalTitle> | |||
<ModalUi4 |
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.
We might need to port the WalletList
to use a FlatList
from react-native-gesture-handler. When I tried this last week the list was not scrollable.
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's scrollable right now. The trick was to let the modal deal with the scroll directly.
@@ -72,7 +72,7 @@ export function ListModal<T>({ | |||
return ( | |||
<ModalUi4 title={title} bridge={bridge} onCancel={handleCancel}> | |||
{message == null ? null : <ModalMessage>{message}</ModalMessage>} | |||
{textInput == null ? null : ( | |||
{textInput == null || !textInput ? null : ( |
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.
Since textInput
has a default value up above, it will never be null
. You can simply remove the == null
check.
5df29c8
to
bcd561b
Compare
- Fix blur positioning for fullscreen modals - Remove extra view for rounding BlurView bounds - Remove extra view around non-scrolling children. This allows `flex: 1` children without a modal-wide scroll to work as they did before. - Move title handling into the modal itself.
This is an interim quick fix before we just fully remove dependencies on ModalParts. There's no need to retain anything from ModalParts anymore once fully migrated to UI4 - they weren't really doing anything special to begin with.
Quick hack fix to kind of obtain the result of ButtonsViewUi4 with consistent button widths. An additional audit will need to be performed to determine which buttons should be primary/secondary/tertiary before we can migrate them to ButtonsViewUi4 and enforce our rule of not having multiple buttons of the same type in a column layout.
Some modals have inconsistent centered titles and this change unifies them all. Making this change will allow us to easily center all titles later if that's what we prefer.
Needs a redesign. We have a bunch of empty title space here, and at the same time we can't push the FlipInput card all the way up there because then the X button would have weird alignment over the inner FlipInput card
bcd561b
to
28f261c
Compare
iOS (left) and small screen Android (right):
We need a redesign for FlipInput. Empty title whitespace, but moving the inner card up would make weird margins with the close button if it were on the top corner of the card
CHANGELOG
Does this branch warrant an entry to the CHANGELOG?
Dependencies
noneRequirements
If you have made any visual changes to the GUI. Make sure you have: