loading up the forgejo repo on tangled to test page performance
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix JS error and improve error message styles (#29963)

Fixes: https://github.com/go-gitea/gitea/issues/29956. This error
exposed a existing bug in the code, it was just never noticed because
the jQuery expression evaluated without error before while the new one
doesn't.

Also improves error message styles:

Before:
<img width="1338" alt="Screenshot 2024-03-21 at 09 16 07"
src="https://github.com/go-gitea/gitea/assets/115237/1cc1ef89-ad94-491e-bbca-75387f7547a0">

After:
<img width="1335" alt="Screenshot 2024-03-21 at 09 15 44"
src="https://github.com/go-gitea/gitea/assets/115237/312efc79-5353-4e2a-a703-1bccd3c01736">

(cherry picked from commit 1a4f693f9f9723c181b747cb6d658aa37118005a)

authored by

silverwind and committed by
Earl Warren
faed9337 cb656d1a

+3 -1
+1 -1
web_src/js/bootstrap.js
··· 23 23 let msgDiv = pageContent.querySelector(`.js-global-error[data-global-error-msg-compact="${msgCompact}"]`); 24 24 if (!msgDiv) { 25 25 const el = document.createElement('div'); 26 - el.innerHTML = `<div class="ui container negative message center aligned js-global-error" style="white-space: pre-line;"></div>`; 26 + el.innerHTML = `<div class="ui container negative message center aligned js-global-error tw-mt-[15px] tw-whitespace-pre-line"></div>`; 27 27 msgDiv = el.childNodes[0]; 28 28 } 29 29 // merge duplicated messages into "the message (count)" format
+2
web_src/js/features/repo-common.js
··· 76 76 77 77 export function initRepoCommonFilterSearchDropdown(selector) { 78 78 const $dropdown = $(selector); 79 + if (!$dropdown.length) return; 80 + 79 81 $dropdown.dropdown({ 80 82 fullTextSearch: 'exact', 81 83 selectOnKeydown: false,