-
Notifications
You must be signed in to change notification settings - Fork 38
Deeplinking playground - disable try button in mobile/tablet #176
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
base: main
Are you sure you want to change the base?
Conversation
inset-inline-end: var(--spectrum-global-dimension-size-125); | ||
} | ||
|
||
.code-try-button.is-disabled { |
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.
Should we not just hide the Try Now
button altogether instead of disabling it?
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.
This was suggested by Padma.
// hover:none detects devices without hover capability (touch-only) | ||
const cannotHover = window.matchMedia("(hover: none)").matches; | ||
|
||
return hasCoarsePointer || cannotHover; |
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.
Is this a standard way of detecting mobile? How relaible is this?
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 maxWidth check as well to make it more reliable.
const handleResize = () => setIsMobile(isMobileDevice()); | ||
window.addEventListener("resize", handleResize); | ||
return () => window.removeEventListener("resize", handleResize); |
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.
What is the need for this?
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.
Removed this.
Description
Deeplinking playground - disable try button in mobile/tablet
Related Issue
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: