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

feat(NcSelect): Allow to filter users by email notation #4653

Merged
merged 2 commits into from
Oct 18, 2023

Conversation

susnux
Copy link
Contributor

@susnux susnux commented Oct 15, 2023

☑️ Resolves

Allows to filter by the email notation like Jane <[email protected]>

🏁 Checklist

  • ⛑️ Tests are included or are not applicable
  • 📘 Component documentation has been extended, updated or is not applicable

@susnux susnux added enhancement New feature or request 3. to review Waiting for reviews feature: select Related to the NcSelect* components labels Oct 15, 2023
@raimund-schluessler
Copy link
Contributor

Might be, that I do something wrong, but it doesn't seem to work for me in the styleguide:
grafik

@susnux
Copy link
Contributor Author

susnux commented Oct 15, 2023

Might be, that I do something wrong, but it doesn't seem to work for me in the styleguide

@raimund-schluessler Ah yes there was an issue if there is no subname defined, fixed that:

vokoscreenNG-2023-10-15_23-34-50.mp4

Copy link
Contributor

@raimund-schluessler raimund-schluessler left a comment

Choose a reason for hiding this comment

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

Works now as expected (in the docs).

Copy link
Contributor

@Pytal Pytal left a comment

Choose a reason for hiding this comment

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

Is it possible to have the matching chars bolded like when typing an email without angle brackets?

@susnux
Copy link
Contributor Author

susnux commented Oct 17, 2023

Is it possible to have the matching chars bolded like when typing an email without angle brackets?

Yes but need to adjust NcListItemIcon then.

@susnux susnux force-pushed the feat/allow-to-filter-by-mail-notation branch from fcf5aeb to f28493b Compare October 17, 2023 10:30
@susnux
Copy link
Contributor Author

susnux commented Oct 17, 2023

@Pytal done

vokoscreenNG-2023-10-17_12-31-29.mp4

Allows to filter by the email notation like `Jane <[email protected]>`

Signed-off-by: Ferdinand Thiessen <[email protected]>
@susnux susnux force-pushed the feat/allow-to-filter-by-mail-notation branch from f28493b to a50aa5f Compare October 17, 2023 10:34
@susnux susnux requested a review from Pytal October 17, 2023 10:36
@raimund-schluessler
Copy link
Contributor

raimund-schluessler commented Oct 17, 2023

Is it possible to have the matching chars bolded like when typing an email without angle brackets?

Yes but need to adjust NcListItemIcon then.

While this works, I feel like this duplicates the regex/match part. Couldn't we just set this.search appropriately in NcSelect when matching the email part, without touching NcListItemIcon?

So, when typing <olivia@example in NcSelect, do the matching in NcSelect and set this.search to olivia@example without the token. This way, the highlighting should work, and we wouldn't need to duplicate the matching code in NcListItemIcon.

@susnux
Copy link
Contributor Author

susnux commented Oct 17, 2023

So, when typing <olivia@example in NcSelect, do the matching in NcSelect and set this.search to olivia@example without the token. This way, the highlighting should work, and we wouldn't need to duplicate the matching code in NcListItemIcon.

Yes but when typing Olivia <olivia@example Olivia would not be highlighted.
So I think this is also a feature on the NcListItemIcon

@raimund-schluessler
Copy link
Contributor

So, when typing <olivia@example in NcSelect, do the matching in NcSelect and set this.search to olivia@example without the token. This way, the highlighting should work, and we wouldn't need to duplicate the matching code in NcListItemIcon.

Yes but when typing Olivia <olivia@example Olivia would not be highlighted.

So I think this is also a feature on the NcListItemIcon

Ah, yes, I see. Valid point.

@susnux susnux force-pushed the feat/allow-to-filter-by-mail-notation branch from a50aa5f to 468fbed Compare October 17, 2023 23:33
@susnux susnux requested a review from Pytal October 17, 2023 23:33
@Pytal Pytal added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Oct 18, 2023
@Pytal Pytal merged commit 8d42225 into master Oct 18, 2023
15 checks passed
@Pytal Pytal deleted the feat/allow-to-filter-by-mail-notation branch October 18, 2023 16:43
@Pytal Pytal mentioned this pull request Oct 23, 2023
@dartcafe
Copy link
Contributor

@Pytal Any chance to get this backported to v7?

@Pytal
Copy link
Contributor

Pytal commented Oct 23, 2023

@Pytal Any chance to get this backported to v7?

We don't normally backport features @dartcafe, so I'd recommend using the latest v8 of the lib :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4. to release Ready to be released and/or waiting for tests to finish enhancement New feature or request feature: select Related to the NcSelect* components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NcSelect does not recognize email addresses when angle bracket notation is used
4 participants