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: [CO-1620] apply types on editor attendees and add value to attendees #519

Draft
wants to merge 10 commits into
base: devel
Choose a base branch
from

Conversation

frisonisland
Copy link
Contributor

@frisonisland frisonisland commented Nov 15, 2024

What we did:

  • added tests on EditorAttendees
  • redo changes reverted in revert: [CO-1616] undo editor attendees changes introduced in react-18 migrations #512
  • noticed tests start failing (ContactInput clears existing attendees after adding a new one)
  • noticed property "value" was not being passed to ChipInput<> values (bug), causing attendees to disappear (see onChange filtering out values without a "value")
  • use prop "value" instead of "defaultValue". Using "defaultValue" shows a question mark in the chip for some reason (DS).
  • did the same for optional attendees
  • added more tests for other things such availability to get a good coverage and showcase current behavior

For some reason applying a correct typing causes the ContactInput to display "?" instead of the label when using the property "defaultValue" when using Contact integration.
However if you spread more properties than needed to ChipInput, label displays correctly.
Instead, with correct typings and using "value" instead of "defaultValue", everything displays correctly.

- not adding the value property results in contacts being removed after a contact input change

- moreover using defaultValue from ContactInput and correct typings makes chips display with a question mark. Switching to values fixes the behaviour
…ee clears existing attendees in ContactInput)

This comment has been minimized.

1 similar comment

This comment has been minimized.

@frisonisland frisonisland changed the title fix: apply types on editor attendees and add value to attendees fix: [CO-1620] apply types on editor attendees and add value to attendees Nov 15, 2024

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

- add mock for getuserinfo else test explodes with console error
Copy link

Failed

  • 64.40% Coverage on New Code (is less than 80.00%)

Analysis Details

0 Issues

  • Bug 0 Bugs
  • Vulnerability 0 Vulnerabilities
  • Code Smell 0 Code Smells

Coverage and Duplications

  • Coverage 64.40% Coverage (52.30% Estimated after merge)
  • Duplications 0.00% Duplicated Code (4.20% Estimated after merge)

Project ID: carbonio-calendars-ui

View in SonarQube

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.

1 participant