-
Notifications
You must be signed in to change notification settings - Fork 305
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
fix(web/react-native/ui): use translated strings and censorContactMethod for VerifyUser screen #5034
Conversation
🦋 Changeset detectedLatest commit: d6f1adc The changes in this PR will be included in the next version bump. This PR includes changesets to release 14 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
class="amplify-flex amplify-radio" | ||
data-amplify-verify-label | ||
id="verify" | ||
<template |
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.
It looks like "value" could potentially be undefined based on the type, so I wrapped the radio options in a <template v-if>
. Not sure if this is the best fix for that?
Additionally, I re-ordered the elements because the radio circle was showing after the label text and removed the duplicated "verify" id
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.
LGTM!
packages/vue/src/components/__tests__/__snapshots__/authenticator.spec.ts.snap
Outdated
Show resolved
Hide resolved
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.
🚢
Description of changes
Fixes an issue on the VerifyUser screen in Vue where the verification options were not getting properly translated and displayed. I copied the same method from our React library. I moved the censorContactInformation utility to the
ui
package and updates usage across Angular, Vue, React and React Native.React
No visual change, just refactored to use the censorContactInformation that is now exported from
ui
packageAfter
Angular
Angular's translations weren't broken, but it wasn't showing the censored contact information like in React.
Vue
Vue was not showing the correct translations, nor the censored contact info. Additionally, the radio was rendering after the text and there was a repeated
id
on the inputs and wrapping label elements. Since ids must be unique and we're not relying on them (and any customer relying on them would likely have encountered unexpected/broken results), I removed them.React Native
No visual change, verified via VerifyUser snapshot test.
Left some comments inline.
Issue #, if available
Fixes #4986
Description of how you validated changes
Tested in vue example app using my own aws-exports for a email/phone sign in. Then I manually unverified my user's email/phone and attempted to login to view the verification screen (screenshots above).
Checklist
yarn test
passes and tests are updated/addedsideEffects
field updatedBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.