Skip to content

Conversation

varshini-adiga
Copy link
Collaborator

@varshini-adiga varshini-adiga commented Oct 16, 2025

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

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

inset-inline-end: var(--spectrum-global-dimension-size-125);
}

.code-try-button.is-disabled {
Copy link
Collaborator

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?

Copy link
Collaborator Author

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;
Copy link
Collaborator

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?

Copy link
Collaborator Author

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.

Comment on lines 117 to 119
const handleResize = () => setIsMobile(isMobileDevice());
window.addEventListener("resize", handleResize);
return () => window.removeEventListener("resize", handleResize);
Copy link
Collaborator

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?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Removed this.

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.

2 participants