Skip to content

Commit 876f5b4

Browse files
refactor: Rename dependency classes to match modal
1 parent 411e727 commit 876f5b4

File tree

2 files changed

+16
-32
lines changed

2 files changed

+16
-32
lines changed

src/ui/Dependency.svelte

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@
181181
/>
182182
</span>
183183
{#if searchResults && searchResults.length !== 0}
184-
<ul class="suggested-tasks"
184+
<ul class="task-dependency-dropdown"
185185
bind:this={dropdown}
186186
on:mouseleave={() => searchIndex = null}>
187187
{#each searchResults as searchTask, index}
@@ -195,7 +195,7 @@
195195
[{searchTask.status.symbol}] {searchTask.descriptionWithoutTags}
196196
</div>
197197
{#if filepath}
198-
<div class="dependency-location"
198+
<div class="dependency-path"
199199
on:mouseenter={(e) => showDescriptionTooltip(e.currentTarget, filepath)}>
200200
{filepath}
201201
</div>
@@ -204,13 +204,13 @@
204204
{/each}
205205
</ul>
206206
{/if}
207-
<div class="chip-container results">
207+
<div class="task-dependencies-container results">
208208
{#each editableTask[type] as task}
209-
<div class="chip"
209+
<div class="task-dependency"
210210
on:mouseenter={(e) => showDescriptionTooltip(e.currentTarget, task.descriptionWithoutTags)}>
211-
<span class="chip-name">[{task.status.symbol}] {task.descriptionWithoutTags}</span>
211+
<span class="task-dependency-name">[{task.status.symbol}] {task.descriptionWithoutTags}</span>
212212

213-
<button on:click={() => removeTask(task)} type="button" class="chip-close">
213+
<button on:click={() => removeTask(task)} type="button" class="task-dependency-delete">
214214
<svg style="display: block; margin: auto;" xmlns="http://www.w3.org/2000/svg" width="12"
215215
viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="4" stroke-linecap="round"
216216
stroke-linejoin="round" class="lucide lucide-x">

styles.css

Lines changed: 10 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -287,33 +287,32 @@ a.tasks-edit, a.tasks-postpone {
287287
grid-row: 1;
288288
}
289289
}
290-
291290
/* Dependency Styles */
292291

293-
.chip-container {
292+
.task-dependencies-container {
294293
padding-bottom: 4px;
295294
padding-top: 4px;
296295
display: flex;
297296
flex-wrap: wrap;
298297
gap: 8px;
299298
}
300-
.chip {
299+
.task-dependency {
301300
display: inline-flex;
302301
background-color: var(--interactive-normal);
303302
box-shadow: var(--input-shadow);
304303
border-radius: 28px;
305304
padding: 6px 8px 6px 12px;
306305
}
307306

308-
.chip-name {
307+
.task-dependency-name {
309308
font-size: 14px;
310309
max-width: 160px;
311310
overflow: hidden;
312311
white-space: nowrap;
313312
text-overflow: ellipsis;
314313
}
315314

316-
.chip-close {
315+
.task-dependency-delete {
317316
padding: 3px;
318317
border-radius: 50%;
319318
margin-left: 6px;
@@ -323,7 +322,7 @@ a.tasks-edit, a.tasks-postpone {
323322
background-color: var(--background-primary) !important;
324323
}
325324

326-
.suggested-tasks {
325+
.task-dependency-dropdown {
327326
list-style: none;
328327
position: absolute;
329328
top: 0;
@@ -340,28 +339,28 @@ a.tasks-edit, a.tasks-postpone {
340339
overflow-y: auto;
341340
}
342341

343-
.suggested-tasks li {
342+
.task-dependency-dropdown li {
344343
padding: 5px;
345344
margin: 2px;
346345
border-radius: 6px;
347346
cursor: pointer;
348347
display: flex;
349348
justify-content: space-between
350349
}
351-
.suggested-tasks li .dependency-name {
350+
.task-dependency-dropdown li .dependency-name {
352351
overflow: hidden;
353352
white-space: nowrap;
354353
text-overflow: ellipsis;
355354
}
356355

357-
.suggested-tasks li .dependency-name-shared {
356+
.task-dependency-dropdown li .dependency-name-shared {
358357
width: calc(60%);
359358
overflow: hidden;
360359
white-space: nowrap;
361360
text-overflow: ellipsis;
362361
}
363362

364-
.suggested-tasks li .dependency-location {
363+
.task-dependency-dropdown li .dependency-path {
365364
width: calc(40%);
366365
overflow: hidden;
367366
white-space: nowrap;
@@ -371,25 +370,10 @@ a.tasks-edit, a.tasks-postpone {
371370
color: var(--italic-color)
372371
}
373372

374-
.suggested-tasks li.selected {
373+
.task-dependency-dropdown li.selected {
375374
background-color: var(--text-selection);
376375
}
377376

378-
.blocking-tooltip {
379-
display: none;
380-
width: max-content;
381-
position: absolute;
382-
top: 0;
383-
left: 0;
384-
background: #222;
385-
color: white;
386-
font-weight: bold;
387-
padding: 5px;
388-
border-radius: 4px;
389-
font-size: 90%;
390-
}
391-
392-
393377
/**------------------------------------------------------------------------
394378
** SETTINGS
395379
*------------------------------------------------------------------------**/

0 commit comments

Comments
 (0)