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

Fix some errors #182

Merged
merged 3 commits into from
Apr 20, 2024
Merged

Fix some errors #182

merged 3 commits into from
Apr 20, 2024

Conversation

zatteo
Copy link

@zatteo zatteo commented Apr 18, 2024

No description provided.

@zatteo zatteo changed the title feat: Update cozy-client feat: Update cozy-client and fix favorite papers and contact Apr 18, 2024
@zatteo zatteo changed the title feat: Update cozy-client and fix favorite papers and contact feat: Update cozy-client and fix some errors Apr 18, 2024
@@ -0,0 +1 @@
<span aria-hidden="true"> · {{ this.stringifiedLabel }}</span>
Copy link
Member

Choose a reason for hiding this comment

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

Don't we want the label to be read by screen readers?

Copy link
Author

Choose a reason for hiding this comment

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

My bad. Fixed by creating two span 👍 (one hidden for the bullet and one visible for the label).

Comment on lines 22 to 24
this.stringifiedLabel = `${this.getTranslatedType(
this.label.type
)} (${this.getTranslatedLabel(this.label.label).toLowerCase()})`;
Copy link
Member

Choose a reason for hiding this comment

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

nit: extracting the two translations into variables would improve readability of the templated string

When we tried to improve performance by passing the key directly to convertContactToCipherResponse, we introduce inversion in arguments passed to convertContactToCipherResponse.
conversion fail

Previously, when converting papers or contacts to ciphers, we were
returning an empty array when an error occured. So with 1000
contacts, if one conversion failed, we were seeing 0 contact.

Now we will see the 999 contacts that were successfully converted and
we will log an error for each paper or contact that failed to be
converted.
io.cozy.contacts label management has been improved. A phone number, an address or an email can have :
- a type which can be "cell", "voice", "fax" or a custom string
- a label which can be "home" or "work"
- both

See io.cozy.contacts documentation to learn more.

Here we introduce and use a new component to display correctly the label value.

We also modify our types to correspond to io.cozy.contacts.
@zatteo zatteo changed the title feat: Update cozy-client and fix some errors Fix some errors Apr 20, 2024
@zatteo zatteo merged commit 2b92169 into feat/stream1 Apr 20, 2024
1 check passed
@delete-merged-branch delete-merged-branch bot deleted the feat/update-cozy-client branch April 20, 2024 08:36
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.

2 participants