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: 🍰 Suggestion List Filter #4296

Merged
merged 5 commits into from
Mar 19, 2021
Merged

fix: 🍰 Suggestion List Filter #4296

merged 5 commits into from
Mar 19, 2021

Conversation

ashleysylvialee
Copy link
Contributor

@ashleysylvialee ashleysylvialee commented Mar 16, 2021

🍰 Pullrequest

  • Changed suggestion list filtering to search for prefix instead of substring
  • Sorted results by length so stricter matches show up on top
    image
  • Added spacebar selection functionality for mentions

Issues

Todo

  • None

Copy link
Member

@Tirokk Tirokk left a comment

Choose a reason for hiding this comment

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

Hey @ashleysylvialee !

That looks really nice and well done !!! 🚀💫
An easy and good solution 🍀
Thanks for your contribution! 🙏🏼

I like to approve 👍🏼
… if the tests will run, what has nothing to do with your changes @ashleysylvialee .

Just in case you are interested on:
Would be cool if you could add a test for this in webapp/components/Editor/Editor.spec.js.
I see you have had this already in mind … ☝🏼
If you need any help for this, please let us know.

@Mogge may you have a look at failing tests in the backend?

@Tirokk Tirokk changed the title [WIP] fix: suggestion list filter fix: [WIP] 🍰 Suggestion List Filter Mar 16, 2021
@Tirokk Tirokk changed the title fix: [WIP] 🍰 Suggestion List Filter fix: 🍰 Suggestion List Filter Mar 16, 2021
@Tirokk
Copy link
Member

Tirokk commented Mar 16, 2021

I have a little additional functionally suggestion, if you are interested:

Bildschirmfoto 2021-03-16 um 10 41 04

I would await that if I type a fitting slug, see ☝🏼, and hit the space key that the selected menu item will be chosen.

There is a similar example for hashtags already in the code @ashleysylvialee :

case key.SPACE:
if (this.suggestionType === HASHTAG && this.query !== '') {
this.selectItem({ id: this.query })
}
return true

Just in case you are interested … 😍

@Mogge
Copy link
Contributor

Mogge commented Mar 16, 2021

I fixed the failing tests. Feel free to merge, although I like the suggestion @Tirokk brought up

@Tirokk Tirokk added service: webapp bug Something isn't working labels Mar 17, 2021
@ashleysylvialee
Copy link
Contributor Author

I have a little additional functionally suggestion, if you are interested:

Bildschirmfoto 2021-03-16 um 10 41 04

I would await that if I type a fitting slug, see ☝🏼, and hit the space key that the selected menu item will be chosen.

There is a similar example for hashtags already in the code @ashleysylvialee :

case key.SPACE:
if (this.suggestionType === HASHTAG && this.query !== '') {
this.selectItem({ id: this.query })
}
return true

Just in case you are interested … 😍

Done! The tests I wrote are passing as well. 🥳 Anything else you'd like me to add here? 😊

Copy link
Member

@Tirokk Tirokk left a comment

Choose a reason for hiding this comment

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

Hey @ashleysylvialee .
Really cool job you’ve done!!!
Our users will be happy about your work and effort you spend. 🚀🚀💫💫

Great to have you in the project.

So I just fixed the linting: yarn lint --fix
And I approve.
Please merge!

PS: In case you change the locales they should be checked as well by : yarn locales --fix

Precisley how I like it

@ashleysylvialee ashleysylvialee merged commit ff50273 into master Mar 19, 2021
@ashleysylvialee ashleysylvialee deleted the 2635-fix branch March 19, 2021 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working service: webapp
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🐛 [Bug] Some users with short usernames missing on mention menu and cannot be mentioned
3 participants