-
Notifications
You must be signed in to change notification settings - Fork 3
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
Search page #73
Search page #73
Conversation
Emmanuel-Develops
commented
Dec 20, 2024
•
edited
Loading
edited
- search api
- use search
- sidebar with filter and sort
- result cards
- toggle pills in result card
- link pills from explore section to search
- mobile responsiveness
- use server action for search call to better integrate with search API
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
230046c
to
56ec146
Compare
56ec146
to
9cdd69e
Compare
Asides the niit from the call? ready for review? @Emmanuel-Develops |
core functionality, yes. |
f5e214e
to
358e47a
Compare
Hello @Emmanuel-Develops can you please rebase your branch to the latest on staging to resolve merge conflicts |
9cdd69e
to
ce406f5
Compare
rebased 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The implementation looks good overall, and I was able to test it locally. Search functionality works as expected.
However, I noticed a few issues and potential areas for improvement:
Testing Prerequisites
To test locally, you need to define the API_KEY
and CLOUD_ID
environment variables. This requirement should be mentioned in the README, similar to how we handle it for bitcoin-search.
Code Reuse
For files copied fully or partially from bitcoin-search, it would be helpful to include a note at the top of the file with a reference link. This adds context for future developers.
Additionally, if there's significant duplicated logic, we should consider centralizing it. With TLDR coming (which will also have a search page), maintaining similar functionality across three repositories is not sustainable.
Observations
A couple of issues I observed:
Topics Filtering
search query /search?search=dlcs sir
I see duplicate values for the very first tags, first tag filters correctly, the other displays a 404 page in the search results.
There seems to be an issue with keeping state in the searchbox when using search
Those issues don't exist in the Speakers and Sources filters.
Red colors
Is the red text for "No matching options" and the red "X" for the search part in the designs? They look out of place.
Result Card
The date placement on the result card does not align with the design specifications and looks awkward.
We should make a note for the source on the card. I know that is not an easy fix, but the way that is being displayed (slug instead of name) is not correct.
Pagination isn't centered
src/config/index.ts
Outdated
"title", | ||
"body", | ||
"authors", | ||
"tags", | ||
"summary", | ||
"transcript_source", | ||
]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For Bitcoin Search we are only search authors
, title
and body
. My thoughts:
- I understand the addition of
transcript_source
. - I'm not sure about the addition of
tags
andsummary
. If they are actually useful, then we might need to consider adding them to Bitcoin Search as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point on summary
it really isn't useful. However tags
do offer some benefits, especially for single search keywords that are topics that may not have the topic name in the body.
Code that can be said to be partially duplicated are Only /search/api contains more nuanced search, and I do not include it as it will be deleted during refactoring to use your global search API. also the envs won't be required anymore |
I am not getting the same results as you are (can't reproduce)
Mmm, there are no designs for this. Let's discuss that in the dev call today.
fixed!
fixed! cc: @kouloumos |
1ced50b
to
729346b
Compare
…itle for topics facet
…loated data from landing page
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing! All my previous comments have been covered. Additionally, all of the places where "slug" was used, we are now using the full names.
This is the last one to be mapped, in the "Applied Filters":
I think that it should be a quick fix by passing the selected filter from the same mapping function.
ACK as soon as the above is fixed.
…e in applied filters
Looks good to me! 🚀 |
* feat: base search * feat: link pills, speakers and topic cards to search * feat: mobile responsiveness * fix: cleanups and loader * fix: sort fields and query * refactor: switch useSearch to context from hook * fix: prevent deopt to CSR with suspense * feat: clickable pills either as link or function * feat: loaders * fix: use tagsDetailed from rebase * fix: search behaviour logic and search results ui * refactor: break search box into mobile component, standalone mobile filter menu * fix(hydration-error): Pills as buttons on featured transcripts * fix(review-fixes): source naming, result card UI, pagination, readme, use summary * fix(review-fixes): searchbox clear on page navigation and get topic title for topics facet * feat(optimizations): too many unnecessary prefetch requests, remove bloated data from landing page * fix(search): prevent overflow on search results, add mapped topic name in applied filters * fix(mobile): quality of life improvements
* feat: base search * feat: link pills, speakers and topic cards to search * feat: mobile responsiveness * fix: cleanups and loader * fix: sort fields and query * refactor: switch useSearch to context from hook * fix: prevent deopt to CSR with suspense * feat: clickable pills either as link or function * feat: loaders * fix: use tagsDetailed from rebase * fix: search behaviour logic and search results ui * refactor: break search box into mobile component, standalone mobile filter menu * fix(hydration-error): Pills as buttons on featured transcripts * fix(review-fixes): source naming, result card UI, pagination, readme, use summary * fix(review-fixes): searchbox clear on page navigation and get topic title for topics facet * feat(optimizations): too many unnecessary prefetch requests, remove bloated data from landing page * fix(search): prevent overflow on search results, add mapped topic name in applied filters * fix(mobile): quality of life improvements