From 2f6ca55a1c02ac18e4c98e0f08a57c4a3eabe679 Mon Sep 17 00:00:00 2001 From: 0ko <0ko@noreply.codeberg.org> Date: Sat, 8 Nov 2025 18:21:05 +0100 Subject: [PATCH] fix(ui): replace obsolete gt- helpers (#9964) Resolved a few obsolete (no longer functional) `gt-` helpers that were not converted into other classes at some point. `gt-interact-bg` was replaced by `interact-bg`. The remaining one was on action view page in a gear icon, which lacked proper background change on hover. `gt-font-18` & `gt-font-normal` were remaining in the repo name on repo page. I left out the `*-font-18` one out and kept fixed the font-weight, but also made the `/` use normal font-weight instead of semibold, which looks better. Preview Before: https://codeberg.org/attachments/e52d5ebc-7fa8-4057-8e4b-05d219525092 Gitea: https://codeberg.org/attachments/a9a50928-6e0e-483c-82fe-73b6c244f4d5 After: https://codeberg.org/attachments/fd04d5b1-1965-478f-9d45-97c5d994c780 Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/9964 Reviewed-by: Gusted --- templates/repo/header.tmpl | 4 ++-- tests/e2e/repo-home.test.e2e.ts | 13 +++++++++++++ web_src/js/components/RepoActionView.vue | 2 +- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/templates/repo/header.tmpl b/templates/repo/header.tmpl index e5e9606d21..513758a149 100644 --- a/templates/repo/header.tmpl +++ b/templates/repo/header.tmpl @@ -7,8 +7,8 @@ {{template "repo/icon" .}}
-
diff --git a/tests/e2e/repo-home.test.e2e.ts b/tests/e2e/repo-home.test.e2e.ts index 53fcdd77f1..5a10c719c7 100644 --- a/tests/e2e/repo-home.test.e2e.ts +++ b/tests/e2e/repo-home.test.e2e.ts @@ -31,6 +31,19 @@ test('Language stats bar', async ({browser}) => { await screenshot(page); }); +test('Repo title', async ({browser}) => { + const context = await browser.newContext({javaScriptEnabled: false}); + const page = await context.newPage(); + + const response = await page.goto('/user2/repo1'); + expect(response?.status()).toBe(200); + + const repoHeader = page.locator('.repo-header'); + expect(await repoHeader.locator('.flex-item-title').evaluate((el) => getComputedStyle(el).fontWeight)).toBe('400'); + expect(await repoHeader.locator('.flex-item-title a[href="/user2"]').evaluate((el) => getComputedStyle(el).fontWeight)).toBe('400'); + expect(await repoHeader.locator('.flex-item-title a[href="/user2/repo1"]').evaluate((el) => getComputedStyle(el).fontWeight)).toBe('600'); +}); + test('Branch selector commit icon', async ({page}) => { const response = await page.goto('/user2/repo1'); expect(response?.status()).toBe(200); diff --git a/web_src/js/components/RepoActionView.vue b/web_src/js/components/RepoActionView.vue index 097676cac2..3581e891fd 100644 --- a/web_src/js/components/RepoActionView.vue +++ b/web_src/js/components/RepoActionView.vue @@ -637,7 +637,7 @@ export default {