Skip to content

Commit c770d3f

Browse files
committed
refactor: remove redundant selectable={false} from Button-wrapped text
The Button component automatically makes all text non-selectable via makeTextUnselectable(), so explicit selectable={false} attributes on text elements inside Button components are redundant. Removed from: - agent-mode-toggle.tsx - build-mode-buttons.tsx - raised-pill.tsx - segmented-control.tsx Kept selectable={false} on text elements outside Button components.
1 parent 1186c9b commit c770d3f

File tree

4 files changed

+8
-9
lines changed

4 files changed

+8
-9
lines changed

cli/src/components/agent-mode-toggle.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,6 @@ export const AgentModeToggle = ({
216216
onMouseOut={handleMouseOut}
217217
>
218218
<text
219-
selectable={false}
220219
wrapMode="none"
221220
fg={isCollapsedHovered ? theme.foreground : theme.muted}
222221
>

cli/src/components/build-mode-buttons.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export const BuildModeButtons = ({
5555
onMouseOver={() => setHoveredButton('fast')}
5656
onMouseOut={() => setHoveredButton(null)}
5757
>
58-
<text wrapMode="none" selectable={false}>
58+
<text wrapMode="none">
5959
<span fg={theme.foreground}>Build DEFAULT</span>
6060
</text>
6161
</Button>
@@ -74,7 +74,7 @@ export const BuildModeButtons = ({
7474
onMouseOver={() => setHoveredButton('max')}
7575
onMouseOut={() => setHoveredButton(null)}
7676
>
77-
<text wrapMode="none" selectable={false}>
77+
<text wrapMode="none">
7878
<span fg={theme.foreground}>Build MAX</span>
7979
</text>
8080
</Button>

cli/src/components/raised-pill.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,10 @@ export const RaisedPill = ({
6565
}}
6666
onClick={onPress}
6767
>
68-
<text selectable={false}>
68+
<text>
6969
<span fg={frameColor}>{`╭${horizontal}╮`}</span>
7070
</text>
71-
<text selectable={false}>
71+
<text>
7272
<span fg={frameColor}>
7373
7474
</span>
@@ -86,7 +86,7 @@ export const RaisedPill = ({
8686
8787
</span>
8888
</text>
89-
<text selectable={false}>
89+
<text>
9090
<span fg={frameColor}>{`╰${horizontal}╯`}</span>
9191
</text>
9292
</Button>

cli/src/components/segmented-control.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ export const SegmentedControl = ({
8989
minWidth: seg.width,
9090
}}
9191
>
92-
<text fg={seg.frameColor} selectable={false}>{seg.topBorder}</text>
93-
<text fg={seg.textColor} selectable={false}>
92+
<text fg={seg.frameColor}>{seg.topBorder}</text>
93+
<text fg={seg.textColor}>
9494
{seg.isItalic ? (
9595
<i>{seg.content}</i>
9696
) : seg.isBold ? (
@@ -99,7 +99,7 @@ export const SegmentedControl = ({
9999
seg.content
100100
)}
101101
</text>
102-
<text fg={seg.frameColor} selectable={false}>{seg.bottomBorder}</text>
102+
<text fg={seg.frameColor}>{seg.bottomBorder}</text>
103103
</Button>
104104

105105
{rightOfHovered ? (

0 commit comments

Comments
 (0)