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

MWPW-155489 [PEP] Add device type as PEP criteria #2931

Merged
merged 1 commit into from
Sep 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions libs/blocks/global-navigation/global-navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -637,9 +637,12 @@ class Gnav {
const state = getMetadata('app-prompt')?.toLowerCase();
const entName = getMetadata('app-prompt-entitlement')?.toLowerCase();
const promptPath = getMetadata('app-prompt-path')?.toLowerCase();
const hasMobileUA = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini|Touch/i.test(navigator.userAgent);
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: wouldn't isMobile be clearer?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We have checks like isDesktop that check viewport size, which is what we check by default. I'd like to keep this name to differentiate it from the viewport size checks.

Copy link
Contributor

Choose a reason for hiding this comment

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

Is there any analytics data pointing to all of these being used by our users? The iPod was discontinued more than 2 years ago. Blackberry, IEMobile and Touch don't seem to be all that popular either according to this.


if (state === 'off'
|| !window.adobeIMS?.isSignedInUser()
|| !isDesktop.matches
|| hasMobileUA
|| !entName?.length
|| !promptPath?.length) return;

Expand Down
Loading