jojo/templates/repo
0ko d05002fbfb fix(ui): prevent JS from removing icon from close/reopen button (#9959)
Followup to https://codeberg.org/forgejo/forgejo/pulls/9598. A bug surfaced.

When typing text in, JS was updating button's `textContent`, which also affected the icon included in the button. To avoid complex rebuilding of the button element in JS I just placed the text it it's own span, `textContent` of which is now updated by JS instead of the whole button.

Preview

Normal state from template:
https://codeberg.org/attachments/f504bcc3-c1bc-4b10-96ae-e8b666c4a828
https://codeberg.org/attachments/5e72109c-04c7-49b0-ba05-e8f17c949fcb

After editing text, without the fix:
https://codeberg.org/attachments/2c61b02f-b36a-4b80-8816-98bed3fc48e0
https://codeberg.org/attachments/923d4419-97ee-48c6-b60d-9719e36ae6ff

With the fix:
https://codeberg.org/attachments/458c1f6a-549e-4ef7-8822-8529351b7bc4
https://codeberg.org/attachments/839032f7-2f4a-488a-a8a5-d3fbfc45504b

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/9959
Reviewed-by: Otto <otto@codeberg.org>
2025-11-05 05:02:52 +01:00
..
actions feat: replace cross origin protection (#9830) 2025-10-29 22:43:22 +01:00
branch feat: convert create/rename branch and create tag to native dialog (#9760) 2025-10-30 21:06:14 +01:00
cite ui: fix go to citation button url (#4597) 2024-08-22 15:36:12 +00:00
code feat: replace cross origin protection (#9830) 2025-10-29 22:43:22 +01:00
diff feat: replace cross origin protection (#9830) 2025-10-29 22:43:22 +01:00
editor feat: replace cross origin protection (#9830) 2025-10-29 22:43:22 +01:00
find Migrate gt-hidden to tw-hidden (#30046) 2024-03-30 07:17:29 +01:00
graph feat: add tag label to commit list view (#8759) 2025-08-06 14:47:51 +02:00
issue fix(ui): prevent JS from removing icon from close/reopen button (#9959) 2025-11-05 05:02:52 +01:00
migrate feat: replace cross origin protection (#9830) 2025-10-29 22:43:22 +01:00
projects Migrate margin and padding helpers to tailwind (#30043) 2024-03-30 07:17:29 +01:00
pulls feat: replace cross origin protection (#9830) 2025-10-29 22:43:22 +01:00
release feat: replace cross origin protection (#9830) 2025-10-29 22:43:22 +01:00
settings feat: replace cross origin protection (#9830) 2025-10-29 22:43:22 +01:00
tag fix(ui): fix alignment of items in tag signature (#9398) 2025-09-24 14:54:24 +02:00
wiki feat: replace cross origin protection (#9830) 2025-10-29 22:43:22 +01:00
activity.tmpl Show repo activities even if only code unit active or git repo is empty but issue is active (#3455) 2024-04-28 13:47:52 +00:00
admin_flags.tmpl [FEAT] Repository flags 2024-02-05 16:09:42 +01:00
blame.tmpl ui(blame): remove broken padding (#4318) 2024-07-04 11:46:31 +00:00
branch_dropdown.tmpl fix(ui): show commit icon in branch dropdown button when viewing a commit (#7571) 2025-04-19 04:33:07 +00:00
clone_buttons.tmpl Refactor clone-panel styles (#29861) 2024-03-26 19:04:24 +01:00
clone_script.tmpl Customizable "Open with" applications for repository clone (#29320) 2024-03-23 11:58:54 +01:00
code_frequency.tmpl Implement code frequency graph (#29191) 2024-02-26 22:30:26 +01:00
commit_header.tmpl feat: convert create/rename branch and create tag to native dialog (#9760) 2025-10-30 21:06:14 +01:00
commit_load_branches_and_tags.tmpl Implement single-commit PR review flow (#7155) 2025-06-17 09:31:50 +02:00
commit_page.tmpl chore: extract commit header template (#8061) 2025-06-05 11:35:08 +02:00
commit_status.tmpl Restore warning commit status (#27504) 2023-10-08 22:16:06 +00:00
commit_statuses.tmpl Replace 10 more gt- classes with tw- (#29945) 2024-03-26 19:04:27 +01:00
commits.tmpl fix(ui): move file rename notice to before pagination (#8818) 2025-08-10 21:35:34 +02:00
commits_list.tmpl feat: add tag label to commit list view (#8759) 2025-08-06 14:47:51 +02:00
commits_list_small.tmpl Implement single-commit PR review flow (#7155) 2025-06-17 09:31:50 +02:00
commits_search_dropdown.tmpl Unify search boxes (#29530) 2024-03-20 12:31:05 +00:00
commits_table.tmpl fix(ui): move file rename notice to before pagination (#8818) 2025-08-10 21:35:34 +02:00
contributors.tmpl Add "n commits" link to contributors in contributors graph page (#32799) 2024-12-15 13:21:02 +01:00
create.tmpl feat: replace cross origin protection (#9830) 2025-10-29 22:43:22 +01:00
create_advanced.tmpl New repo: Rework advanced and template sections 2024-12-28 22:32:19 +01:00
create_basic.tmpl fix(ui): make limits clearer in create repo form (#7402) 2025-05-20 16:37:15 +02:00
create_from_template.tmpl New repo: Rework advanced and template sections 2024-12-28 22:32:19 +01:00
create_helper.tmpl Remove incorrect and unnecessary Escape from templates (#29394) 2024-02-26 22:30:27 +01:00
create_init.tmpl fix(ui): wrap items in gitignore dropdown (#8830) 2025-08-09 19:33:18 +02:00
empty.tmpl fix(ui): clarify repo init instruction for sha256 (#7394) 2025-03-30 18:08:05 +00:00
file_info.tmpl [UI] Adjust trailing EOL behavior for empty file 2024-08-19 20:23:15 +02:00
flags.tmpl feat: replace cross origin protection (#9830) 2025-10-29 22:43:22 +01:00
forks.tmpl Migrate margin and padding helpers to tailwind (#30043) 2024-03-30 07:17:29 +01:00
graph.tmpl fix(ui): use gap in switch items (#7581) 2025-04-21 04:25:08 +00:00
header.tmpl fix: prevent deadlocks updating repo.num_action_runs/num_closed_action_runs (#9927) 2025-11-02 22:24:56 +01:00
header_fork.tmpl feat: improve tooltips and aria-labels of stars/forks/watchers links (#9754) 2025-10-19 18:33:26 +02:00
home.tmpl feat(ui): implement new buttons for better cohesiveness (#9359) 2025-10-05 05:22:32 +02:00
icon.tmpl Replace 10 more gt- classes with tw- (#29945) 2024-03-26 19:04:27 +01:00
latest_commit.tmpl Show if commit is signed in activity feed and unify sha box (#6933) 2025-05-03 10:54:52 +00:00
navbar.tmpl Hide activity contributors, recent commits and code frequrency left tabs if there is no code permission (#34053) 2025-04-01 02:28:02 +02:00
packages.tmpl Fix inconsistent user profile layout across tabs (#25625) 2023-07-06 18:59:24 +00:00
pulse.tmpl chore(i18n): move some plural strings to json (#9463) 2025-09-29 09:27:50 +02:00
recent_commits.tmpl Implement recent commits graph (#29210) 2024-02-26 22:30:26 +01:00
release_tag_header.tmpl fix(ui/releases): strech elements apart when no search bar (#9626) 2025-10-11 05:39:10 +02:00
search.tmpl ui(code-search): fix to use CodeSearchMode 2024-09-16 16:20:55 +02:00
search_name.tmpl Clean template/helper.go (#23922) 2023-04-07 03:31:41 -04:00
shabox.tmpl chore(ui): improve hashbox (#8721) 2025-08-03 05:49:24 +02:00
shabox_badge.tmpl chore(ui): clean up hashbox CSS, small design changes (#7822) 2025-05-25 12:51:27 +02:00
star_unstar.tmpl feat: improve tooltips and aria-labels of stars/forks/watchers links (#9754) 2025-10-19 18:33:26 +02:00
sub_menu.tmpl feat(ui): responsive, JS-free repo language stats panel (#9532) 2025-10-05 20:36:35 +02:00
unicode_escape_prompt.tmpl templates: remove superfluous SanitizeHTML 2024-03-11 23:36:58 +07:00
upload.tmpl Always use ctx.Locale.Tr inside templates (#27231) 2023-09-25 08:56:50 +00:00
user_cards.tmpl fix(ui): ensure same width of usercards in grid (#6799) 2025-05-25 13:31:53 +02:00
view_file.tmpl frontend: generic lazy loader for webcomponents (#8510) 2025-07-23 04:10:50 +02:00
view_list.tmpl git/commit: re-implement submodules file reader (#8438) 2025-07-15 00:20:00 +02:00
watch_unwatch.tmpl feat: improve tooltips and aria-labels of stars/forks/watchers links (#9754) 2025-10-19 18:33:26 +02:00
watchers.tmpl Fix user-cards format (#24428) 2023-04-29 15:43:01 -04:00