Skip to content

Commit 1c73a4a

Browse files
authored
chore: rename .ce.vue files to .standalone.vue (#1690)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - Documentation - Updated contributor guide to use “standalone” naming for web components. - Refactor - Migrated app and component references from legacy variants to standalone components. - Unified component registry and updated global component typings to standalone names. - Tests - Updated test suites to target standalone components; no behavior changes. No user-facing changes. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent 88a924c commit 1c73a4a

40 files changed

+91
-91
lines changed

web/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
For legacy compatibility, Unraid ships web components to the webgui. These components
66
are written as Vue and turned into web components as a build step. By convention,
7-
Vue components that are built as top-level web components are suffixed with `*.ce.vue`
7+
Vue components that are built as top-level web components are suffixed with `*.standalone.vue`
88
for "**c**ustom **e**lement", which comes from the tool used for compilation: `nuxt-custom-elements`.
99

1010
Note: `nuxt-custom-elements` is currently pinned to a specific version because

web/__test__/components/Activation/WelcomeModal.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
99

1010
import type { ComposerTranslation } from 'vue-i18n';
1111

12-
import WelcomeModal from '~/components/Activation/WelcomeModal.ce.vue';
12+
import WelcomeModal from '~/components/Activation/WelcomeModal.standalone.vue';
1313

1414
vi.mock('@unraid/ui', async (importOriginal) => {
1515
const actual = (await importOriginal()) as Record<string, unknown>;
@@ -76,7 +76,7 @@ vi.mock('~/store/theme', () => ({
7676
useThemeStore: () => mockThemeStore,
7777
}));
7878

79-
describe('Activation/WelcomeModal.ce.vue', () => {
79+
describe('Activation/WelcomeModal.standalone.vue', () => {
8080
let mockSetProperty: ReturnType<typeof vi.fn>;
8181
let mockQuerySelector: ReturnType<typeof vi.fn>;
8282

web/__test__/components/Auth.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { beforeEach, describe, expect, it, vi } from 'vitest';
1111

1212
import type { ServerconnectPluginInstalled } from '~/types/server';
1313

14-
import Auth from '~/components/Auth.ce.vue';
14+
import Auth from '~/components/Auth.standalone.vue';
1515
import { useServerStore } from '~/store/server';
1616

1717
vi.mock('vue-i18n', () => ({

web/__test__/components/ColorSwitcher.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
1212

1313
import type { MockInstance } from 'vitest';
1414

15-
import ColorSwitcher from '~/components/ColorSwitcher.ce.vue';
15+
import ColorSwitcher from '~/components/ColorSwitcher.standalone.vue';
1616
import { useThemeStore } from '~/store/theme';
1717

1818
// Explicitly mock @unraid/ui to ensure we use the actual components

web/__test__/components/DowngradeOs.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { mount } from '@vue/test-utils';
88
import { createTestingPinia } from '@pinia/testing';
99
import { beforeEach, describe, expect, it, vi } from 'vitest';
1010

11-
import DowngradeOs from '~/components/DowngradeOs.ce.vue';
11+
import DowngradeOs from '~/components/DowngradeOs.standalone.vue';
1212
import { useServerStore } from '~/store/server';
1313

1414
vi.mock('crypto-js/aes', () => ({

web/__test__/components/DownloadApiLogs.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { BrandButton } from '@unraid/ui';
88
import { createTestingPinia } from '@pinia/testing';
99
import { beforeEach, describe, expect, it, vi } from 'vitest';
1010

11-
import DownloadApiLogs from '~/components/DownloadApiLogs.ce.vue';
11+
import DownloadApiLogs from '~/components/DownloadApiLogs.standalone.vue';
1212

1313
vi.mock('~/helpers/urls', () => ({
1414
CONNECT_FORUMS: new URL('http://mock-forums.local'),

web/__test__/components/HeaderOsVersion.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import type { VueWrapper } from '@vue/test-utils';
1414
import type { Error as CustomApiError } from '~/store/errors';
1515
import type { ServerUpdateOsResponse } from '~/types/server';
1616

17-
import HeaderOsVersion from '~/components/HeaderOsVersion.ce.vue';
17+
import HeaderOsVersion from '~/components/HeaderOsVersion.standalone.vue';
1818
import { useErrorsStore } from '~/store/errors';
1919
import { useServerStore } from '~/store/server';
2020

web/__test__/components/Registration.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import type { VueWrapper } from '@vue/test-utils';
1212
import type { ServerconnectPluginInstalled } from '~/types/server';
1313
import type { Pinia } from 'pinia';
1414

15-
import Registration from '~/components/Registration.ce.vue';
15+
import Registration from '~/components/Registration.standalone.vue';
1616
import { usePurchaseStore } from '~/store/purchase';
1717
import { useReplaceRenewStore } from '~/store/replaceRenew';
1818
import { useServerStore } from '~/store/server';
@@ -116,7 +116,7 @@ vi.mock('vue-i18n', () => ({
116116
useI18n: () => ({ t }),
117117
}));
118118

119-
describe('Registration.ce.vue', () => {
119+
describe('Registration.standalone.vue', () => {
120120
let wrapper: VueWrapper<unknown>;
121121
let pinia: Pinia;
122122
let serverStore: ReturnType<typeof useServerStore>;

web/__test__/components/ThemeSwitcher.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,14 @@ const mockLocation = {
4646

4747
vi.stubGlobal('location', mockLocation);
4848

49-
describe('ThemeSwitcher.ce.vue', () => {
49+
describe('ThemeSwitcher.standalone.vue', () => {
5050
let consoleDebugSpy: MockInstance;
5151
let consoleLogSpy: MockInstance;
5252
let consoleErrorSpy: MockInstance;
5353
let ThemeSwitcher: unknown;
5454

5555
beforeEach(async () => {
56-
ThemeSwitcher = (await import('~/components/ThemeSwitcher.ce.vue')).default;
56+
ThemeSwitcher = (await import('~/components/ThemeSwitcher.standalone.vue')).default;
5757

5858
vi.useFakeTimers();
5959
vi.clearAllMocks();

web/__test__/components/UpdateOs.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { mount } from '@vue/test-utils';
88
import { createTestingPinia } from '@pinia/testing';
99
import { beforeEach, describe, expect, it, vi } from 'vitest';
1010

11-
import UpdateOs from '~/components/UpdateOs.ce.vue';
11+
import UpdateOs from '~/components/UpdateOs.standalone.vue';
1212

1313
vi.mock('@unraid/ui', () => ({
1414
PageContainer: { template: '<div><slot /></div>' },
@@ -61,7 +61,7 @@ const UpdateOsThirdPartyDriversStub = {
6161
props: ['t'],
6262
};
6363

64-
describe('UpdateOs.ce.vue', () => {
64+
describe('UpdateOs.standalone.vue', () => {
6565
beforeEach(() => {
6666
vi.clearAllMocks();
6767
mockRebootType.value = '';

0 commit comments

Comments
 (0)