Skip to content

Commit f3063d7

Browse files
authored
Merge pull request #1077 from writer/bugfix/prevent-passing-attributes-to-lucide-icons-component
fix(ui): prevent passing attributes to the LucideIcon component
2 parents 1817281 + d5836f4 commit f3063d7

File tree

7 files changed

+42
-29
lines changed

7 files changed

+42
-29
lines changed

src/ui/src/builder/settings/BuilderSettingsHandlersBlueprint.vue

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,11 +156,15 @@ function jumpToBlueprint(blueprintId: string, triggerId?: string) {
156156
<WdsIcon name="play" />
157157
</WdsButton>
158158
<p>{{ eventTypeFormated }}</p>
159-
<WdsIcon
159+
<WdsButton
160160
v-if="eventDescription"
161161
:data-writer-tooltip="eventDescription"
162-
name="circle-question-mark"
163-
/>
162+
variant="neutral"
163+
size="smallIcon"
164+
custom-size="18px"
165+
>
166+
<WdsIcon name="circle-question-mark" />
167+
</WdsButton>
164168
</div>
165169

166170
<div class="BuilderSettingsHandlersBlueprint__list">

src/ui/src/components/core/base/BaseCollapseButton.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
size="icon"
77
@click="isCollapsed = !isCollapsed"
88
>
9-
<WdsIcon class="BaseCollapseIcon__icon" :name="icon" />
9+
<WdsIcon :name="icon" />
1010
</WdsButton>
1111
</template>
1212

@@ -50,12 +50,12 @@ const icon = computed(() => {
5050
border-color: var(--separatorColor);
5151
}
5252
53-
:deep(.BaseCollapseIcon__icon) {
53+
.BaseCollapseIcon :deep(svg) {
5454
transition: all 0.3s ease-in-out;
5555
transform: rotate(0deg);
5656
}
5757
58-
.BaseCollapseIcon--collapsed :deep(.BaseCollapseIcon__icon) {
58+
.BaseCollapseIcon--collapsed :deep(svg) {
5959
transform: rotate(180deg);
6060
}
6161
</style>

src/ui/src/components/core/content/CoreDataframe.vue

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@
4242
data-writer-grid-col="0"
4343
class="CoreDataframe__table__th CoreDataframe__table__th--index"
4444
>
45-
<WdsIcon class="widthAdjuster" name="grip-vertical" />
45+
<div class="widthAdjuster">
46+
<WdsIcon name="grip-vertical" />
47+
</div>
4648
</div>
4749
<div
4850
v-for="(columnName, columnPosition) in shownColumnNames"
@@ -59,16 +61,21 @@
5961
>
6062
{{ columnName }}
6163
</button>
62-
<WdsIcon
64+
<div
6365
v-if="orderSetting?.columnName == columnName"
6466
class="CoreDataframe__table__th__icon"
65-
:name="
66-
orderSetting?.descending
67-
? 'arrow-up'
68-
: 'arrow-down'
69-
"
70-
/>
71-
<WdsIcon class="widthAdjuster" name="grip-vertical" />
67+
>
68+
<WdsIcon
69+
:name="
70+
orderSetting?.descending
71+
? 'arrow-up'
72+
: 'arrow-down'
73+
"
74+
/>
75+
</div>
76+
<div class="widthAdjuster">
77+
<WdsIcon name="grip-vertical" />
78+
</div>
7279
</div>
7380
<div
7481
v-if="hasActions"
@@ -793,7 +800,7 @@ onUnmounted(() => {
793800
text-overflow: ellipsis;
794801
}
795802
796-
:deep(.CoreDataframe__table__th__icon) {
803+
.CoreDataframe__table__th__icon {
797804
display: flex;
798805
align-items: center;
799806
justify-content: center;
@@ -815,7 +822,7 @@ onUnmounted(() => {
815822
z-index: 1;
816823
}
817824
818-
:deep(.widthAdjuster) {
825+
.widthAdjuster {
819826
display: flex;
820827
align-items: center;
821828
justify-content: center;
@@ -832,7 +839,7 @@ onUnmounted(() => {
832839
color: var(--wdsColorGray4);
833840
}
834841
835-
:deep(.widthAdjuster:hover) {
842+
.widthAdjuster:hover {
836843
color: var(--wdsColorBlack);
837844
}
838845
</style>

src/ui/src/renderer/RendererNotifications.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
@click="toggle"
66
>
77
<div ref="balloon" class="balloon" title="Toggle notifications">
8-
<WdsIcon class="icon" name="bell" />
8+
<WdsIcon name="bell" />
99
<div class="counter">{{ notifications.length }}</div>
1010
</div>
1111
<div class="balloonFlash"></div>
@@ -142,11 +142,11 @@ const clearAll = () => {
142142
flex-direction: column;
143143
}
144144
145-
.balloon :deep(.icon) {
145+
.balloon :deep(svg) {
146146
font-size: 1.25rem;
147147
}
148148
149-
.balloon.alert :deep(.icon) {
149+
.balloon.alert :deep(svg) {
150150
animation-name: ring;
151151
animation-duration: 0.3s;
152152
animation-iteration-count: 4;

src/ui/src/wds/WdsCheckbox.vue

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ function onChange(event: InputEvent) {
2929
@mousedown.prevent
3030
>
3131
<div class="WdsCheckbox__checkbox">
32-
<WdsIcon name="check" class="WdsCheckbox__checkbox__check" />
32+
<WdsIcon name="check" />
3333
</div>
3434
<span v-if="label" class="WdsCheckbox__label">{{ label }}</span>
3535
<span v-if="detail" class="WdsCheckbox__detail">{{ detail }}</span>
@@ -85,17 +85,18 @@ function onChange(event: InputEvent) {
8585
font-weight: bold;
8686
}
8787
88-
:deep(.WdsCheckbox__checkbox__check) {
88+
.WdsCheckbox__checkbox :deep(svg) {
8989
display: none;
9090
}
9191
9292
.WdsCheckbox:hover:not(.WdsCheckbox--checked):not(.WdsCheckbox--disabled)
93-
:deep(.WdsCheckbox__checkbox__check) {
93+
.WdsCheckbox__checkbox
94+
:deep(svg) {
9495
display: block;
9596
color: var(--wdsColorGray4);
9697
}
9798
98-
.WdsCheckbox--checked :deep(.WdsCheckbox__checkbox__check) {
99+
.WdsCheckbox--checked .WdsCheckbox__checkbox :deep(svg) {
99100
display: block;
100101
color: var(--wdsColorWhite);
101102
}

src/ui/src/wds/WdsIcon.vue

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77
import CustomIcon, { isCustomIconName } from "./WdsIcons/CustomIcon.vue";
88
import LucideIcon from "./WdsIcons/LucideIcon.vue";
99
10+
defineOptions({
11+
inheritAttrs: false,
12+
});
13+
1014
defineProps({
1115
name: { type: String, required: true },
1216
});

src/ui/src/wds/WdsIcons/LucideIcon.vue

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
</template>
66

77
<script setup lang="ts">
8-
import { nextTick, ref, toRef, useAttrs, watch } from "vue";
8+
import { nextTick, ref, toRef, watch } from "vue";
99
import { createIcons, icons } from "lucide";
1010
1111
defineOptions({
@@ -16,8 +16,6 @@ const props = defineProps({
1616
name: { type: String, required: true },
1717
});
1818
19-
const attrs = useAttrs();
20-
2119
const rawHtml = ref("");
2220
2321
function renderIcon(name: string) {
@@ -29,7 +27,6 @@ function renderIcon(name: string) {
2927
attrs: {
3028
width: "1em",
3129
height: "1em",
32-
...attrs,
3330
},
3431
});
3532
});

0 commit comments

Comments
 (0)