-
Notifications
You must be signed in to change notification settings - Fork 25
[MAINTAIN-200] remove buttons margin for non IOS devices. #110
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.
Your thoughts?
openy_af4_vue_app/package.json
Outdated
@@ -12,6 +12,7 @@ | |||
"bootstrap": "^4.6.0", | |||
"bootstrap-vue": "^2.21.2", | |||
"core-js": "^3.18.3", | |||
"mobile-device-detect": "^0.4.3", |
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.
Are we sure we want to have this library https://github.com/duskload/mobile-device-detect/pulls
A lot of opened security issues @hamrant
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'd rather fork it or get maintainer access and fix those security issues
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.
@podarok nice catch!
Ok, we can try a solution without an additional library with data from Window.navigator
- https://developer.mozilla.org/en-US/docs/Web/API/Window/navigator (For now it has good browser compatibility).
How to detect iOs device - https://racase.com.np/javascript-how-to-detect-if-device-is-ios/
How to detect mobile device - https://stackoverflow.com/questions/11381673/detecting-a-mobile-browser
const isMobile = navigator.userAgentData.mobile; //resolves true/false
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.
Great, let's use it instead of insecure dependency
Thank you @hamrant
I used only checking by |
Issue This PR should improve indents between buttons and the bottom of the screen on iOs/Android devices.
This PR should be compared on mobile iOS and Android (mobile resolution of desktop browser)
Steps for review (on mobile):
Ages
step https://i.imgur.com/1xQnb5E.png and go through all steps