Skip to content

Commit

Permalink
enhance(search): remove detailed explorer info from Autocomplete
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelgerber committed Apr 11, 2024
1 parent 8cfbb2a commit 4927798
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
9 changes: 7 additions & 2 deletions site/search/Autocomplete.scss
Original file line number Diff line number Diff line change
Expand Up @@ -215,9 +215,14 @@ section[data-autocomplete-source-id="recentSearchesPlugin"]
}
}

section[data-autocomplete-source-id="autocomplete"]
section[data-autocomplete-source-id="autocomplete"] {
.aa-ItemWrapper {
text-wrap: pretty;
}

.aa-ItemWrapper__contentType {
color: $blue-50;
color: $blue-50;
}
}

section[data-autocomplete-source-id="runSearch"] {
Expand Down
14 changes: 5 additions & 9 deletions site/search/Autocomplete.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -165,15 +165,11 @@ const AlgoliaSource: AutocompleteSource<BaseItem> = {
item.__autocomplete_indexName as string
)
const indexLabel =
index === SearchIndexName.Charts ? (
"Chart"
) : index === SearchIndexName.ExplorerViews ? (
<>
in <em>{item.explorerTitle} Data Explorer</em>
</>
) : (
pageTypeDisplayNames[item.type as PageType]
)
index === SearchIndexName.Charts
? "Chart"
: index === SearchIndexName.ExplorerViews
? "Explorer"
: pageTypeDisplayNames[item.type as PageType]

const mainAttribute =
index === SearchIndexName.ExplorerViews ? "viewTitle" : "title"
Expand Down

0 comments on commit 4927798

Please sign in to comment.