diff --git a/product-source/hololake-platform/src/components/HoloLakeHome.test.tsx b/product-source/hololake-platform/src/components/HoloLakeHome.test.tsx index 9f77f05..ab845db 100644 --- a/product-source/hololake-platform/src/components/HoloLakeHome.test.tsx +++ b/product-source/hololake-platform/src/components/HoloLakeHome.test.tsx @@ -551,6 +551,9 @@ describe('HoloLakeHome', () => { }) it('opens the public development repository from the entered Heartbeat Core channel', () => { + expect(HOLOLAKE_DEVELOPMENT_REPOSITORY_URL).toBe( + 'https://guanghulab.com/code/bingshuo/hololake-system-architecture', + ) useGuanghuRouterMock.mockReturnValue(onlineRouter()) render() diff --git a/product-source/hololake-platform/src/components/HoloLakeHome.tsx b/product-source/hololake-platform/src/components/HoloLakeHome.tsx index fc4e0a9..d083484 100644 --- a/product-source/hololake-platform/src/components/HoloLakeHome.tsx +++ b/product-source/hololake-platform/src/components/HoloLakeHome.tsx @@ -21,6 +21,7 @@ import { import { GUANGHU_THEMES, type GuanghuTheme } from '../lib/guanghuTheme' import { planGuanghuLivingSystem } from '../utils/planGuanghuLivingSystem' import { Button } from './ui/button' +import { HOLOLAKE_REPOSITORY_URL } from '../constants/feedback' import { GuanghuRouterConsole } from './GuanghuRouterConsole' import { GuanghuWorldMap } from './GuanghuWorldMap' import { GuanghuWorldLoginGate } from './GuanghuWorldLoginGate' @@ -34,8 +35,7 @@ import { DialogTitle, } from './ui/dialog' -export const HOLOLAKE_DEVELOPMENT_REPOSITORY_URL = - 'https://guanghulab.com/fifth-domain/bingshuo/hololake-platform' +export const HOLOLAKE_DEVELOPMENT_REPOSITORY_URL = HOLOLAKE_REPOSITORY_URL export const GUANGHU_THEME_INTENT_EVENT = 'guanghu:living-system-theme-intent' type HoloLakeHomeProps = { @@ -206,7 +206,7 @@ export function HoloLakeHome({ } const openDevelopmentRepository = () => { - trackEvent('hololake_development_repository_opened', { route: 'REPO-008' }) + trackEvent('hololake_development_repository_opened', { route: 'REPO-014' }) void openExternalUrl(HOLOLAKE_DEVELOPMENT_REPOSITORY_URL) } diff --git a/product-source/hololake-platform/src/constants/feedback.test.ts b/product-source/hololake-platform/src/constants/feedback.test.ts new file mode 100644 index 0000000..93fba45 --- /dev/null +++ b/product-source/hololake-platform/src/constants/feedback.test.ts @@ -0,0 +1,22 @@ +import { describe, expect, it } from 'vitest' +import { + TOLARIA_DOCS_URL, + TOLARIA_GITHUB_CONTRIBUTING_URL, + TOLARIA_GITHUB_DISCUSSIONS_URL, + TOLARIA_GITHUB_ISSUES_URL, + TOLARIA_GITHUB_PULL_REQUESTS_URL, + TOLARIA_PRODUCT_BOARD_URL, +} from './feedback' + +const repositoryUrl = 'https://guanghulab.com/code/bingshuo/hololake-system-architecture' + +describe('HoloLake public repository routes', () => { + it('keeps every shipped repository link on the current REPO-014 route', () => { + expect(TOLARIA_GITHUB_CONTRIBUTING_URL).toBe(repositoryUrl) + expect(TOLARIA_DOCS_URL).toBe(`${repositoryUrl}/src/branch/main/product-source/hololake-platform/docs`) + expect(TOLARIA_PRODUCT_BOARD_URL).toBe(`${repositoryUrl}/issues`) + expect(TOLARIA_GITHUB_DISCUSSIONS_URL).toBe(`${repositoryUrl}/issues`) + expect(TOLARIA_GITHUB_ISSUES_URL).toBe(`${repositoryUrl}/issues`) + expect(TOLARIA_GITHUB_PULL_REQUESTS_URL).toBe(`${repositoryUrl}/pulls`) + }) +}) diff --git a/product-source/hololake-platform/src/constants/feedback.ts b/product-source/hololake-platform/src/constants/feedback.ts index 9a0803a..67972cd 100644 --- a/product-source/hololake-platform/src/constants/feedback.ts +++ b/product-source/hololake-platform/src/constants/feedback.ts @@ -3,10 +3,11 @@ export const CODACY_HOME_URL = 'https://www.codacy.com/' export const CODESCENE_HOME_URL = 'https://codescene.com/' export const CIRCLECI_HOME_URL = 'https://circleci.com/' export const UNBLOCKED_HOME_URL = 'https://getunblocked.com/' -export const TOLARIA_DOCS_URL = 'https://guanghulab.com/fifth-domain/bingshuo/hololake-platform/src/branch/main/docs' +export const HOLOLAKE_REPOSITORY_URL = 'https://guanghulab.com/code/bingshuo/hololake-system-architecture' +export const TOLARIA_DOCS_URL = `${HOLOLAKE_REPOSITORY_URL}/src/branch/main/product-source/hololake-platform/docs` export const TOLARIA_FIRST_LAUNCH_DOCS_URL = TOLARIA_DOCS_URL -export const TOLARIA_PRODUCT_BOARD_URL = 'https://guanghulab.com/fifth-domain/bingshuo/hololake-platform/issues' -export const TOLARIA_GITHUB_DISCUSSIONS_URL = 'https://guanghulab.com/fifth-domain/bingshuo/hololake-platform/issues' -export const TOLARIA_GITHUB_CONTRIBUTING_URL = 'https://guanghulab.com/fifth-domain/bingshuo/hololake-platform' -export const TOLARIA_GITHUB_ISSUES_URL = 'https://guanghulab.com/fifth-domain/bingshuo/hololake-platform/issues' -export const TOLARIA_GITHUB_PULL_REQUESTS_URL = 'https://guanghulab.com/fifth-domain/bingshuo/hololake-platform/pulls' +export const TOLARIA_PRODUCT_BOARD_URL = `${HOLOLAKE_REPOSITORY_URL}/issues` +export const TOLARIA_GITHUB_DISCUSSIONS_URL = `${HOLOLAKE_REPOSITORY_URL}/issues` +export const TOLARIA_GITHUB_CONTRIBUTING_URL = HOLOLAKE_REPOSITORY_URL +export const TOLARIA_GITHUB_ISSUES_URL = `${HOLOLAKE_REPOSITORY_URL}/issues` +export const TOLARIA_GITHUB_PULL_REQUESTS_URL = `${HOLOLAKE_REPOSITORY_URL}/pulls`