Skip to content

Commit a7ef6f0

Browse files
committed
feat: show tooltip when add-snippet labels are hovered
1 parent f2be234 commit a7ef6f0

File tree

2 files changed

+31
-5
lines changed

2 files changed

+31
-5
lines changed

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

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,23 +70,39 @@
7070
<div id="custom-snippets-add-new" class="custom-snippets-add-new hidden">
7171
<div class="form-row">
7272
<div id="abbr-box-wrapper">
73-
<label for="abbr-box">Abbreviation: </label>
73+
<label for="abbr-box"
74+
title="Enter a short abbreviation (e.g., 'clg', 'fn', 'div'). This is what you'll type to trigger the snippet."
75+
data-placement="top">
76+
Abbreviation:
77+
</label>
7478
<input id="abbr-box" type="text" placeholder="clg" autocomplete="off" />
7579
</div>
7680

7781
<div id="desc-box-wrapper">
78-
<label for="desc-box">Description: </label>
82+
<label for="desc-box"
83+
title="Brief description of what this snippet does (e.g., 'console log shortcut', 'function template')."
84+
data-placement="top">
85+
Description:
86+
</label>
7987
<input id="desc-box" type="text" placeholder="console log shortcut" autocomplete="off" />
8088
</div>
8189
</div>
8290

8391
<div id="template-text-box-wrapper">
84-
<label for="template-text-box">Template Text: </label>
85-
<textarea id="template-text-box" placeholder="console.log();" autocomplete="off"></textarea>
92+
<label for="template-text-box"
93+
title="The actual code that will be inserted. Use ${cursor} to set cursor position after insertion."
94+
data-placement="top">
95+
Template Text:
96+
</label>
97+
<textarea id="template-text-box" placeholder="console.log(${cursor});" autocomplete="off"></textarea>
8698
</div>
8799

88100
<div id="file-extn-box-wrapper">
89-
<label for="file-extn-box">File Extension: </label>
101+
<label for="file-extn-box"
102+
title="Specify file types where this snippet should be available (e.g., '.js', '.html', '.css') or 'all' for all files."
103+
data-placement="top">
104+
File Extension:
105+
</label>
90106
<input id="file-extn-box" type="text" placeholder=".js, .html or all" autocomplete="off" />
91107
</div>
92108

src/styles/Extn-CustomSnippets.less

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -441,10 +441,20 @@
441441
display: block;
442442
margin-bottom: 6px;
443443
color: @bc-text;
444+
cursor: pointer;
445+
transition: color 0.2s ease;
444446

445447
.dark & {
446448
color: @dark-bc-text;
447449
}
450+
451+
&:hover {
452+
color: @bc-text-emphasized;
453+
454+
.dark & {
455+
color: @dark-bc-text-emphasized;
456+
}
457+
}
448458
}
449459

450460
input,

0 commit comments

Comments
 (0)