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

[Feature] #9298 : Add several e-mail addresses into address fields at once #9347

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

arublov
Copy link
Member

@arublov arublov commented Feb 15, 2024

Details:

Case 1: string = '[email protected], Jane Doe, MSc [email protected]'

Result:
Screenshot 2024-02-23 at 5 36 07 PM

newRecipients:
Screenshot 2024-02-23 at 5 43 48 PM

Case 2: string = 'ian eiloart [email protected]>;[email protected],, [email protected], "ian,eiloart"<[email protected]>, <@example.com:[email protected]>, foo@#,[email protected], ian@one@two;asdas< [email protected]> [email protected], Newasd Na@,me >; [email protected]'

Result:
Screenshot 2024-02-23 at 5 37 12 PM

newRecipients:
Screenshot 2024-02-23 at 5 42 42 PM

@arublov
Copy link
Member Author

arublov commented Feb 16, 2024

@ChristophWurst I pushed this last commit into this PR for review, and I'm not sure if it applies to this task or not:

  1. try to add something like this: "Test Test [email protected], Test Test1 [email protected]" I need to compare and then do something?
  2. If this is the string: "Test Test Test [email protected]/ Test Test Test1 [email protected]" it's wrong and do I need to do something?

Hint this is relevant to this task, if yes, I will cover these cases with code. If there are more, I will be ready to solve them :)

@arublov arublov marked this pull request as ready for review February 16, 2024 12:55
@arublov arublov force-pushed the feature/add-several-emails-at-once branch from 58dd9b5 to 3887fc8 Compare February 16, 2024 19:53
@arublov
Copy link
Member Author

arublov commented Feb 21, 2024

@ChristophWurst any updates here? Thanks :)

@ChristophWurst
Copy link
Member

This is a bit of a gamble with the regex. Can you make sure that selecting people with titles doesn't split single values? E.g. if "Jane Doe, MSc [email protected]" is entered, it should stay "Jane Doe, MSc [email protected]", not become "Jane Doe" and ", MSc [email protected]"

@arublov arublov force-pushed the feature/add-several-emails-at-once branch from 3887fc8 to f9da4ce Compare February 21, 2024 13:50
@arublov arublov marked this pull request as draft February 21, 2024 21:19
@arublov arublov force-pushed the feature/add-several-emails-at-once branch 2 times, most recently from 8ca309b to 4adceef Compare February 23, 2024 15:40
@arublov
Copy link
Member Author

arublov commented Feb 23, 2024

@ChristophWurst , yes done, I fixed some cases and tested, could you please see the new changes and write me feedback, what do you think about this? Maybe I need to change something in my solution?

P.S. Maybe need to move the regex to another space somewhere, so that it can be accessed in any other classes in the project?

@arublov arublov marked this pull request as ready for review February 23, 2024 16:51
Andrii Rublov added 5 commits February 23, 2024 17:51
…o address fields at once

Signed-off-by: Andrii Rublov <[email protected]>
Signed-off-by: Andrii Rublov <[email protected]>
… Last commit for change PR to review

Signed-off-by: Andrii Rublov <[email protected]>
@arublov arublov force-pushed the feature/add-several-emails-at-once branch from 6e9e6a0 to d1c7b42 Compare February 23, 2024 16:51
@arublov
Copy link
Member Author

arublov commented Feb 23, 2024

@ChristophWurst I was doing research on this a couple days ago and tried your examples based on thunderbird, gmail and roundcube. So created a more flexible solution based on these apps and my research, so if I need to further improve or change the logic in my solution I will be happy to work on this further :)

Just FYI:

How works Thunderbird:

  1. When string = "Jane Doe, MSc [email protected]; Jane Doe, MSc [email protected]" :
Screenshot 2024-02-21 at 3 05 57 PM
  1. When string = "Jane Doe, MSc [email protected]" :
Screenshot 2024-02-21 at 3 33 15 PM

How works Web Gmail

  1. When string = "Jane Doe, MSc [email protected]; Jane Doe, MSc [email protected]" :
Screenshot 2024-02-21 at 3 14 00 PM
  1. When string = "Jane Doe, MSc [email protected]" :
Screenshot 2024-02-21 at 3 33 38 PM

All of these invalid

Look: rfc822 standard
Look: rfc2822 standard

@arublov arublov self-assigned this Feb 28, 2024
Copy link

github-actions bot commented Apr 3, 2024

Hello there,
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.

Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6

Thank you for contributing to Nextcloud and we hope to hear from you soon!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ability to paste list of email
2 participants