Skip to content

Commit 0977832

Browse files
authored
Feat: Global Search Phase 8 and 9 (#2108)
* Global Search: Add search page filters (#2008) * task: added sortby filter * task: rename sortby filter * task: add user filter * task: close menu on select * task: add select highlight * task: add date range to date filters * task: set params for daterange filter * task: set active filter text * task: remove date filter * task: pass active daterange value to daterange picker * fix: fixed ts error * Global Search: Search page wire filters (#2009) * task: added sortby filter * task: rename sortby filter * task: add user filter * task: close menu on select * task: add select highlight * task: add date range to date filters * task: set params for daterange filter * task: set active filter text * task: remove date filter * task: pass active daterange value to daterange picker * fix: fixed ts error * - do not open a new tab when filters are added - unpin specific tab when search queries are present - show search keyword on tab name for the search page * task: sort by function * task: user filter * task: background color update * task: spacing fix * task: date filter func * task: updated result count * task: fixed alignment * task: added no results for filter * Global Search: Advanced search button & modal (#2012) * task: added advanced search button * task: added filter button * chore: removed comment * task: added advanced search modal * task: fixed console errors * task: fixed console error * task: add form fields * task: added tooltips * Global Search: Wire advance search modal (#2015) * task: added advanced search button * task: added filter button * chore: removed comment * task: added advanced search modal * task: fixed console errors * task: fixed console error * task: add form fields * task: added tooltips * task: created hook for advance search data * task: moved search data to content search comp * task: added clear all function * task: wire user filter * task: import types * task: moved everything back into the advance search modal * task: moved date config to a separate file & added daterange modal * task: added date handling for single date picker * task: daterange handler * task: wired advance search page * task: wired advance search function * task: spacing and color update * fix: fixed search button not enabling * task: added cypress test scenarios * task: search page cypress tests * task: advance search modal cypress tests * task: added data-cy * task: updated cy get chaining * fix: height fix for the counter * task: added tooltips and changed date filter to modified at * task: vqa updates * task: adjusted border radius * Global Search: Save/remove recent searches (#2029) * task: always open the dropdown on click * task: add recent searches hook * task: add recent searches to dropdown * task: created separated component for global search items * task: updated subheader style * task: padding updates * task: cleanup * task: unfocus textfield when user selects an item * task: always show user typed value * task: removed comment * task: wire remove recent search * task: save a max of 50 recent search items * task: when user keyword exists as a saved recent search, render it as a recent search * task: hide suggestions when no user-typed keyword is present * task: fixed incorrect icon * task: remove manual JSON.parse/stringify * task: removed deep cloning * Global Search: Resource type filter (#2039) * task: added resource type filter * task: updated tooltip text * task: add resource type filter component in search page * Global Search Phase 4: Schema searching (#2041) * task: created util to get content title * task: changed how content result is being taken * task: created filtered models hook * task: show models in top suggestions * task: moved getting icon to utils * task: added model type keyword matching * task: changed model search hook * task: update comment * chore: added hook description * task: search models via user zuid * task: allow searching models via user name * task: changed how data is taken from rtk query * task: show models in search page results * task: render model list item * task: wire resource type filter * task: cleanup * task: added icons to dropdown options * Global Search: Include code files in top suggestions (#2048) * task: created util to get content title * task: changed how content result is being taken * task: created filtered models hook * task: show models in top suggestions * task: moved getting icon to utils * task: added model type keyword matching * task: changed model search hook * task: update comment * chore: added hook description * task: search models via user zuid * task: allow searching models via user name * task: changed how data is taken from rtk query * task: show models in search page results * task: render model list item * task: wire resource type filter * task: cleanup * task: create rtk query for scripts and stylesheets * task: add hook to filter code files * task: include code files in top suggestions * task: support view and snippet files for .html searches * task: remove unneeded special handling for .html search * task: add code to resource type filter dropdowns * task: fixed type errors * task: change type for resource types * task: add files to sesarch page results * task: add code file results to search page * task: add media to top suggestion results * task: add media to resource filter * task: skip media api call when there is no search term * chore: cleanup * task: show media results in search page * task: fix incorrect render loading logic * task: added skeleton placeholder for results when loading data * task: show created at time for media files * task: add media folders in top suggestion results * chore: add docs * task: add media folders in search page results * task: reset content data when api call fails * task: reset content data when api call fails * chore: cleanup * task: add search accelerator buttons * task: fixed padding * task: add search accelerator button click handler * task: show selected search accelerator in input field * task: show active search accelerator in search key term option * task: only show search accelerators when no search accelerator is active * fix: mui errors * task: hide search accelerator when textfield is collapsed * task: create hook to get active app * task: add dynamic search accelerator * task: wire dynamic search accelerator * task: only show related suggestions when search accelerator is active * task: show recently modified suggestions when there is no value and search accelerator is active * task: prevent autocomplete dropdown from closing when input field is clicked multiple times * task: add resource type on search params when search accelerator is active * task: only navigate to search page when there is a value * chore: cleanup * task: added media chip config * task: automatically set advanced search resource type when search accelerator was selected * task: fixed issue where media results showing up in schema * task: add search accelerator handling when user clicks the first top suggestion * task: add search accelerator handling when user clicks the first top suggestion * task: save and render search accelerator in recently searched terms * task: extract on remove function * task: create separate component for recent search item * task: create separate component for the keyword search item * chore: edit comment * task: set the search accelerator when a recent search item with an accelerator is clicked * task: get all media files when search accel is media and there is no user input * task: render 5 skeleton loaders when an api call is ongoing * task: renamed ContentSearch to GlobalSearch * task: use GlobalSearch component in GlobalTopbar * task: remove old global-search folder * task: don't show skeleton loader when there is no value * task: fixed failing test * task: cypress tests * fix: fixed search page crashing when list is trying to load content results while media results are still loading * chore: cleanup * fix: open dropdown when user clicks on the side of the search field or uses the shortcut keys to open the search field * task: update usecallback deps * fix: 2074 hide search accelerator when user inputs a search term * chore: rename value to searchKeyword to be more descriptive * fix: [2076] remove placeholder text when search accelerator is selected * fix: [2085] update search accelerator subheader text * fix: [2078] updated padding for search accelerator options * fix: [2086] do not clear search keyword when clicking search again * fix: [2077] add highlight styling when search accelerator suggestion is hovered * task: moved render logic to inline * task: show no results screen when there is no search keyword * chore: rename query to keyword to be more descriptive * fix: [2075] remove search accelerator when backspace is pressed * task: fixed padding * task: fixed padding * task: changed search accel pill sorting * chore: arrange imports * task: enable searching via just user name on advanced search modal * task: rename to Created By * task: sort users * fix: fixed failing test * fix: fixed failing test * task: added close button on advanced search modal * task: changed default selected option * task: added language filter ui * task: wire lang filter * task: removed enabled flag and made fetchLanguages url dynamic * fix: fixed app crashing when langs is not loaded yet * task: automatically set advanced search values when filters have been applied on search page * task: update langs api call query params * chore: cleanup * fix: fixed invalid date * fix: prevent global search from being opened when user clicks on the advanced search * fix: retain search keyword in global search when user refreshes search page * task: changed list subheader to typography * task: stick to default font-size * task: added readonly and as const * fix: fixed app crashing when firstName is null * task: do not save empty keywords as recently searched items * task: sort languages * task: show created at date when no audit trail actions are found * fix: do not save empty search keyword from advanced search modal * fix: fixed failing tests * task: add logic to get typed in accelerator * fix: error when no on change is passed * task: support typed in accelerator in search bar * task: set proper params when pushing to search page * task: remove autoset search keyword * task: set resource type in advanced search when typed in accelerator is active * task: simplified regex * fix: keyword not saving due to attempting to split a null variable * fix: reset typed in accelerator * task: make regex case-insensitive
1 parent 2b6ae09 commit 0977832

File tree

15 files changed

+403
-137
lines changed

15 files changed

+403
-137
lines changed

cypress/e2e/search/advanced-search.spec.js

+2-13
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ describe("Global Search: Advanced Search", () => {
8888
.find("input")
8989
.should("exist")
9090
.should("have.value", "");
91-
cy.getBySelector("AdvanceSearchDate").should("exist").contains("Select");
91+
cy.getBySelector("AdvanceSearchDate").should("exist").contains("Any Time");
9292
});
9393

9494
it("Takes the user to the search page with all user input set in the URL parameters accordingly", () => {
@@ -104,10 +104,6 @@ describe("Global Search: Advanced Search", () => {
104104
.should("exist")
105105
.type("cypress");
106106

107-
// Select a user
108-
cy.getBySelector("AdvanceSearchUser").should("exist").click();
109-
cy.get("[data-option-index='0']").should("exist").click();
110-
111107
// Select a date
112108
cy.getBySelector("AdvanceSearchDate").should("exist").click();
113109
cy.get("[data-value='today']").should("exist").click();
@@ -117,18 +113,11 @@ describe("Global Search: Advanced Search", () => {
117113
.find("input")
118114
.should("exist")
119115
.should("not.have.value", "");
120-
cy.getBySelector("AdvanceSearchUser")
121-
.find("input")
122-
.should("exist")
123-
.should("not.have.value", "");
124116
cy.getBySelector("AdvanceSearchDate").should("exist").contains("Today");
125117

126118
cy.getBySelector("AdvanceSearchSubmitButton").should("exist").click();
127119

128120
cy.location("pathname").should("equal", "/search");
129-
cy.location("search").should(
130-
"equal",
131-
"?q=cypress&user=5-test-zuid&datePreset=today"
132-
);
121+
cy.location("search").should("equal", "?q=cypress&datePreset=today");
133122
});
134123
});

cypress/e2e/search/search-bar.spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ describe("Global Search: Search Bar", () => {
101101
cy.waitOn(
102102
"https://8-f48cf3a682-7fthvk.api.dev.zesty.io/v1/search/items*",
103103
() => {
104-
cy.visit("/search?q=cypress");
104+
cy.visit("/");
105105
}
106106
);
107107

0 commit comments

Comments
 (0)