Skip to content

Commit 564862e

Browse files
author
Alberto Iannaccone
authored
Prevent board selector item labels to overflow (#1216)
* prevent board selector item labels to overflow * make board selector show ellipsis when the board name is too long
1 parent d7f7010 commit 564862e

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

arduino-ide-extension/src/browser/boards/boards-toolbar-item.tsx

+8-4
Original file line numberDiff line numberDiff line change
@@ -130,11 +130,14 @@ export class BoardsDropDown extends React.Component<BoardsDropDown.Props> {
130130
protocolIcon
131131
)}
132132
/>
133-
<div className="arduino-boards-dropdown-item--label">
134-
<div className="arduino-boards-dropdown-item--board-label">
133+
<div
134+
className="arduino-boards-dropdown-item--label"
135+
title={`${boardLabel}\n${port.address}`}
136+
>
137+
<div className="arduino-boards-dropdown-item--board-label noWrapInfo noselect">
135138
{boardLabel}
136139
</div>
137-
<div className="arduino-boards-dropdown-item--port-label">
140+
<div className="arduino-boards-dropdown-item--port-label noWrapInfo noselect">
138141
{port.address}
139142
</div>
140143
</div>
@@ -229,7 +232,8 @@ export class BoardsToolBarItem extends React.Component<
229232
<div
230233
className={classNames(
231234
'arduino-boards-toolbar-item--label',
232-
'noWrapInfo noselect',
235+
'noWrapInfo',
236+
'noselect',
233237
{ 'arduino-boards-toolbar-item--label-connected': isConnected }
234238
)}
235239
>

arduino-ide-extension/src/browser/style/boards-config-dialog.css

+1-3
Original file line numberDiff line numberDiff line change
@@ -181,9 +181,6 @@ div#select-board-dialog .selectBoardContainer .body .list .item.selected i {
181181
}
182182

183183
.arduino-boards-toolbar-item--label {
184-
height: 100%;
185-
display: flex;
186-
align-items: center;
187184
width: 100%;
188185
}
189186

@@ -227,6 +224,7 @@ div#select-board-dialog .selectBoardContainer .body .list .item.selected i {
227224
}
228225

229226
.arduino-boards-dropdown-item--label {
227+
overflow: hidden;
230228
flex: 1;
231229
}
232230

0 commit comments

Comments
 (0)