-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement query builder & select step validation error UI behavior
- Loading branch information
Showing
6 changed files
with
146 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
frontend/src/components/query/query-builder/invalid-step-popover.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
"use client"; | ||
import { Callout, Colors, Icon, Popover, Text } from "@blueprintjs/core"; | ||
import * as _ from "lodash"; | ||
|
||
export default function InvalidStepPopover({ errors }: { errors: any[] }) { | ||
return ( | ||
<Popover | ||
content={ | ||
<div className="p-1"> | ||
<Callout | ||
intent="warning" | ||
icon="warning-sign" | ||
title="This step is invalid" | ||
> | ||
{_.map(errors, (error: any, index: number) => { | ||
return ( | ||
<Text key={index}> | ||
{index + 1}. {error.message} | ||
</Text> | ||
); | ||
})} | ||
</Callout> | ||
</div> | ||
} | ||
interactionKind="hover" | ||
placement="right" | ||
> | ||
<div className="flex flex-row items-center p-1 ml-2 border rounded-sm cursor-pointer border-bluprint-border-gray"> | ||
<Icon className="mr-1" icon="warning-sign" color={Colors.ORANGE3} /> | ||
<Text>Invalid step</Text> | ||
</div> | ||
</Popover> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters