Skip to content

Commit

Permalink
fix e2e search
Browse files Browse the repository at this point in the history
  • Loading branch information
bilalabbad committed Dec 11, 2024
1 parent e765858 commit 2f96f31
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export function SearchAnywhereDialog({
"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%]"
)}
data-testid="search-anywhere"
className="overflow-hidden"
shouldFilter={false}
label="Search anywhere"
>
Expand Down
3 changes: 2 additions & 1 deletion frontend/app/src/components/search/search-anywhere.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ export function SearchAnywhere({ isCollapsed }: SearchModalProps) {
useEffect(() => {
const onSearchAnywhereShortcut = (event: KeyboardEvent) => {
if ((event.metaKey || event.ctrlKey) && event.key.toLowerCase() === "k") {
openModal();
event.preventDefault();
openDialog();
}
};

Expand Down
8 changes: 4 additions & 4 deletions frontend/app/src/components/search/search-nodes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ const NodesOptions = ({ node }: NodesOptionsProps) => {
className="text-lg px-2 py-0.5 text-custom-blue-700"
/>

<div className="flex-grow text-sm">
<div className="flex-grow text-sm overflow-auto">
<div className="flex justify-between">
<span className="mr-1 font-semibold text-custom-blue-800">
{objectDetailsData?.display_label}
Expand Down Expand Up @@ -158,7 +158,7 @@ const NodeAttribute = ({ title, kind, value }: NodeAttributeProps) => {
const color = value.color === "" ? "#f1f1f1" : value.color;
return (
<div
className="px-1.5 rounded text-gray-700 font-medium text-center border border-transparent"
className="px-1.5 rounded text-gray-700 font-medium text-center border border-transparent truncate"
style={{ background: `${color}40` }}
>
{value.label}
Expand All @@ -172,9 +172,9 @@ const NodeAttribute = ({ title, kind, value }: NodeAttributeProps) => {
};

return (
<div className="flex flex-col text-xxs whitespace-nowrap leading-3">
<div className="flex flex-col text-xxs whitespace-nowrap leading-3 overflow-hidden">
<span>{title}</span>
<span className="font-medium text-gray-800">{formatValue() || "-"}</span>
<span className="font-medium text-gray-800 truncate">{formatValue() || "-"}</span>
</div>
);
};
Expand Down

0 comments on commit 2f96f31

Please sign in to comment.