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

chore: display error messages for PIN screens inline mode #1253

Merged

Conversation

MosCD3
Copy link
Contributor

@MosCD3 MosCD3 commented Sep 9, 2024

Summary of Changes

Customize the wallet to allow inline style of displaying error/warning messages on Input PIN screens
This will be a non-default behaviour through an injectable

Note for reviewers
Removed the App.tsx file in packages/legacy/app since its not being used and it might be confusing for developers

A video demonstration here

Screen.Recording.2024-09-09.at.10.01.33.AM.mov

Related Issues

Related to Issue: #1251

Pull Request Checklist

Tick all boxes below to demonstrate that you have completed the respective task. If the item does not apply to your this PR check it anyway to make it apparent that there's nothing to do.

  • All commits contain a DCO Signed-off-by line (we use the DCO GitHub app to enforce this);
  • Updated LICENSE-3RD-PARTY.md for any added dependencies or vendored components;
  • Updated documentation as needed for changed code and new or modified features;
  • Added sufficient tests so that overall code coverage is not reduced.

If you have any questions to any of the points above, just submit and ask! This checklist is here to help you, not to deter you from contributing!

Pro Tip 🤓

  • Read our contribution guide at least once; it will save you a few review cycles!
  • Your PR will likely not be reviewed until all the above boxes are checked and all automated tests have passed.

PR template adapted from the Python attrs project.

Copy link

sonarcloud bot commented Sep 9, 2024

@MosCD3 MosCD3 marked this pull request as ready for review September 9, 2024 14:09
@MosCD3 MosCD3 added the enhancement New feature or request label Sep 9, 2024
@jleach jleach changed the title chore: Display error messages for PIN screens inline mode chore: display error messages for PIN screens inline mode Sep 10, 2024
@knguyenBC
Copy link
Contributor

knguyenBC commented Sep 16, 2024

Can the inline error message be configurable so that it can also appear below the text input? BC's design system specifies that the error/help text is below:
image

@jleach
Copy link
Contributor

jleach commented Oct 8, 2024

@MosCD3 Will revisit this PR once he is finished with the OpenID4VC PR.

@jleach jleach marked this pull request as draft October 8, 2024 15:20
@jleach jleach added the do not merge Don't merge when label present label Oct 8, 2024
Signed-off-by: Mostafa Gamal <[email protected]>
Signed-off-by: Mostafa Gamal <[email protected]>
Signed-off-by: Mostafa Gamal <[email protected]>
Signed-off-by: Mostafa Gamal <[email protected]>
Signed-off-by: Mostafa Gamal <[email protected]>
Signed-off-by: Mostafa Gamal <[email protected]>
@MosCD3 MosCD3 removed the do not merge Don't merge when label present label Oct 24, 2024
@MosCD3 MosCD3 marked this pull request as ready for review October 24, 2024 15:37
Signed-off-by: Mostafa Gamal <[email protected]>
@bryce-mcmath bryce-mcmath added do not merge Don't merge when label present and removed do not merge Don't merge when label present labels Oct 25, 2024
@MosCD3 MosCD3 added the do not merge Don't merge when label present label Oct 28, 2024
Mostafa Youssef added 2 commits October 28, 2024 11:27
Signed-off-by: Mostafa Youssef <[email protected]>
Signed-off-by: Mostafa Youssef <[email protected]>
@MosCD3 MosCD3 removed the do not merge Don't merge when label present label Oct 29, 2024
@MosCD3 MosCD3 requested review from bryce-mcmath and removed request for bryce-mcmath October 29, 2024 16:30
Copy link
Contributor

@bryce-mcmath bryce-mcmath left a comment

Choose a reason for hiding this comment

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

Just one small organizational nitpick. As a side note, did you find it to be a hassle keeping the modal style errors as an option? I wonder if it would be better to just go all in on inline errors.

packages/legacy/core/App/container-api.ts Outdated Show resolved Hide resolved
@MosCD3
Copy link
Contributor Author

MosCD3 commented Oct 31, 2024

Just one small organizational nitpick. As a side note, did you find it to be a hassle keeping the modal style errors as an option? I wonder if it would be better to just go all in on inline errors.

I believe inline errors is the norm and should be the default. I believe we should use react-forms and some validation library like zod.

Signed-off-by: Mostafa Gamal <[email protected]>
Signed-off-by: Mostafa Gamal <[email protected]>
Signed-off-by: Mostafa Gamal <[email protected]>
Copy link
Contributor

@bryce-mcmath bryce-mcmath left a comment

Choose a reason for hiding this comment

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

Few tiny things

packages/legacy/core/App/index.ts Outdated Show resolved Hide resolved
packages/legacy/app/ios/Podfile.lock Outdated Show resolved Hide resolved
Signed-off-by: Mostafa Gamal <[email protected]>
Signed-off-by: Mostafa Gamal <[email protected]>
@bryce-mcmath
Copy link
Contributor

@MosCD3 approved, just needs some conflicts fixed before it can be merged

Copy link

sonarcloud bot commented Nov 7, 2024

@MosCD3 MosCD3 merged commit 31734d5 into openwallet-foundation:main Nov 7, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants