zubhub icon indicating copy to clipboard operation
zubhub copied to clipboard

(feat): Improve search for non-logged-in users

Open brrkrmn opened this issue 1 year ago • 2 comments

Summary

This PR addresses the intended flow explained here. Now, logged-out users can search for projects and creators

Closes #802

Changes

Although this PR is to make changes for non-logged-in users, I kept some of the changes that also affect logged-in user's experience but can remove them upon your comments.

For non-logged-in users:

  • Search dropdown is disabled
  • If the query matches with multiple results, they only see 3 of them at most
  • they see a login form when they make search with or without results
  • If there are no results, 3 staff pick projects are shown instead (only for project search)

For logged-in users:

  • They also see the staff pick projects when their project search yields no results
  • When they make a creator search with no results, they see the same page with non-logged-in users except for the login form

To Do

  • [ ] Make the results' paths directly accessible by non-loggers but limit the other projects/creators

Screenshots

Please see how results look for different combinations here

Here is a quick demonstration of how search looks like for an unauthenticated user:

https://github.com/unstructuredstudio/zubhub/assets/92817363/b752b529-ce30-43d1-ad26-f114abca8c72

Further Improvement

There are some things to be improved for the overall search feature, which can be a part of another PR. Some of them are:

  • Currently, tag search is not possible
  • Styles should be made more unified since there are a lot of inconsistencies
  • Searching for projects or creators is not possible unless the user types a whole word (e.g. searching for '' does not work)

brrkrmn avatar Jan 19 '24 12:01 brrkrmn

Update: results not overflowing 1 row for non-logged-in users

brrkrmn avatar Jan 22 '24 22:01 brrkrmn

code looks ok but still need to test the UI with user data

NdibeRaymond avatar Feb 02 '24 17:02 NdibeRaymond

had to refactor a lot of things here (some of which are not directly related to this patch but still hurts my eyes). It's good to go now

NdibeRaymond avatar Jun 17 '24 02:06 NdibeRaymond

All pre-commit checks passed ✅✅✅

github-actions[bot] avatar Jun 17 '24 02:06 github-actions[bot]