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 for login button being cut off on some mobile devices #1785

Merged
merged 3 commits into from
Jan 23, 2020

Conversation

stevehobbsdev
Copy link
Contributor

@stevehobbsdev stevehobbsdev commented Jan 22, 2020

Changes

This PR resolves an issue on mobile where the login button was being cut off towards the bottom of the screen. This PR implements the technique on CSS Tricks to dynamically calculate the screen height and apply that to a custom variable on :root where it can be picked up by the CSS. It uses 100vh as a fallback for those browsers that do not support custom variables.

See screenshots in comments.

References

Fixes #1706
Partial fix for #1783

Testing

This has been tested manually on:

  • Samsung Galaxy S6 (Chrome, Firefox)

  • Samsung Galaxy S9 (Chrome, Firefox)

  • Samsung Galaxy Note 8 (Chrome)

  • Pixel 1 (Chrome)

  • OnePlus 6T

  • Chrome Desktop

  • Firefox Desktop

  • IE11

  • This change adds unit test coverage

  • This change adds integration test coverage

  • This change has been tested on the latest version of the platform/language

Checklist

@stevehobbsdev stevehobbsdev added this to the vNext milestone Jan 22, 2020
@stevehobbsdev stevehobbsdev requested a review from a team January 22, 2020 13:09
@stevehobbsdev
Copy link
Contributor Author

Galaxy Note 8

galaxy-note-8

@stevehobbsdev
Copy link
Contributor Author

Galaxy S6 (Chrome)

galaxy-s6-chrome

@stevehobbsdev
Copy link
Contributor Author

Galaxy S9 (Chrome)

galaxy-s9-chrome

@stevehobbsdev
Copy link
Contributor Author

OnePlus 6T (Chrome)

oneplus-6t-chrome

@stevehobbsdev
Copy link
Contributor Author

Pixel 1 (Chrome)

pixel-1-chrome

@stevehobbsdev stevehobbsdev changed the title Calculated real container height for mobile Fix for login button being cut off on some mobile devices Jan 22, 2020
joshcanhelp
joshcanhelp previously approved these changes Jan 22, 2020
Copy link
Contributor

@joshcanhelp joshcanhelp left a comment

Choose a reason for hiding this comment

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

Small comment about duplication but not a show stopper

css/index.styl Outdated
@@ -1048,7 +1049,8 @@ loadingSize = 30px
.auth0-lock-widget-container
//mobile view
@media screen and (max-width: 480px)
height 100%
height 100vh /* Support browsers where custom properties are not supported */
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not very familiar with styl files but I would guess that this could be a mixin or something to avoid duplication?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes it can! Thanks for the idea. I've moved it into a mixin now.

@stevehobbsdev stevehobbsdev merged commit b474e38 into master Jan 23, 2020
@stevehobbsdev stevehobbsdev deleted the fix/mobile-login-button branch January 26, 2020 23:01
jfromaniello pushed a commit to jfromaniello/auth0-lock that referenced this pull request Mar 5, 2020
* Calculated real container height for mobile

* Moved height calculation into a mixin
jfromaniello pushed a commit to jfromaniello/auth0-lock that referenced this pull request Jul 23, 2020
* Calculated real container height for mobile

* Moved height calculation into a mixin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Login- and signup-button are cutoff on Android phones with screen ratio 19.5:9
2 participants