Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* global search backend (#875) * add getUserViewableResourceTypes * update test seed helper * add "recently edited" endpoint * add test for "recently edited" endpoint * format * remove RootPage from getUserSearchViewableResourceTypes * rename API to search to be more generic * move getResourcesWithFullPermalink into route since its only being used there * move "await" and "execute" up * add pg_tram pg extension + add gin index on resource title * improve perf - only order by matching keywords if theres more than 1 searchterm * fix typo * fix - totalCount to be Number * update test seed helper * improve test case extensiveness * add more test case * only match by prefix * add more test case * better typechecking * update recentlyUpdated to be sorted by lastedUpdatedAt desc * limit recentlyEdited suggestions to page-ish items only * simplify orderBy query * refactor into services and types * refactor - use output schema for validation instead * undo: accidental edit * remove array spreading * refactor fallback content out * remove "suggestions" and use "recentlyEdited" directly * improve matching algo accuracy * add site-level permission validation * Feat/search fe (#882) * add getUserViewableResourceTypes * update test seed helper * add "recently edited" endpoint * add test for "recently edited" endpoint * format * remove RootPage from getUserSearchViewableResourceTypes * rename API to search to be more generic * move getResourcesWithFullPermalink into route since its only being used there * move "await" and "execute" up * add pg_tram pg extension + add gin index on resource title * improve perf - only order by matching keywords if theres more than 1 searchterm * fix typo * fix - totalCount to be Number * update test seed helper * improve test case extensiveness * add more test case * only match by prefix * add more test case * better typechecking * refactor: add header area to grid * refactor: make base header for search * fix: align searchbar to middle * fix: add modal * feat: add remaining frontend components * chore: align modal vertically to searchbar * refactor: use grid for header * chore: use ogp search bar * chore: add query * feat: add conditional wording * chore: fix search value * chore: add story * fix: add search * feat: show results * chore: add interaction states * fix: update link references * fix: textstyle * chore: fix styling thanks to @karrui for this - we finally got it centered LOL * fix linting issue * fix lint * add test cases for getSiteName() endpoint * split stories into 2 file * update copywriting * split into multiple files for improved readability * add highlighted title text + add unique key * do not pass in search limit * refactor type out + improve readability * add copywriting * add display for no search result * do not render empty Text div if no text (use gap instead) * fix - wrong import * make overflow scrollable content * fix height * align "no search results" to center * fix logic for determining states * fix gaps * refactor conditional rendering of different states * add loading state * fit footer padding * fix - SearchResultsState headerText copywriting * refactor to use common SearchResults * fix type * add "last edited" to search result * add search shortcut hint display * trigger searchbar on hitting K with ctrl/cmd key * fix - import filename error * update recentlyUpdated to be sorted by lastedUpdatedAt desc * limit recentlyEdited suggestions to page-ish items only * simplify orderBy query * add leading slash * reduce rowgap for searchresult * add border radius to searchresult * conditional singular * fix broken stories * make highlights rounded * align icon to the top + reduce gap * truncate permalink to one line max * refactor into services and types * refactor - use output schema for validation instead * undo: accidental edit * remove unused import * add storybook * fix - use findByRole instead of getByRole * remove waitFor * remove unused waitFor * fix - copywriting * hide date for recentlyedited display * remove array spreading * refactor fallback content out * remove "suggestions" and use "recentlyEdited" directly * improve matching algo accuracy * add site-level permission validation * delete unused image * move svg to correct folder * remove suggestions * remove commented code * convert formatDate to utils * extracted into isAllowedToHaveLastEditedText * remove unused import * make width and height responsive with custom hook (useSearchStyle) * remove box --------- Co-authored-by: adriangohjw <[email protected]> --------- Co-authored-by: seaerchin <[email protected]>
- Loading branch information