-
Notifications
You must be signed in to change notification settings - Fork 0
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
COM-964 Add multiselect to choose test contacts (Depends on: #78) #101
base: main
Are you sure you want to change the base?
Conversation
f1c9cc5
to
14293f8
Compare
14293f8
to
fbd842d
Compare
29d628e
to
f2321fe
Compare
f2321fe
to
76b0b6a
Compare
async function submitTestEmails({ testEmails }: FormProps) { | ||
const emailsArray = testEmails.trim().split("\n"); | ||
const { data, loading, error } = useQuery(brevoTestContactsSelectQuery, { | ||
variables: { offset: 0, limit: 50, email: "", scope }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is email set here?
I doubt there will be more than 50 tests contacts but I guess this should be handled somehow... @raphaelblum what do you think about the limit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree just loading 50 doesn't look clean. Couldn't we use Autocomplete for this?
https://storybook.comet-dxp.com/?path=/story/docs-hooks-useasyncoptionsprops--autocomplete
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I addressed this issue about reloading values in an async select before (in comet), I do not know if it is already possible to load more (on scrolling, input change..)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed the email: 4115626
As discussed, I changed the limit to 100: 0a664db and added a check in the api to prevent creating more than 100 contacts: 13d2f5f, 5e991c3
In the frontend the button to create a new contact is disabled as soon as there are 100 contacts and a tooltip gives information about that: f2403cb
Quality Gate passedIssues Measures |
At the moment, there is a text field for entering test contacts manually.
The email dispatch only works if the entered email is part of a contact list. To resolve this, the textfield is replaced with a multi-select field that only displays users from the test contact list.
Changes:
Replaced the free-text field with a multi-select field.
The multi-select field is now populated with users from the test contact list only.
Screenshots/screencasts
Changeset
[x] I have verified if my change requires a changeset
Further information
https://vivid-planet.atlassian.net/browse/COM-964