-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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 screen position for server / login / forgot password & mfa #8340
Conversation
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.
LGTM, just one potential improvement.
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.
Beautiful!
|
||
useEffect(() => { | ||
let offsetY = height / dimisher; | ||
if (offsetY < 80) { |
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.
nit: Can we make the magic number of 80 into a constant with proper variable naming?
like
const KEYBOARD_OFFSET_HEIGHT = 80;
@@ -270,7 +256,7 @@ const ForgotPassword = ({componentId, serverUrl, theme}: Props) => { | |||
const unsubscribe = Navigation.events().registerComponentListener(listener, componentId); | |||
|
|||
return () => unsubscribe.remove(); | |||
}, [dimensions]); | |||
}, [componentId, dimensions, translateX]); |
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.
}, [componentId, dimensions, translateX]); | |
// eslint-disable-next-line react-hooks/exhaustive-deps treat translateX.value like useRef | |
}, [componentId, dimensions.width]); |
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.
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.
Thanks @enahum. Looks like this resolves the issue!
I was unable to test the MFA screen, because as soon as I enabled it and enforced it in the system console, I'm getting a 'No teams are available to join' screen after logging in. I'm assuming this is not related to this specific PR though.
@matthewbirtch is not related to this PR but here is the thing, I can tell you for a fact that enforcing the MFA before the user has logged in, on mobile is not implemented, so the server will return the error and the mobile app will not handle it by requesting the MFA from the user. so you can try it if you enable MFA before logging in. Yes, we should create a ticket when MFA is enforced after the user has logged in. |
Yep, confirmed I was able to test the MFA token screen now after going through he MFA setup on webapp first. I'll create a ticket for adding this MFA setup screen to the mobile flow. |
* fix screen position for server / login / forgot password & mfa * refactor to use a hook * fix scroll to offset not to height * feedback review
Summary
Fixes the scrolling of the contents of the following screens on iPhone, iPad & Android as part of broken window fixes
Ticket Link
https://mattermost.atlassian.net/browse/MM-56150
Fixes: #8291
Release Note