From 3f5beafd4cd30d6e7fd1e9cddcf7bd3a37c80734 Mon Sep 17 00:00:00 2001 From: Marco polo Date: Mon, 16 Sep 2024 21:28:01 -0400 Subject: [PATCH] Udate search result item (#24525) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary & Motivation Add "Enter" to the right ## How I Tested These Changes Screenshot 2024-09-16 at 7 13 49 PM ## Changelog NOCHANGELOG --- .../ui-core/src/search/SearchResults.tsx | 65 +++++++++++++------ 1 file changed, 45 insertions(+), 20 deletions(-) diff --git a/js_modules/dagster-ui/packages/ui-core/src/search/SearchResults.tsx b/js_modules/dagster-ui/packages/ui-core/src/search/SearchResults.tsx index e02e86636377b..565e3702cf922 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/search/SearchResults.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/search/SearchResults.tsx @@ -190,26 +190,35 @@ export const SearchResultItem = ({ return ( - - - - {buildSearchIcons(item, isHighlight)} - {isAssetFilterSearchResultType(item.type) && ( - {assetFilterPrefixString(item.type)}: - )} -
{labelComponents}
- {item.repoPath && in {item.repoPath}} -
-
-
- - {item.numResults ? `${item.numResults} assets` : item.description} - -
+ + + + + {buildSearchIcons(item, isHighlight)} + {isAssetFilterSearchResultType(item.type) && ( + {assetFilterPrefixString(item.type)}: + )} +
{labelComponents}
+ {item.repoPath && in {item.repoPath}} +
+
+
+ + {item.numResults ? `${item.numResults} assets` : item.description} + +
+
+ +
Enter
+ +
@@ -286,6 +295,14 @@ const Item = styled.li` margin: 0; user-select: none; + ${({isHighlight}) => + isHighlight + ? `` + : ` + ${ResultEnterWrapper} { + display: none; + } + `} &:hover { background-color: ${Colors.backgroundLighter()}; } @@ -313,3 +330,11 @@ const Description = styled.div` text-overflow: ellipsis; white-space: nowrap; `; + +const ResultEnterWrapper = styled(Box)` + font-size: 12px; + font-style: normal; + font-weight: 400; + line-height: 16px; + color: ${Colors.textLight()}; +`;