Skip to content
This repository was archived by the owner on Feb 6, 2026. It is now read-only.

Commit ebbc218

Browse files
Merge pull request #7164 from systeminit/wendy/eng-3204-kill-vbutton-once-and-for-all
no more VButton, unified NewButton component
2 parents 257addd + 7360786 commit ebbc218

36 files changed

Lines changed: 650 additions & 562 deletions

app/web/src/newhotness/AddViewModal.vue

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -36,23 +36,12 @@
3636
</form>
3737

3838
<div class="flex gap-sm mt-sm">
39-
<VButton
40-
label="Cancel"
41-
tone="shade"
42-
variant="ghost"
43-
@click="() => modalRef?.close()"
44-
/>
45-
<VButton
46-
:class="
47-
clsx(
48-
'flex-grow !text-sm !border !cursor-pointer !px-xs',
49-
themeClasses(
50-
'!text-neutral-100 !bg-[#1264BF] !border-[#318AED] hover:!bg-[#2583EC]',
51-
'!text-neutral-100 !bg-[#1264BF] !border-[#318AED] hover:!bg-[#2583EC]',
52-
),
53-
)
54-
"
39+
<NewButton label="Cancel" @click="() => modalRef?.close()" />
40+
<NewButton
41+
class="flex-grow"
42+
icon="plus"
5543
label="Create"
44+
tone="action"
5645
:loading="wForm.bifrosting.value"
5746
:disabled="wForm.bifrosting.value"
5847
@click="() => nameForm.handleSubmit()"
@@ -62,7 +51,12 @@
6251
</template>
6352

6453
<script setup lang="ts">
65-
import { Modal, Icon, VButton, themeClasses } from "@si/vue-lib/design-system";
54+
import {
55+
Modal,
56+
Icon,
57+
NewButton,
58+
themeClasses,
59+
} from "@si/vue-lib/design-system";
6660
import { computed, ref } from "vue";
6761
import { useRoute } from "vue-router";
6862
import clsx from "clsx";

