-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Refactor email input handling to format comma-separated addresses #193128
Conversation
d0be951
to
04b7169
Compare
Thank you @VriaA for contributing to Kibana! At first glance the PR looks promising, would you be so kind to also add a test? |
/ci |
Pinging @elastic/response-ops (Team:ResponseOps) |
04b7169
to
3198018
Compare
Thank you for taking the time to review my PR @jcger. I've added the test as requested and refactored the function accordingly. |
/ci |
/ci |
@elasticmachine merge upstream |
Hey @VriaA thank you for adding some unit tests, they look great. Unfortunately it's not enough as we need also to ensure that if the user pastes the email list, the form values are updated as expected. See an example here kibana/x-pack/plugins/stack_connectors/public/connector_types/email/email_params.test.tsx Line 38 in 7b76160
|
Thank you for the feedback, @jcger. I’ll check the example you provided and update the tests accordingly. |
f435bab
to
3f48386
Compare
- Introduced `getFormattedEmailOptions` to split and trim comma-separated email values - Updated EuiComboBox to handle email entry for `to`, `cc`, and `bcc` fields Signed-off-by: Oyelola Victoria <[email protected]>
Signed-off-by: Oyelola Victoria <[email protected]>
3f48386
to
9a0ef27
Compare
…rated emails Signed-off-by: Oyelola Victoria <[email protected]>
/ci |
@elasticmachine merge upstream |
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.
Thank you for adding the test I asked you for! Now I've done the actual code review, just a couple of comments, mostly nit picks but it will help us keeping the code cleaner
x-pack/plugins/stack_connectors/public/connector_types/email/email_params.test.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/stack_connectors/public/connector_types/email/email_params.test.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/stack_connectors/public/connector_types/email/email_params.test.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/stack_connectors/public/connector_types/email/email_params.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/stack_connectors/public/connector_types/email/email_params.tsx
Outdated
Show resolved
Hide resolved
…readability and best practices Signed-off-by: Oyelola Victoria <[email protected]>
@elasticmachine merge upstream |
/ci |
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.
Thank you so much! I'll take it from here to make sure it gets merged
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: |
@elasticmachine run docs-build |
Starting backport for target branches: 8.x https://github.com/elastic/kibana/actions/runs/11141385222 |
…astic#193128) ## Summary This pull request fixes elastic#189968 - Introduced `getFormattedEmailOptions` to split and trim comma-separated email values - Updated `EuiComboBox` to handle email entries for `to`, `cc`, and `bcc` fields https://github.com/user-attachments/assets/45a70132-8fd7-426e-81cf-62a6bf216408 --------- Signed-off-by: Oyelola Victoria <[email protected]> Co-authored-by: Julian Gernun <[email protected]> Co-authored-by: Elastic Machine <[email protected]> (cherry picked from commit 9174588)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…es (#193128) (#194669) # Backport This will backport the following commits from `main` to `8.x`: - [Refactor email input handling to format comma-separated addresses (#193128)](#193128) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Oyelola Victoria","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-02T09:33:05Z","message":"Refactor email input handling to format comma-separated addresses (#193128)\n\n## Summary\r\nThis pull request fixes #189968 \r\n\r\n- Introduced `getFormattedEmailOptions` to split and trim\r\ncomma-separated email values\r\n- Updated `EuiComboBox` to handle email entries for `to`, `cc`, and\r\n`bcc` fields\r\n\r\n\r\nhttps://github.com/user-attachments/assets/45a70132-8fd7-426e-81cf-62a6bf216408\r\n\r\n---------\r\n\r\nSigned-off-by: Oyelola Victoria <[email protected]>\r\nCo-authored-by: Julian Gernun <[email protected]>\r\nCo-authored-by: Elastic Machine <[email protected]>","sha":"917458844b51b93d9a62f2e100099a70e1ea4842","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:ResponseOps","💝community","v9.0.0","backport:prev-minor"],"title":"Refactor email input handling to format comma-separated addresses","number":193128,"url":"https://github.com/elastic/kibana/pull/193128","mergeCommit":{"message":"Refactor email input handling to format comma-separated addresses (#193128)\n\n## Summary\r\nThis pull request fixes #189968 \r\n\r\n- Introduced `getFormattedEmailOptions` to split and trim\r\ncomma-separated email values\r\n- Updated `EuiComboBox` to handle email entries for `to`, `cc`, and\r\n`bcc` fields\r\n\r\n\r\nhttps://github.com/user-attachments/assets/45a70132-8fd7-426e-81cf-62a6bf216408\r\n\r\n---------\r\n\r\nSigned-off-by: Oyelola Victoria <[email protected]>\r\nCo-authored-by: Julian Gernun <[email protected]>\r\nCo-authored-by: Elastic Machine <[email protected]>","sha":"917458844b51b93d9a62f2e100099a70e1ea4842"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/193128","number":193128,"mergeCommit":{"message":"Refactor email input handling to format comma-separated addresses (#193128)\n\n## Summary\r\nThis pull request fixes #189968 \r\n\r\n- Introduced `getFormattedEmailOptions` to split and trim\r\ncomma-separated email values\r\n- Updated `EuiComboBox` to handle email entries for `to`, `cc`, and\r\n`bcc` fields\r\n\r\n\r\nhttps://github.com/user-attachments/assets/45a70132-8fd7-426e-81cf-62a6bf216408\r\n\r\n---------\r\n\r\nSigned-off-by: Oyelola Victoria <[email protected]>\r\nCo-authored-by: Julian Gernun <[email protected]>\r\nCo-authored-by: Elastic Machine <[email protected]>","sha":"917458844b51b93d9a62f2e100099a70e1ea4842"}}]}] BACKPORT--> Co-authored-by: Oyelola Victoria <[email protected]>
Summary
This pull request fixes #189968
getFormattedEmailOptions
to split and trim comma-separated email valuesEuiComboBox
to handle email entries forto
,cc
, andbcc
fieldskibana_email_connector.mp4