Skip to content

Commit e585e31

Browse files
Merge staging into feature/lambda-get-started
2 parents 4e9304b + cb603ed commit e585e31

File tree

1 file changed

+39
-2
lines changed

1 file changed

+39
-2
lines changed

packages/core/src/login/webview/vue/selectableItem.vue

Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@
22
<div
33
class="item-container-base"
44
tabindex="0"
5-
:class="{ selected: isSelected, hovering: isHovering }"
5+
:class="{ selected: isSelected, hovering: isHovering, focussed: isFocused }"
6+
:title="itemTitle"
7+
@blur="hideFocus"
68
@click="toggleSelection"
9+
@focus="showFocus"
710
@keydown.enter="toggleSelection"
811
@mouseover="isHovering = true"
912
@mouseout="isHovering = false"
@@ -56,7 +59,7 @@
5659
</svg>
5760
</div>
5861
<div class="text">
59-
<div class="title" :title="itemTitle">{{ itemTitle }}</div>
62+
<div class="title">{{ itemTitle }}</div>
6063
<div class="p" v-if="itemText" :title="itemText">{{ itemText }}</div>
6164
</div>
6265
</div>
@@ -83,6 +86,7 @@ export default defineComponent({
8386
itemText: this.itemText,
8487
isSelected: this.isSelected,
8588
isHovering: false,
89+
isFocused: false,
8690
8791
// v-ifs above should be based on itemId with LoginOption, but that doesn't cover existing connections whose LoginOption > than the max option
8892
LoginOption,
@@ -93,6 +97,16 @@ export default defineComponent({
9397
toggleSelection() {
9498
this.$emit('toggle', this.itemId)
9599
},
100+
hideFocus(event: Event) {
101+
event.stopPropagation()
102+
this.isFocused = false
103+
},
104+
showFocus(event: Event) {
105+
event.stopPropagation()
106+
if (!this.isHovering) {
107+
this.isFocused = true
108+
}
109+
},
96110
},
97111
})
98112
</script>
@@ -106,6 +120,29 @@ export default defineComponent({
106120
user-select: none;
107121
/* Some items do not have itemText, so we need a consistent height for all items */
108122
height: 50px;
123+
position: relative;
124+
}
125+
.item-container-base.focussed::before {
126+
content: attr(title);
127+
cursor: default;
128+
display: block;
129+
font-size: var(--font-size-sm);
130+
height: auto;
131+
max-width: 130px;
132+
padding: 5px;
133+
position: absolute;
134+
right: 0;
135+
transform: translate(0, -100%);
136+
word-break: break-all;
137+
}
138+
139+
.vscode-dark .item-container-base.focussed:before {
140+
background-color: white;
141+
color: rgba(0, 0, 0, 0.8);
142+
}
143+
.vscode-light .item-container-base.focussed:before {
144+
background-color: black;
145+
color: rgba(255, 255, 255, 0.8);
109146
}
110147
111148
.hovering {

0 commit comments

Comments
 (0)