Skip to content

Commit 6a628e2

Browse files
committed
chore(webapp): trim comments on the label fade helper
1 parent 469936e commit 6a628e2

2 files changed

Lines changed: 1 addition & 10 deletions

File tree

apps/webapp/app/components/environments/EnvironmentLabel.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,7 @@ export function EnvironmentLabel({
8989
tooltipSideOffset?: number;
9090
tooltipSide?: "top" | "right" | "bottom" | "left";
9191
disableTooltip?: boolean;
92-
/**
93-
* When false, an overflowing label fades out at its right edge instead of ending in an ellipsis,
94-
* matching the other side menu labels. Defaults true.
95-
*/
92+
/** When false, an overflowing label fades at its right edge instead of ending in an ellipsis. */
9693
truncate?: boolean;
9794
}) {
9895
const spanRef = useRef<HTMLSpanElement>(null);

apps/webapp/app/components/primitives/labelOverflowFade.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
1-
/**
2-
* Right-edge gradient fade for labels that clip, used instead of a hard cut or an ellipsis. Apply
3-
* it only while the text actually overflows — masking a label that fits would fade its last
4-
* characters for no reason.
5-
*/
61
const LABEL_OVERFLOW_MASK = "linear-gradient(to right, black calc(100% - 1.5rem), transparent)";
72

8-
/** Mask style for a clipping label, or nothing when the text fits. Spread into a `style` prop. */
93
export function labelOverflowFadeStyle(isOverflowing: boolean) {
104
return isOverflowing
115
? { maskImage: LABEL_OVERFLOW_MASK, WebkitMaskImage: LABEL_OVERFLOW_MASK }

0 commit comments

Comments
 (0)