Skip to content

Commit 14b27ac

Browse files
authored
Migrate Tabler to phosphor icons (#1394)
* πŸ“¦οΈ Update services-ui * πŸ”¨ Use proper icon slots for button components * πŸ”¨ Switch tabler for phosphor icons * ❌️ Remove unused components * πŸ“¦οΈ Remove tabler dependency * πŸ”¨ Fix icon issues
1 parent 5b88df9 commit 14b27ac

29 files changed

+123
-427
lines changed

β€Žfrontend/package-lock.jsonβ€Ž

Lines changed: 23 additions & 30 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Žfrontend/package.jsonβ€Ž

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
"@rushstack/eslint-patch": "^1.11.0",
1717
"@sentry/vite-plugin": "^4.0.2",
1818
"@sentry/vue": "^9.10.1",
19-
"@tabler/icons-vue": "^3.7.0",
2019
"@tailwindcss/forms": "^0.5.3",
2120
"@thunderbirdops/services-ui": "^1.2.0",
2221
"@types/ua-parser-js": "^0.7.39",

β€Žfrontend/src/components/ConfirmationModal.vueβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { useI18n } from 'vue-i18n';
33
import { PrimaryButton, DangerButton } from '@thunderbirdops/services-ui';
44
55
// icons
6-
import { IconX } from '@tabler/icons-vue';
6+
import { PhX } from '@phosphor-icons/vue';
77
88
const { t } = useI18n();
99
@@ -33,7 +33,7 @@ const emit = defineEmits(['close', 'confirm', 'error']);
3333
class="position-center fixed z-50 flex w-full max-w-lg flex-col items-center gap-6 rounded-xl bg-white p-12 dark:bg-gray-700"
3434
>
3535
<div class="btn-close absolute right-8 top-8 cursor-pointer" @click="emit('close')" :title="t('label.close')">
36-
<icon-x class="size-6 fill-transparent stroke-gray-700 stroke-1 dark:stroke-gray-400" />
36+
<ph-x class="size-6 fill-transparent stroke-gray-700 stroke-1 dark:stroke-gray-400" />
3737
</div>
3838
<div class="text-2xl font-semibold text-teal-500">
3939
{{ title }}

β€Žfrontend/src/components/NavBar.vueβ€Ž

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ import DropDown from '@/elements/DropDown.vue';
77
import NavBarItem from '@/elements/NavBarItem.vue';
88
import TextButton from '@/elements/TextButton.vue';
99
import { TooltipPosition } from '@/definitions';
10-
import { IconExternalLink } from '@tabler/icons-vue';
11-
import { PhLinkSimple } from '@phosphor-icons/vue';
10+
import { PhArrowSquareOut, PhLinkSimple } from '@phosphor-icons/vue';
1211
import { UserAvatar, ToolTip } from '@thunderbirdops/services-ui';
1312
1413
// component constants
@@ -108,10 +107,10 @@ const copyLink = async () => {
108107
data-testid="user-nav-share-link-btn"
109108
/>
110109
<router-link :to="{ name: 'report-bug' }" class="router-link-with-icon" data-testid="user-nav-report-bug-menu">
111-
{{ t('navBar.reportBug') }} <icon-external-link class="size-4"/>
110+
{{ t('navBar.reportBug') }} <ph-arrow-square-out class="size-4"/>
112111
</router-link>
113112
<router-link :to="{ name: 'contact' }" class="router-link-with-icon" data-testid="user-nav-contact-menu">
114-
{{ t('label.contact') }} <icon-external-link class="size-4"/>
113+
{{ t('label.contact') }} <ph-arrow-square-out class="size-4"/>
115114
</router-link>
116115
<hr class="border-teal-500" />
117116
<router-link :to="{ name: 'logout' }" data-testid="user-nav-logout-menu">
@@ -260,4 +259,4 @@ const copyLink = async () => {
260259
transition: opacity 250ms ease-out;
261260
}
262261
}
263-
</style>
262+
</style>

β€Žfrontend/src/components/NavBarMobile.vueβ€Ž

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,28 @@ import { ref } from 'vue';
33
import { useI18n } from 'vue-i18n';
44
import { useUserStore } from '@/stores/user-store';
55
import {
6-
IconMenu2,
7-
IconX,
8-
IconHome,
9-
IconCalendarClock,
10-
IconCalendarCheck,
11-
IconExternalLink,
12-
IconSettings,
13-
IconLogout,
14-
IconChevronDown,
15-
IconUserSquare,
16-
} from '@tabler/icons-vue';
6+
PhList,
7+
PhX,
8+
PhHouse,
9+
PhCalendarDot,
10+
PhCalendarCheck,
11+
PhArrowSquareOut,
12+
PhGear,
13+
PhSignOut,
14+
PhCaretDown,
15+
PhUserSquare,
16+
} from '@phosphor-icons/vue';
1717
import { PrimaryButton, UserAvatar } from '@thunderbirdops/services-ui';
1818
1919
// component constants
2020
const userStore = useUserStore();
2121
const { t } = useI18n();
2222
2323
const navItems = [
24-
{ route: 'dashboard', i18nKey: 'dashboard', icon: IconHome },
25-
{ route: 'bookings', i18nKey: 'bookings', icon: IconCalendarCheck },
26-
{ route: 'availability', i18nKey: 'availability', icon: IconCalendarClock },
27-
{ route: 'settings', i18nKey: 'settings', icon: IconSettings },
24+
{ route: 'dashboard', i18nKey: 'dashboard', icon: PhHouse },
25+
{ route: 'bookings', i18nKey: 'bookings', icon: PhCalendarCheck },
26+
{ route: 'availability', i18nKey: 'availability', icon: PhCalendarDot },
27+
{ route: 'settings', i18nKey: 'settings', icon: PhGear },
2828
];
2929
3030
const menuOpen = ref(false);
@@ -56,7 +56,7 @@ async function copyLink() {
5656
<!-- Mobile NavBar (closed) -->
5757
<header class="header-mobile">
5858
<button @click="onMenuOpen" :aria-label="t('label.openMenu')" :aria-expanded="menuOpen" aria-controls="primaryNav">
59-
<icon-menu2 size="24" />
59+
<ph-list size="24" />
6060
</button>
6161

6262
<router-link :to="{ name: userStore.authenticated ? 'dashboard' : 'home' }">
@@ -72,7 +72,7 @@ async function copyLink() {
7272
<div class="menu-content-container">
7373
<header>
7474
<button @click="onMenuClose">
75-
<icon-x size="24" />
75+
<ph-x size="24" />
7676
</button>
7777

7878
<img src="@/assets/svg/appointment_logo.svg" alt="Appointment Logo" />
@@ -98,32 +98,32 @@ async function copyLink() {
9898
<user-avatar :username="userStore.data.username" :avatar-url="userStore.data.avatarUrl" />
9999
<span class="user-email">{{ userStore.data.email }}</span>
100100
</div>
101-
<icon-chevron-down size="20" class="chevron-icon" />
101+
<ph-caret-down size="20" class="chevron-icon" />
102102
</summary>
103103

104104
<ul @click="onMenuClose">
105105
<router-link to="profile">
106106
<li>
107-
<icon-user-square size="24" />
107+
<ph-user-square size="24" />
108108
{{ t('label.userProfile') }}
109109
</li>
110110
</router-link>
111111
<router-link to="report-bug">
112112
<li>
113-
<icon-external-link size="24" />
113+
<ph-arrow-square-out size="24" />
114114
{{ t('navBar.reportBug') }}
115115
</li>
116116
</router-link>
117117
<router-link to="contact">
118118
<li>
119-
<icon-external-link size="24" />
119+
<ph-arrow-square-out size="24" />
120120
{{ t('label.contact') }}
121121
</li>
122122
</router-link>
123123
</ul>
124124
</details>
125125
<router-link to="logout">
126-
<icon-logout size="24" />
126+
<ph-sign-out size="24" />
127127
{{ t('label.logOut') }}
128128
</router-link>
129129
</div>
@@ -312,4 +312,4 @@ nav {
312312
transition: opacity 250ms ease-out;
313313
}
314314
}
315-
</style>
315+
</style>

β€Žfrontend/src/elements/AlertBox.vueβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<script setup lang="ts">
22
import { Alert } from '@/models';
33
import { AlertSchemes } from '@/definitions';
4-
import { IconX } from '@tabler/icons-vue';
4+
import { PhX } from '@phosphor-icons/vue';
55
import { computed, ref } from 'vue';
66
import { useI18n } from 'vue-i18n';
77
import { NoticeBar, NoticeBarTypes } from '@thunderbirdops/services-ui';
@@ -56,7 +56,7 @@ const toggleDetails = () => {
5656
<span v-if="!open">Show more</span>
5757
</span>
5858
<span v-if="canClose" class="btn-close" @click="emit('close')" :title="t('label.close')">
59-
<icon-x />
59+
<ph-x />
6060
</span>
6161
</span>
6262
</template>

0 commit comments

Comments
Β (0)