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/403 autocomplete searchresult newhomepage #491

Conversation

niraymak
Copy link
Member

@niraymak niraymak commented May 18, 2021

Description

This branch replaces the search bar to the navbar where autocomplete (results suggested) is also implemented.

Also created a utility component which is responsible for opening the project details modal on the home page.
Updated the package.json file to our actual version.

@liekevdvoort will update the styling of the searchbar in the navbar.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • I updated the changelog with an end-user readable description
  • I assigned this pull request to the correct project board to update the sprint board

Steps to Test or Reproduce

This feature can be tested with this branch: https://github.com/DigitalExcellence/dex-backend/tree/feature/361-searchfuntionality.

  1. It is recommended to use Docker (at least run ElasticSearch, ElasticSynchronizer , RabbitMQ, Identity and API) to test this feature.
  2. Use admin account to run /export endpoint which will update ElasticSearch dataset with our dataset.
  3. Run this frontend branch to test the search bar on the homepage.

Link to issue

Closes: #403

niraymak and others added 27 commits December 16, 2020 13:26
Search bar now gets results on keyup
…n/hosted-git-info-2.8.9

Bump hosted-git-info from 2.8.8 to 2.8.9
Bumps [url-parse](https://github.com/unshiftio/url-parse) from 1.4.7 to 1.5.1.
- [Release notes](https://github.com/unshiftio/url-parse/releases)
- [Commits](unshiftio/url-parse@1.4.7...1.5.1)

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.19 to 4.17.21.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](lodash/lodash@4.17.19...4.17.21)

Signed-off-by: dependabot[bot] <support@github.com>
…n/lodash-4.17.21

Bump lodash from 4.17.19 to 4.17.21
…n/url-parse-1.5.1

Bump url-parse from 1.4.7 to 1.5.1
…n' into feature/403-autocomplete-searchresult-newhomepage
…hows on the homepage for now. Also limited search results to 5
@niraymak
Copy link
Member Author

These are the performance results. Backend running with 5000 projects.

image

Copy link

@Arilith Arilith left a comment

Choose a reason for hiding this comment

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

Looks nice! Good work.

Copy link
Member

@waltersajtos waltersajtos left a comment

Choose a reason for hiding this comment

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

I fixed a few small issues in the search-controller, other than that it looks good to me. My only concern is that we make an api call on every keystroke, it doesn't seem to cause any delay but it might be an issue if there's heavier traffic. It should be fine for now but we need to keep it in mind.

Copy link
Member

@RubenFricke RubenFricke left a comment

Choose a reason for hiding this comment

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

Good observation @waltersajtos. The implementation looks really cool, and I think this brings some real added value to our users. Really excited! Good job Niray and Lieke, thanks for the great contribution 🏅 ! I have a few small notes/questions/ideas. Let me know what you think of these points.

In addition to this observation from Walter, I noticed when typing, it took some time to load the new suggestions. Although it's just a really short duration, it's noticeable that the suggestions get hidden and reloaded. If I compare this with other platforms (e.g. Amazon), they keep showing the old suggestions until the new one is loaded. Have you looked into this?

Besides that, there is a search icon in the search bar in the design that is not visible in this implementation. Is this a conscious choice? (Let's ignore the tags for now 😄 )
image

And finally, most predictive search queries have some parts highlighted to distinguish the part you have typed and what is predicted. Is this something that you have considered?
image

@niraymak
Copy link
Member Author

Good observation @waltersajtos. The implementation looks really cool, and I think this brings some real added value to our users. Really excited! Good job Niray and Lieke, thanks for the great contribution 🏅 ! I have a few small notes/questions/ideas. Let me know what you think of these points.

In addition to this observation from Walter, I noticed when typing, it took some time to load the new suggestions. Although it's just a really short duration, it's noticeable that the suggestions get hidden and reloaded. If I compare this with other platforms (e.g. Amazon), they keep showing the old suggestions until the new one is loaded. Have you looked into this?

Besides that, there is a search icon in the search bar in the design that is not visible in this implementation. Is this a conscious choice? (Let's ignore the tags for now 😄 )
image

And finally, most predictive search queries have some parts highlighted to distinguish the part you have typed and what is predicted. Is this something that you have considered?
image

I think the result hiding and appearing has something to do with the way rendering in Angular works, I am not so familiar yet with Angular. Any ideas how to fix it? Maybe we can use a library to fix this? For example: https://github.com/kraaden/autocomplete
However this would require some time to refactor the whole thing..

I think the image is not even in the assets folder? @liekevdvoort maybe you forgot to add it?

@liekevdvoort
Copy link
Contributor

@niraymak no the search icon was already there from the previous styling but now its gone idk how but i added it back

Copy link
Member

@waltersajtos waltersajtos left a comment

Choose a reason for hiding this comment

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

afbeelding
I was testing this on the wrong branch, I'm not sure if this can happen in production but we might want to look into it first.

Copy link
Member

@waltersajtos waltersajtos left a comment

Choose a reason for hiding this comment

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

Did some small refactor on the logic, also blocked the HTTP errors on the autoComplete endpoint to prevent pointless error spam. The rendering issue should also be fixed.

I think everything looks good to go now :)

Copy link
Member

@RubenFricke RubenFricke left a comment

Choose a reason for hiding this comment

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

Good job looks nice!

@RubenFricke RubenFricke merged commit 07ee588 into feature/380-redesign-homepage May 26, 2021
@RubenFricke RubenFricke deleted the feature/403-autocomplete-searchresult-newhomepage branch May 26, 2021 11:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants