-
Notifications
You must be signed in to change notification settings - Fork 210
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
feat(pair): Create various UX for pair/unsupported #17517
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
packages/fxa-content-server/app/images/graphic_broken_connection.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
packages/fxa-content-server/app/scripts/lib/glean/cadRedirectMobile.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | ||
|
||
// AUTOGENERATED BY glean_parser v14.5.2. DO NOT EDIT. DO NOT COMMIT. | ||
|
||
import EventMetricType from '@mozilla/glean/private/metrics/event'; | ||
|
||
/** | ||
* User viewed the "Connecting your mobile device" screen with instructions to | ||
* open on desktop after trying to access the pair flow on mobile | ||
* | ||
* Generated from `cad_redirect_mobile.view`. | ||
*/ | ||
export const view = new EventMetricType( | ||
{ | ||
category: 'cad_redirect_mobile', | ||
name: 'view', | ||
sendInPings: ['events'], | ||
lifetime: 'ping', | ||
disabled: false, | ||
}, | ||
[] | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 8 additions & 8 deletions
16
packages/fxa-content-server/app/scripts/templates/pair/failure.mustache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,9 @@ | ||
<div class="card-base"> | ||
<header> | ||
{{#isDesktopNonFirefox}} | ||
{{#showCADHeader}} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This conditional was easier than juggling it here in the mustache file. |
||
<header> | ||
<h1 class="mb-5 text-grey-400 text-base">{{#t}}Connect another device{{/t}}</h1> | ||
{{/isDesktopNonFirefox}} | ||
{{^isDesktopNonFirefox}} | ||
<h1 id="pair-unsupported-header" class="card-header">{{#t}}Pair using an app{{/t}}</h1> | ||
{{/isDesktopNonFirefox}} | ||
</header> | ||
</header> | ||
{{/showCADHeader}} | ||
|
||
<section> | ||
<div class="error"></div> | ||
|
@@ -25,11 +22,35 @@ | |
</div> | ||
{{/isDesktopNonFirefox}} | ||
|
||
{{^isDesktopNonFirefox}} | ||
<div class="bg-image-pair-fail"></div> | ||
{{#isMobile}} | ||
{{#isSystemCameraUrl}} | ||
<div class="bg-image-pair-fail"></div> | ||
<h2 id="pair-unsupported-header" class="card-header" tabindex="-1">{{#t}}Pair using an app{{/t}}</h1> | ||
<p class="mt-4">{{#t}}Did you use the system camera? You must pair from within a Firefox app.{{/t}}</p> | ||
{{/isSystemCameraUrl}} | ||
{{^isSystemCameraUrl}} | ||
{{^isFirefox}} | ||
<div class="flex bg-orange-50 px-4 py-3 rounded-lg mb-8"> | ||
<div class="bg-icon-warning bg-contain bg-center bg-no-repeat w-10" aria-label="{{#t}}Attention:{{/t}}" role="img"></div> | ||
<p class="ps-3 text-sm">{{#t}}Oops! It looks like you’re not using Firefox.{{/t}} <a href="{{{ escapedMobileDownloadLink }}}" target="_blank" class="link-blue" data-glean-id="cad_redirect_mobile_download">{{#t}}Download Firefox now{{/t}}</a></p> | ||
</div> | ||
{{/isFirefox}} | ||
|
||
<p>{{#t}}Did you use the system camera? You must pair from within a Firefox app.{{/t}}</p> | ||
{{/isDesktopNonFirefox}} | ||
<div class="bg-image-triple-device-hearts" role="img" aria-label="{{#t}}Devices with hearts on their screens{{/t}}"></div> | ||
|
||
<h1 class="card-header">{{#t}}Connecting your mobile device with your Mozilla account{{/t}}</h1> | ||
<p class="mt-4 text-base">Open Firefox on your computer, visit <b class="whitespace-nowrap">firefox.com/pair</b>, and follow the on-screen instructions to connect your mobile device.</p> | ||
<p class="mt-3"><a href="https://support.mozilla.org/kb/how-do-i-set-sync-my-computer" target="_blank" class="link-blue" data-glean-id="cad_redirect_mobile_learn_more">{{#t}}Learn more{{/t}}</a></p> | ||
{{/isSystemCameraUrl}} | ||
{{/isMobile}} | ||
{{^isMobile}} | ||
{{^isDesktopNonFirefox}} | ||
<!-- Users should never see this since desktop Firefox /pair should not redirect to pair/unsupported | ||
but fallback to generic message if so --> | ||
<div class="bg-image-pair-fail"></div> | ||
<h2 id="pair-unsupported-header" class="card-header" tabindex="-1">{{#t}}Oops! Something went wrong.{{/t}}</h2> | ||
<p class="mt-3">{{#t}}Please close this tab and try again.{{/t}}</p> | ||
{{/isDesktopNonFirefox}} | ||
{{/isMobile}} | ||
</section> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
QA recently reopened https://mozilla-hub.atlassian.net/browse/FXA-10258 and I have been stratching my head on this. I think the best thing to do is to remove the button completely and tell the user to login with their email.
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.
We should also be able to close the above ticket as well.
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.
Hmm was that a requested feature? If we shouldn't spend more time trying to fix it (I'm also not sure what's going on without investigating, I see the params are passed), I'm OK with removing it and revisiting when we do React work on that page.
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.
Chatted in Slack and Vijay will remove this with the linked ticket in a quick follow up after this lands.