app/web/src/newhotness/ApplyChangeSetButton.vue

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,10 @@
11
<template>
22
<section v-if="!ctx.onHead.value">
3-
<VButton
3+
<NewButton
44
ref="applyButtonRef"
5-
size="sm"
5+
tone="action"
66
label="Apply Change Set"
7-
:class="
8-
clsx(
9-
'ml-2xs mr-xs !text-sm !border !cursor-pointer !px-xs',
10-
themeClasses(
11-
'!text-neutral-100 !bg-[#1264BF] !border-[#318AED] hover:!bg-[#2583EC]',
12-
'!text-neutral-100 !bg-[#1264BF] !border-[#318AED] hover:!bg-[#2583EC]',
13-
),
14-
)
15-
"
7+
class="ml-2xs mr-xs"
168
loadingText="Applying Changes"
179
:loading="applyInFlight"
1810
@click="openApplyChangeSetModal"
@@ -25,7 +17,7 @@
2517
class="border border-action-200 ml-2xs py-2xs"
2618
/>
2719
</template>
28-
</VButton>
20+
</NewButton>
2921
<ApplyChangeSetModal
3022
ref="applyChangeSetModalRef"
3123
votingKind="merge"
@@ -37,8 +29,7 @@
3729
<script lang="ts" setup>
3830
import { computed, ref, watchEffect, nextTick } from "vue";
3931
import * as _ from "lodash-es";
40-
import { VButton, PillCounter, themeClasses } from "@si/vue-lib/design-system";
41-
import clsx from "clsx";
32+
import { PillCounter, NewButton } from "@si/vue-lib/design-system";
4233
import { useQuery } from "@tanstack/vue-query";
4334
import { useRoute, useRouter } from "vue-router";
4435
import {

app/web/src/newhotness/ApplyChangeSetModal.vue

Lines changed: 8 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -70,39 +70,20 @@
7070
v-else
7171
class="flex flex-row w-full items-center justify-center gap-sm mt-xs"
7272
>
73-
<VButton
74-
label="Cancel"
75-
tone="neutral"
76-
pill="Esc"
77-
@click="closeModalHandler"
78-
/>
79-
<VButton
73+
<NewButton label="Cancel" pill="Esc" @click="closeModalHandler" />
74+
<NewButton
8075
v-if="approvalsEnabled"
8176
label="Request Approval"
82-
:class="
83-
clsx(
84-
'grow !text-sm !border !cursor-pointer !px-xs',
85-
themeClasses(
86-
'!text-neutral-100 !bg-[#1264BF] !border-[#318AED] hover:!bg-[#2583EC]',
87-
'!text-neutral-100 !bg-[#1264BF] !border-[#318AED] hover:!bg-[#2583EC]',
88-
),
89-
)
90-
"
77+
tone="action"
78+
class="grow"
9179
pill="Cmd + Enter"
9280
@click="debouncedRequestApproval"
9381
/>
94-
<VButton
82+
<NewButton
9583
v-else
9684
label="Apply Change Set"
97-
:class="
98-
clsx(
99-
'grow !text-sm !border !cursor-pointer !px-xs',
100-
themeClasses(
101-
'!text-neutral-100 !bg-[#1264BF] !border-[#318AED] hover:!bg-[#2583EC]',
102-
'!text-neutral-100 !bg-[#1264BF] !border-[#318AED] hover:!bg-[#2583EC]',
103-
),
104-
)
105-
"
85+
tone="action"
86+
class="grow"
10687
loadingText="Applying Changes"
10788
:loading="applyInFlight"
10889
:disabled="!allowedToApplyWithApprovalsDisabled"
@@ -117,13 +98,7 @@
11798

11899
<script lang="ts" setup>
119100
import * as _ from "lodash-es";
120-
import {
121-
PillCounter,
122-
Icon,
123-
VButton,
124-
Modal,
125-
themeClasses,
126-
} from "@si/vue-lib/design-system";
101+
import { PillCounter, Icon, NewButton, Modal } from "@si/vue-lib/design-system";
127102
import clsx from "clsx";
128103
import { useRouter, useRoute } from "vue-router";
129104
import { computed, onBeforeUnmount, inject, onMounted, ref, watch } from "vue";

app/web/src/newhotness/ApprovalFlow.vue

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -139,17 +139,16 @@
139139

140140
<!-- BUTTONS -->
141141
<div class="flex flex-row flex-none gap-sm justify-center mt-sm shrink-0">
142-
<VButton
142+
<NewButton
143143
label="Withdraw Request"
144144
tone="warning"
145-
variant="ghost"
146145
icon="x"
147146
:loading="cancelApi.inFlight.value || reopenApi.inFlight.value"
148147
loadingText="Processing..."
149148
@click="withdraw"
150149
/>
151150
<template v-if="userIsApprover">
152-
<VButton
151+
<NewButton
153152
:disabled="iRejected"
154153
label="Reject Request"
155154
tone="destructive"
@@ -158,43 +157,40 @@
158157
loadingText="Rejecting..."
159158
@click="reject"
160159
/>
161-
<VButton
160+
<NewButton
162161
:disabled="iApproved"
163162
label="Approve Request"
164-
tone="success"
163+
tone="action"
165164
icon="thumbs-up"
166165
:loading="approveApi.inFlight.value"
167166
loadingText="Approving..."
168167
@click="approve"
169168
/>
170169
</template>
171-
<VButton
170+
<NewButton
172171
:disabled="disallowApplyForApprovalFlow"
173-
tone="success"
172+
label="Apply Change Set"
173+
icon="tools"
174+
tone="action"
174175
:loading="flowStatus === 'approved' ? applyInFlight : false"
175176
loadingText="Applying..."
176177
@click="apply"
177-
>
178-
<span class="dark:text-neutral-800">Apply Change Set</span>
179-
<template #icon>
180-
<Icon name="tools" size="sm" class="dark:text-neutral-800" />
181-
</template>
182-
</VButton>
178+
/>
183179
</div>
184180
</div>
185181
</template>
186182

187183
<script lang="ts" setup>
188184
import * as _ from "lodash-es";
189185
import {
190-
VButton,
191186
Timestamp,
192187
Tones,
193188
ErrorMessage,
194189
Icon,
195190
IconNames,
196191
themeClasses,
197192
TruncateWithTooltip,
193+
NewButton,
198194
} from "@si/vue-lib/design-system";
199195
import { computed } from "vue";
200196
import { RouterLink } from "vue-router";

app/web/src/newhotness/CodeEditorModal.vue

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -41,20 +41,8 @@
4141
</div>
4242

4343
<div class="flex justify-end gap-sm mt-sm">
44-
<VButton label="Cancel" tone="shade" variant="ghost" @click="cancel" />
45-
<VButton
46-
:class="
47-
clsx(
48-
'!text-sm !border !cursor-pointer !px-xs',
49-
themeClasses(
50-
'!text-neutral-100 !bg-[#1264BF] !border-[#318AED] hover:!bg-[#2583EC]',
51-
'!text-neutral-100 !bg-[#1264BF] !border-[#318AED] hover:!bg-[#2583EC]',
52-
),
53-
)
54-
"
55-
label="Save"
56-
@click="save"
57-
/>
44+
<NewButton label="Cancel" @click="cancel" />
45+
<NewButton label="Save" tone="action" @click="save" />
5846
</div>
5947
</Modal>
6048
</template>
@@ -63,9 +51,9 @@
6351
import {
6452
Icon,
6553
Modal,
54+
NewButton,
6655
themeClasses,
6756
useModal,
68-
VButton,
6957
} from "@si/vue-lib/design-system";
7058
import clsx from "clsx";
7159
import { onBeforeUnmount, ref, watch } from "vue";

0 commit comments

Comments
 (0)