Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import {
containerNodeConfigMap,
} from "./taskNodeConfig";
import { getCallSubType, getListenSubType, getRunSubType } from "../../core";
import { Tooltip, TooltipContent, TooltipTrigger } from "@/components/ui/tooltip";

export const ReactFlowNodeTypes: RF.NodeTypes = {
[GraphNodeType.Start]: StartNode,
Expand Down Expand Up @@ -88,14 +89,25 @@ function TaskNodeBadge({ badge, testId }: BadgeProps) {
const isUnknown = !KNOWN_BADGES.has(badge.toLowerCase());

if (isUnknown) {
/* TODO: instead of using the browser default to display tool tip like below, replace with tooltip component when we add it */
return (
<span title={badge} className="dec-task-node-badge-custom" data-testid={`${testId}-custom`}>
{badge}
</span>
<Tooltip>
<TooltipTrigger asChild>
<span className="dec-task-node-badge-custom" data-testid={`${testId}-custom`}>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The span here should be removed, that was temporary for the browser tooltip , please also remove the associated css

{badge}
</span>
</TooltipTrigger>
Comment thread
kumaradityaraj marked this conversation as resolved.
<TooltipContent>
<p
style={{
color: window.matchMedia("(prefers-color-scheme: dark)").matches ? "#fff" : "#000",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be done in css and follow the same pattern the other components do for styling light and dark modes (in css files you will see classes with .dark)

}}
>
Comment thread
kumaradityaraj marked this conversation as resolved.
{badge}
</p>
Comment thread
kumaradityaraj marked this conversation as resolved.
</TooltipContent>
</Tooltip>
);
}

return (
<span className="dec-task-node-badge" data-testid={testId}>
{badge}
Expand Down
Loading