Skip to content

Commit a4485fc

Browse files
AlexMacocianAlexandru Macocian
andcommitted
Fix dropdown UI for launch configs (Closes #1177) (#1186)
Co-authored-by: Alexandru Macocian <amacocian@microsoft.com>
1 parent 04c9d86 commit a4485fc

File tree

2 files changed

+39
-1
lines changed

2 files changed

+39
-1
lines changed

Daybreak/Views/LaunchConfigurationsView.razor

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
<FluentSelect TOption="string"
5353
Multiple="false"
5454
Width="100%"
55+
Position="SelectPosition.Below"
5556
Items="@this.ViewModel.Executables"
5657
SelectedOption="@config.ExecutablePath"
5758
SelectedOptionChanged="@((newValue) => this.ViewModel.ExecutableChanged(config, newValue))">
@@ -70,6 +71,8 @@
7071
<div class="launch-config-credentials-field">
7172
<FluentSelect TOption="string"
7273
Multiple="false"
74+
Width="100%"
75+
Position="SelectPosition.Below"
7376
Items="@this.ViewModel.Credentials.Select(c => c.Identifier ?? string.Empty)"
7477
SelectedOption="@(config.Credentials?.Identifier ?? string.Empty)"
7578
SelectedOptionChanged="@((newValue) => this.ViewModel.CredentialsChanged(config, newValue))">

Daybreak/Views/LaunchConfigurationsView.razor.css

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,22 @@
99

1010
.content {
1111
width: 100%;
12-
height: 100%;
12+
flex: 1;
13+
min-height: 0;
1314
display: flex;
1415
flex-direction: column;
16+
overflow: hidden;
17+
}
18+
19+
.option-view-title {
20+
flex-shrink: 0;
1521
}
1622

1723
.launch-configs-list {
1824
display: flex;
1925
flex-direction: column;
26+
flex: 1;
27+
min-height: 0;
2028
overflow-y: auto;
2129
gap: 10px;
2230
max-width: 800px;
@@ -35,6 +43,7 @@
3543
border-top: 0px;
3644
border-left: 0px;
3745
border-right: 0px;
46+
flex-shrink: 0;
3847
}
3948

4049
.launch-config-identifier,
@@ -69,6 +78,32 @@
6978
width: 50%;
7079
}
7180

81+
/* Limit dropdown height to prevent container overflow */
82+
.launch-config-executable-field ::deep fluent-select::part(listbox),
83+
.launch-config-credentials-field ::deep fluent-select::part(listbox) {
84+
max-height: 150px;
85+
overflow-y: auto;
86+
overflow-x: hidden;
87+
}
88+
89+
/* Scrollbar styling for the dropdown */
90+
.launch-config-executable-field ::deep fluent-select::part(listbox)::-webkit-scrollbar,
91+
.launch-config-credentials-field ::deep fluent-select::part(listbox)::-webkit-scrollbar {
92+
width: 6px;
93+
}
94+
95+
.launch-config-executable-field ::deep fluent-select::part(listbox)::-webkit-scrollbar-track,
96+
.launch-config-credentials-field ::deep fluent-select::part(listbox)::-webkit-scrollbar-track {
97+
background: color-mix(in srgb, var(--neutral-fill-rest) 30%, transparent);
98+
border-radius: 3px;
99+
}
100+
101+
.launch-config-executable-field ::deep fluent-select::part(listbox)::-webkit-scrollbar-thumb,
102+
.launch-config-credentials-field ::deep fluent-select::part(listbox)::-webkit-scrollbar-thumb {
103+
background: color-mix(in srgb, var(--neutral-fill-strong-rest) 80%, transparent);
104+
border-radius: 3px;
105+
}
106+
72107
/* Another alternative - target any text content */
73108
.launch-config-identifier-label ::deep *,
74109
.launch-config-executable-label ::deep *,

0 commit comments

Comments
 (0)