enhance(emoji): update to Unicode 17, unify and lazy-load emoji data (#39363)

Generate emoji data from Unicode 17's `emoji-test.txt`, keeping existing
aliases. `public/assets/emoji.json` is now the single emoji data file,
also loaded by the backend. Rendered emoji drop their `aria-label`, the
dark theme inverts key on a new `data-alias` attribute instead.

Skin tone variants and their Gitea-only aliases are removed, GitHub has
none either.

Emoji autocompletion is now lazy-loaded with the markdown editor,
shrinking the index JS chunk from 653KB to 563KB.

---------

Signed-off-by: silverwind <me@silverwind.io>
Signed-off-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: bircni <bircni@icloud.com>
This commit is contained in:
silverwind
2026-09-24 20:23:15 +00:00
committed by GitHub
co-authored by wxiaoguang bircni
parent 05f049e8bb
commit 64f31d9b70
24 changed files with 2185 additions and 15287 deletions
+12
View File
@@ -25,6 +25,18 @@ test('comment on and close an issue', async ({page, request}) => {
await expect(page.getByRole('button', {name: 'Reopen Issue'})).toBeVisible();
});
test('emoji autocompletion in issue description', async ({page, request}) => {
const repoName = `e2e-emoji-${randomString(8)}`;
await Promise.all([apiCreateRepo(request, {name: repoName, autoInit: false}), login(page)]);
await page.goto(`/${env.GITEA_TEST_E2E_USER}/${repoName}/issues/new`);
const textarea = page.getByPlaceholder('Leave a comment');
await textarea.focus();
await textarea.pressSequentially(':tada');
await expect(page.getByRole('option', {name: '🎉 tada'})).toBeVisible();
await textarea.press('Tab');
await expect(textarea).toHaveValue('🎉');
});
test('unsaved issue description prompts before leaving', async ({page, request}) => {
const repoName = `e2e-are-you-sure-${randomString(8)}`;
await Promise.all([apiCreateRepo(request, {name: repoName, autoInit: false}), login(page)]);