Skip to content

Commit fd014b6

Browse files
committed
feat: add snippet list header
1 parent 9f43733 commit fd014b6

File tree

2 files changed

+50
-13
lines changed

2 files changed

+50
-13
lines changed

src/extensionsIntegrated/CustomSnippets/htmlContent/snippets-panel.html

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
</div>
1717

1818
<div id="filter-snippets-panel" class="filter-snippets-panel">
19-
<input id="filter-snippets-input" type="text" placeholder="Filter..." autocomplete="off">
19+
<input id="filter-snippets-input" type="text" placeholder="Filter..." autocomplete="off" />
2020
</div>
2121

2222
<div id="close-custom-snippets-panel-btn">
@@ -34,6 +34,14 @@
3434
</div>
3535
</div>
3636

37+
<div id="snippets-list-header" class="snippets-list-header">
38+
<div id="snippet-abbr-header">Abbreviation</div>
39+
<div id="snippet-template-header">Template Text</div>
40+
<div id="snippet-description-header">Description</div>
41+
<div id="snippet-file-extension-header">File Extension</div>
42+
<div id="snippet-actions-header"></div>
43+
</div>
44+
3745
<div id="snippets-list-wrapper" class="snippets-list-wrapper hidden">
3846
<!--leaving here for format reference-->
3947
<!--

src/styles/Extn-CustomSnippets.less

Lines changed: 41 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@
1313
display: flex;
1414
align-items: center;
1515
position: relative;
16-
border-bottom: 1px solid @bc-panel-separator;
16+
border-bottom: none;
1717
box-shadow:
1818
inset 0 1px 0 @bc-highlight,
1919
0 -1px 3px @bc-shadow-small;
2020

2121
.dark & {
2222
background-color: @dark-bc-panel-bg-promoted;
23-
border-bottom: 1px solid @dark-bc-panel-separator;
23+
border-bottom: none;
2424
box-shadow:
2525
inset 0 1px 0 @dark-bc-highlight,
2626
0 -1px 3px @dark-bc-shadow-small;
@@ -141,6 +141,45 @@
141141
padding: 0;
142142
}
143143

144+
#snippets-list-header {
145+
display: flex;
146+
align-items: center;
147+
padding: 6px 13px;
148+
margin: 0;
149+
border: none;
150+
font-weight: 700;
151+
background-color: @bc-section-separator;
152+
153+
.dark & {
154+
background-color: @dark-bc-section-separator;
155+
}
156+
}
157+
158+
#snippet-abbr-header,
159+
#snippet-abbr {
160+
flex: 1;
161+
min-width: 80px;
162+
}
163+
164+
#snippet-template-header,
165+
#snippet-template {
166+
flex: 2.4;
167+
min-width: 100px;
168+
}
169+
170+
#snippet-description-header,
171+
#snippet-description {
172+
flex: 1.5;
173+
min-width: 80px;
174+
}
175+
176+
#snippet-file-extension-header,
177+
#snippet-files {
178+
flex: 0.8;
179+
min-width: 60px;
180+
text-align: center;
181+
}
182+
144183
#snippet-item {
145184
display: flex;
146185
align-items: center;
@@ -191,8 +230,6 @@
191230
}
192231

193232
#snippet-abbr {
194-
flex: 1;
195-
min-width: 80px;
196233
color: @bc-text;
197234
white-space: nowrap;
198235
overflow: hidden;
@@ -204,8 +241,6 @@
204241
}
205242

206243
#snippet-template {
207-
flex: 2.5;
208-
min-width: 100px;
209244
margin: 0 12px;
210245
color: @bc-text-thin;
211246
white-space: nowrap;
@@ -218,8 +253,6 @@
218253
}
219254

220255
#snippet-description {
221-
flex: 1.5;
222-
min-width: 80px;
223256
margin: 0 12px;
224257
color: @bc-text-thin-quiet;
225258
white-space: nowrap;
@@ -232,10 +265,7 @@
232265
}
233266

234267
#snippet-files {
235-
flex: 0.8;
236-
min-width: 60px;
237268
color: @bc-text-thin-quiet;
238-
text-align: center;
239269
white-space: nowrap;
240270
overflow: hidden;
241271
text-overflow: ellipsis;
@@ -246,7 +276,6 @@
246276
}
247277

248278
.delete-snippet-btn {
249-
flex: 0 0 20px;
250279
color: @bc-text-thin-quiet;
251280
cursor: pointer;
252281
opacity: 0.3;

0 commit comments

Comments
 (0)