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

Wrong given_name placeholder in required attributes #7959

Closed
Edo-San opened this issue Mar 18, 2021 · 3 comments
Closed

Wrong given_name placeholder in required attributes #7959

Edo-San opened this issue Mar 18, 2021 · 3 comments
Assignees
Labels
to-be-reproduced Used in order for Amplify to reproduce said issue UI Related to UI Components

Comments

@Edo-San
Copy link
Contributor

Edo-San commented Mar 18, 2021

Describe the bug
Trivial copy-paste error that leads to the same string being used as a label and as a placeholder in the require attributes from Cognito.

To Reproduce

  1. Add given_name as a required attribute to a Cognito user pool.
  2. Initialize those attribute as empty, so that when a user logs in, he gets prompted the required attributes (including given_name)
  3. Check that the same string is used as the label and as the placeholder of the given_name required attribute.

Expected behavior
Two different strings should be used for the label and the placeholder.

Code Snippet

given_name: {
    label: I18n.get(Translations.GIVEN_NAME_LABEL),
    placeholder: I18n.get(Translations.GIVEN_NAME_LABEL),
  }

The bug is here https://github.com/aws-amplify/amplify-js/blob/main/packages/amplify-ui-components/src/common/helpers.ts at line 131.

@Edo-San
Copy link
Contributor Author

Edo-San commented Mar 23, 2021

FYI I already opened a PR here #7961

@Edo-San
Copy link
Contributor Author

Edo-San commented Mar 24, 2021

PR has been merged, I'm closing this :) Thanks guys!

@Edo-San Edo-San closed this as completed Mar 24, 2021
@ErikCH ErikCH added UI Related to UI Components and removed Amplify UI Components labels May 19, 2021
@github-actions
Copy link

This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.

Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels or Discussions for those types of questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
to-be-reproduced Used in order for Amplify to reproduce said issue UI Related to UI Components
Projects
None yet
Development

No branches or pull requests

4 participants