1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-04 09:37:19 +00:00
Commit Graph

1257 Commits

Author SHA1 Message Date
0af7a7b79f Fix some log and UI problems (#34863) (#34868)
Backport #34863 by @wxiaoguang

Remove the misleading error log, fix #34738

Make the "search" input auto-focused, fix #34807

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-06-25 22:08:30 +03:00
f27a75564a Fix readme path and markdown link paste (#34755) (#34760)
Backport #34755 by wxiaoguang

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-06-18 05:38:45 +00:00
23d2d224c2 fix: prevent double markdown link brackets when pasting URL (#34745) (#34748)
Backport #34745 by MaxWebZ

When adding a link using the "Add a link" button in comment editor,
pasting a URL resulted in incorrect Markdown formatting (double
brackets) instead of replacing the placeholder text.

This fix adds a context check to prevent creating a new markdown link
when we're already inside an existing one.

Fixes #34740

Co-authored-by: MaxWebZ <5054326@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-06-17 16:21:08 +00:00
a43d829de8 Fix JS error for "select" dropdown (#34743) (#34749)
Backport #34743 by wxiaoguang

Regression of recent dropdown filter change.

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-06-17 22:34:14 +08:00
64b9b21790 Hide href attribute of a tag if there is no target_url (#34556) (#34684)
Backport #34556 by @lunny

Relate #34450

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2025-06-11 00:55:40 +00:00
b947bc4363 Fix footnote jump behavior on the issue page. (#34621) (#34669)
Backport #34621 by @charles7668

Close #34511 
Close #34590 

Add comment ID to the footnote item's id attribute to ensure uniqueness.

Co-authored-by: charles <30816317+charles7668@users.noreply.github.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-06-09 20:57:01 +00:00
c5da032193 fixed incorrect page navigation with up and down arrow on last item of dashboard repos (#34570) (#34596)
Backport #34570 by metiftikci

Co-authored-by: metiftikci <metiftikci@hotmail.com>
2025-06-04 07:13:39 +08:00
7baa6fa47c Fix some trivial problems (#34579) (#34585)
Backport #34579 by wxiaoguang

See the comments

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-06-02 17:31:35 +00:00
e9481e1da3 Fix line-button issue after file selection in file tree (#34574) (#34576)
Backport #34574

---------

Co-authored-by: Kerwin Bryant <kerwin612@qq.com>
2025-06-01 23:20:21 -07:00
47537a8361 Add a button editing action secret #34348 (#34462)
Backport #34348

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-05-16 15:26:21 +00:00
89f1df033a Fix comment textarea scroll issue in Firefox (#34438) (#34446)
Backport #34438 by @silverwind

In the comment editor, there is a bug in Firefox where the scroll
position unexpectedly moves up, which is annoying. This is not
reproducible in Chrome and Safari. To reproduce here are some steps:

- Go into an editable issue
- Scroll page to bottom
- Focus the textarea and press Return many times, causing the textarea
to get a scrollbar
- Scroll page to bottom again
- Press Return once more
- Page should not scroll up.

This fixes the bug by adding a temporary margin, and I verified it works
in all browsers.

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-05-13 18:39:02 +02:00
38cc7453e2 Merge and tweak markup editor expander CSS (#34409) (#34415)
Backport #34409 by @silverwind

- Merge the CSS for the two expanders (text-expander-element and
tribute.js) into one file
- Fix overflow issues
- Remove min-width
- Various other tweaks like borders, colors, padding, gaps.

text-expander:

<img width="645" alt="Screenshot 2025-05-09 at 02 21 24"
src="https://github.com/user-attachments/assets/33276dc4-38e8-45e1-8216-2a4baa9bc039"
/>

tribute:

<img width="624" alt="Screenshot 2025-05-09 at 02 21 37"
src="https://github.com/user-attachments/assets/91fbcd1a-9bfc-40fd-93f0-a05b4bd4c98d"
/>

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-05-09 18:58:19 +02:00
be1090cb2d Grey out expired artifact on Artifacts list (#34314) (#34404)
Backport #34314 by @NorthRealm

Grey out expired artifact on Artifacts list.


![1](https://github.com/user-attachments/assets/79c00e39-29f5-4264-b7b2-7ed638ab71c1)

![2](https://github.com/user-attachments/assets/686b745f-d6d7-4921-8e1b-3472ac8b6c17)

Co-authored-by: NorthRealm <155140859+NorthRealm@users.noreply.github.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-05-08 10:56:51 -07:00
6747e3e0eb Fix some dropdown problems on the issue sidebar (#34308) (#34327)
Backport #34308 by wxiaoguang

Also fix #34300

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-05-01 09:24:18 -07:00
533b8b2d3d Fix button alignments (#34276)
Continue with #34206.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2025-04-27 19:39:03 +00:00
a9343896f4 Option to delay conflict checking of old pull requests until page view (#27779)
`[repository.pull-request] DELAY_CHECK_FOR_INACTIVE_DAYS` is a new
setting to delay the mergeable check for pull requests that have been
inactive for the specified number of days.

This avoids potentially long delays for big repositories with many pull
requests. and reduces system load overall when there are many
repositories or pull requests.

When viewing the PR, checking will start immediately and the PR merge
box will automatically reload when complete. Accessing the PR through
the API will also start checking immediately.

The default value of `7` provides a balance between system load, and
keeping behavior similar to what it was before both for users and API
access. With `0` all conflict checking will be delayed, while `-1`
always checks immediately to restore the previous behavior.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-04-24 19:26:57 +00:00
e625250ffc Fix various trivial frontend problems (#34263)
1. Fix #20606
2. Fix #34246
3. Fix missing spaces, fix misspells, no visual change.
4. Fix missing "not-mobile", fix #34265

---------

Co-authored-by: silverwind <me@silverwind.io>
2025-04-24 09:11:54 +08:00
c2c04ffff7 Add fullscreen mode as a more efficient operation way to view projects (#34081)
Maybe fix #33482, maybe fix #34015

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-04-23 13:42:22 +08:00
c9aa9068b3 Fix various UI problems (#34243)
Also fix #34242
2025-04-19 08:43:22 +00:00
D
eda6d65818 markup: improve code block readability and isolate copy button (#34009)
Fix #33197

Improve the rendering of code blocks in markdown content 
for better readability and UI stability across screen sizes.

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-04-19 05:53:39 +00:00
aeb7005245 Optimize the calling code of queryElems (#34235) 2025-04-19 08:17:07 +08:00
dd0caf7e16 Fix various misalignments and overflows (#34227)
---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-04-17 10:32:41 +00:00
bde014e46d Fix button alignments and remove unnecessary styles (#34206)
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-04-16 08:14:10 +00:00
dcfa42dd8f Fix: quoted replies incorrectly render user input as part of the quote (#34216)
Updated the quote insertion logic so that it adds one more line break
(`\n`) work like Github. This way, the cursor lands on a new line and
the user's reply is no longer interpreted as part of the quote.

Fixes #34177
2025-04-16 14:32:58 +08:00
2b99a58f54 Mark parent directory as viewed when all files are viewed (#33958)
Fix #25644 

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-04-15 22:35:22 +08:00
33df23c1f0 Update RepoContributors.vue (#34194) 2025-04-14 14:51:49 +00:00
f4196a8843 Optimize overflow-menu (#34183)
Optimized the overflow-menu:
1. Close the tippy when a menu item inside the tippy is clicked.
2. When a menu item inside the tippy is selected, move the active state
of the menu to the tippy's button.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-04-13 01:59:36 +00:00
fa49cd719f feat: Add sorting by exclusive labels (issue priority) (#33206)
Fix #2616

This PR adds a new sort option for exclusive labels.

For exclusive labels, a new property is exposed called "order", while in
the UI options are populated automatically in the `Sort` column (see
screenshot below) for each exclusive label scope.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-04-10 17:18:07 +00:00
02e49a0f47 Fix vertical centering of file tree icons and use entryIcon for submodules/symlinks (#34137)
In the file tree, the icons are not vertically centered, which affects
the overall visual consistency.
Currently, the icons of submodules and symlinks do not adopt the value
of entryIcon, resulting in inconsistent icon display.

before:
![3000-gogitea-gitea-y4ulxr46c4k ws-us118 gitpod io_test_test
gitea_src_branch_main_README md
(3)](https://github.com/user-attachments/assets/d521b89f-909a-43f9-8f39-787b0243b159)

after:
![3000-gogitea-gitea-y4ulxr46c4k ws-us118 gitpod io_test_test
gitea_src_branch_main_README md
(2)](https://github.com/user-attachments/assets/4866807f-c890-4709-b595-7086011e5231)

---------

Co-authored-by: silverwind <me@silverwind.io>
2025-04-09 18:10:16 -07:00
8c9d2bdee3 Keep file tree view icons consistent with icon theme (#33921)
Fix #33914

before:
![3000-gogitea-gitea-y4ulxr46c4k ws-us118 gitpod io_test_test
gitea_src_branch_main_
gitmodules](https://github.com/user-attachments/assets/ca50eeff-cc44-4041-b01f-c0c5bdd3b6aa)

after:
![3000-gogitea-gitea-y4ulxr46c4k ws-us118 gitpod io_test_test
gitea_src_branch_main_README
md](https://github.com/user-attachments/assets/3b87fdbd-81d0-4831-8a74-4dbfcd5b6d91)

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-04-06 19:35:08 +00:00
a62ed19da6 Use overflow-wrap: anywhere to replace word-break: break-all (#34126) 2025-04-06 17:13:02 +08:00
e1c2d05bde Fix markdown render behaviors (#34122)
* Fix #27645
* Add config options `MATH_CODE_BLOCK_DETECTION`, problematic syntaxes
are disabled by default
* Fix #33639
    * Add config options `RENDER_OPTIONS_*`, old behaviors are kept
2025-04-05 11:56:48 +08:00
ee6929d96b Refactor dropdown ellipsis (#34123)
Remove legacy `truncated-item-container` and `truncated-item-name`.
2025-04-05 03:21:11 +00:00
86c1a33369 Fix some UI bugs and clean up unused tests (#34088)
1. Make the material icon falls back to basic theme correctly
2. Remove `TestAttributeReader`, the problem has been resolved.
3. Fix `toggleElem` bug and add tests
2025-04-01 07:02:30 +00:00
741b53eb30 [Fix] Resolve the problem of commit_statuses not being loaded at the top - right when switching files from the file tree (#34079)
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-03-31 18:39:08 +00:00
2a9c5c9e3d Add toggleClass function in dom.ts (#34063)
This PR adds a toggleClass function in dom.ts, aiming to implement DOM
class toggling functionality.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-03-30 14:19:54 +08:00
053592d847 fix org repo creation being limited by user limits (#34030)
fixes an issue where user is unable to create new repository in
organization via UI if repository limits are in place and user has
exhausted them for their own namespace.

closes: https://github.com/go-gitea/gitea/issues/15504

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-03-27 13:16:17 +00:00
c7b85f7070 Fix dropdown module accessing (#34026)
Follow #34014.
2025-03-26 16:01:43 +00:00
d70be9d0fe Polyfill WeakRef (#34025)
Fix #33407
2025-03-26 23:56:25 +08:00
d28a7f9fea Fix dropdown delegating and some UI problems (#34014)
The old logic is incomplete. See the comment for the improved logic.

Fix #34011

And more fixes:

1. use empty "alt" for images, otherwise the width is not right when the
image fails to load
2. remove the "dropdown icon" patch, because it has been clearly done in
"dropdown.js" now
3. remove the "dropdown filtered item" patch, added a clear callback,
and improve the logic
4. fix global init when a node is removed and added back gain (eg: the
"cherry pick" dialog with a dropdown)
2025-03-26 02:51:22 +00:00
51d86adb6d Fix some migration and repo name problems (#33986)
1. Ignore empty inputs in `UnmarshalHandleDoubleEncode`
2. Ignore non-existing `stateEvent.User` in gitlab migration
3. Enable `release` and `wiki` units when they are selected in migration
4. Sanitize repo name for migration and new repo
2025-03-24 20:26:58 -07:00
e25f860735 Fix "toAbsoluteLocaleDate" test when system locale is not en-US (#33939) 2025-03-19 19:49:05 +08:00
01c8f092a0 Simplify secure context check (#33906)
As discussed in
https://github.com/go-gitea/gitea/pull/33820/files#r1997532169.
2025-03-16 19:05:26 +08:00
52663113d4 Update JS and PY deps, misc tweaks (#33903)
- Update all updateable dependencies
- Add a few more unupgradable ones to updates blocklist
- Adapt to breaking changes
- Update to typescript 5.8, enable `erasableSyntaxOnly` which
necessitated a change because of forbidden syntax
- Misc cleanups
- Tested htmx, easymde, swagger, chart.js
2025-03-16 10:04:18 +01:00
92f997ce6b Add file tree to file view page (#32721)
Resolve #29328

This pull request introduces a file tree on the left side when reviewing
files of a repository.

---------

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-03-15 16:26:49 +08:00
91610a987e Fix various Fomantic UI and htmx problems (#33851)
Also fix #31328, fix #33854
2025-03-11 11:35:05 -07:00
608ccc32e5 Drop fomantic build (#33845)
We would never update or build fomantic again, we have forked it as a
private library long time ago.

So just put the JS and CSS files in "fomantic/build" into git. And use
"import" to use them.

Remove "form.js", rewrite "tab" component.

All source code is from official Fomantic UI build. Will apply patches
in separate PRs.
2025-03-11 12:44:52 +08:00
b8c2afdc5f Do not show passkey on http sites (#33820)
Fix #33615
2025-03-07 19:37:27 +00:00
f0f10413ae Update TypeScript types (#33799)
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-03-05 08:03:44 -08:00
75e85c25c1 Refactor repo-issue.ts (#33784)
And remove jQuery
2025-03-04 17:58:17 +00:00