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

feat: added support for human readable predicates #994

Merged

Conversation

wadeking98
Copy link
Contributor

@wadeking98 wadeking98 commented Oct 11, 2023

Summary of Changes

  • Added support for human readable predicates: <= -> less than or equal to, > -> greater than, etc
  • Fixed date formatting across the app 20020523 -> May 23, 2002

image
image
image
image

Related Issues

N/A

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.

@wadeking98 wadeking98 requested a review from a team as a code owner October 11, 2023 19:53
@codecov
Copy link

codecov bot commented Oct 11, 2023

Codecov Report

Merging #994 (69f1fd1) into main (1d8689b) will increase coverage by 0.20%.
The diff coverage is 75.71%.

@@            Coverage Diff             @@
##             main     #994      +/-   ##
==========================================
+ Coverage   60.52%   60.73%   +0.20%     
==========================================
  Files         178      178              
  Lines        5323     5379      +56     
  Branches     1511     1528      +17     
==========================================
+ Hits         3222     3267      +45     
- Misses       2076     2087      +11     
  Partials       25       25              
Files Coverage Δ
.../legacy/core/App/components/record/RecordField.tsx 87.17% <100.00%> (ø)
packages/legacy/core/App/localization/en/index.ts 100.00% <ø> (ø)
packages/legacy/core/App/localization/fr/index.ts 100.00% <ø> (ø)
...ckages/legacy/core/App/localization/pt-br/index.ts 100.00% <ø> (ø)
packages/legacy/core/App/utils/helpers.ts 58.62% <86.66%> (+0.76%) ⬆️
...gacy/core/App/components/misc/CredentialCard11.tsx 86.66% <76.47%> (-1.34%) ⬇️
...es/legacy/core/App/screens/ProofRequestDetails.tsx 74.19% <82.60%> (+4.46%) ⬆️
...egacy/core/App/components/misc/SharedProofData.tsx 86.11% <50.00%> (-7.11%) ⬇️

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 a couple minor questions

@@ -137,6 +146,9 @@ const CredentialCard11: React.FC<CredentialCard11Props> = ({
resizeMode: 'contain',
borderRadius: 10,
},
attributeValueContainer: {
width: '90%',
Copy link
Contributor

Choose a reason for hiding this comment

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

Just curious, what issue does this percentage width fix?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it stops the text from overflowing the credential card, I tried a couple other approaches like flex wrap and whatnot but this is the best I could find

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think the reason I had to resort to this approach is because the credential card has overflow: hidden set for the watermark, so things like text will overflow and get cut off rather than wrapping

@@ -59,6 +60,7 @@ const SharedDataCard: React.FC<{ sharedData: GroupedSharedProofDataItem }> = ({
elevation: 5,
},
cardAttributes: {
width: '65%',
Copy link
Contributor

Choose a reason for hiding this comment

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

Same Q as above

@@ -391,6 +391,12 @@ const translation = {
"CustomOfferParagraph2": "Não reconhece a organização. Verifique sua lista de Contatos. Você só recebe notificões de Contatos que você tenha adicionado.",
},
"ProofRequest": {
"PredicateGeDate": "is after (PB)",
Copy link
Contributor

Choose a reason for hiding this comment

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

"PredicateGeDate": "é posterior a",
"PredicateLeDate": "é anterior a",
"PredicateGe": "é maior ou igual a",
"PredicateGr": "é maior que",
"PredicateLe": "é menor ou igual a",
"PredicateLs": "é menor que",

@jleach jleach requested review from jleach and removed request for thiagoromanos October 17, 2023 15:53
@jleach jleach force-pushed the feat-human-readable-predicates branch from 824f099 to 72c1a70 Compare October 19, 2023 16:32
@jleach jleach requested a review from thiagoromanos October 19, 2023 16:32
bryce-mcmath
bryce-mcmath previously approved these changes Oct 19, 2023
Signed-off-by: wadeking98 <[email protected]>
@jleach jleach merged commit 62c13ee into openwallet-foundation:main Oct 19, 2023
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants