Skip to content

Commit cbc9e0f

Browse files
feat: add wider tooltip for workflow access in visual builder
1 parent 4881789 commit cbc9e0f

2 files changed

Lines changed: 15 additions & 2 deletions

File tree

src/visualBuilder/components/fieldLabelWrapper.tsx

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,15 @@ function FieldLabelDisabledIcon(
116116
visualBuilderStyles()["visual-builder__custom-tooltip--below"]
117117
);
118118

119+
const workflowAccessTooltipClass = classNames(
120+
visualBuilderStyles()["visual-builder__custom-tooltip"],
121+
showTooltipBelow &&
122+
visualBuilderStyles()["visual-builder__custom-tooltip--below"],
123+
visualBuilderStyles()[
124+
"visual-builder__custom-tooltip--workflow-access"
125+
]
126+
);
127+
119128
return (
120129
<div
121130
ref={wrapRef}
@@ -148,7 +157,7 @@ function FieldLabelDisabledIcon(
148157
</div>
149158
) : null}
150159
{workflowRequestUi === "request" && reason ? (
151-
<div className={customTooltipClass}>
160+
<div className={workflowAccessTooltipClass}>
152161
<span>{reason}</span>{" "}
153162
<span
154163
role="button"
@@ -173,7 +182,7 @@ function FieldLabelDisabledIcon(
173182
</div>
174183
) : null}
175184
{workflowRequestUi === "pending" && reason ? (
176-
<div className={customTooltipClass}>{reason}</div>
185+
<div className={workflowAccessTooltipClass}>{reason}</div>
177186
) : null}
178187
<InfoIcon />
179188
</div>

src/visualBuilder/visualBuilder.style.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -639,6 +639,10 @@ export function visualBuilderStyles() {
639639
content: none;
640640
}
641641
`,
642+
/** Wider cap for workflow request / pending copy — must follow base `.visual-builder__custom-tooltip` so max-width wins over 200px. */
643+
"visual-builder__custom-tooltip--workflow-access": css`
644+
max-width: 325px;
645+
`,
642646
"visual-builder__empty-block": css`
643647
width: 100%;
644648
height: 100%;

0 commit comments

Comments
 (0)