Yarden Shoham
3b6e57273a
Fix for
attribute not pointing to the ID of the color picker ( #29813 )
...
It didn't include the word picker.
Signed-off-by: Yarden Shoham <git@yardenshoham.com>
2024-03-15 13:12:08 +00:00
coldWater
d08f4360c9
Refactor graceful manager, fix misused WaitGroup ( #29738 )
...
Follow #29629
2024-03-15 10:59:11 +00:00
wxiaoguang
7a6260f889
Improve repo search UI ( #29767 )
...
1. Introduce a special "flex-items-block" for menu items, to align the
dropdown menu items
2. Simplify the "repo search" form
3. Add missing "TopicOnly" search option
Screenshots:
The old UI items don't align:
<details>

</details>
New UI (doesn't change much, but the items align)
<details>


</details>
---------
Co-authored-by: silverwind <me@silverwind.io>
2024-03-15 09:45:30 +00:00
silverwind
0d3ec8e2ad
Use Temporal.PlainDate
for absolute dates ( #29804 )
...
Use the upcoming
[Temporal.PlainDate](https://tc39.es/proposal-temporal/docs/plaindate.html )
via polyfill. If there is any remaining bugs in `<absolute-date>` this
will iron them out. I opted for the lightweight polyfill because both
seem to achieve our goal of localizeable absolute dates.
- With
[`@js-temporal/polyfill`](https://www.npmjs.com/package/@js-temporal/polyfill )
chunk size goes from 81.4 KiB to 274 KiB
- With
[`temporal-polyfill`](https://www.npmjs.com/package/temporal-polyfill )
chunk size goes from 81.4 KiB to 142 KiB
Also see [this
table](https://github.com/fullcalendar/temporal-polyfill?tab=readme-ov-file#comparison-with-js-temporalpolyfill )
for more comparisons of these polyfills. Soon there will be
[treeshakable
API](https://github.com/fullcalendar/temporal-polyfill?tab=readme-ov-file#tree-shakable-api )
as well which will further reduce size.
2024-03-15 09:13:01 +00:00
Lunny Xiao
277f90d416
Fix codeowner detected diff base branch to mergebase ( #29783 )
...
Fix #29763
This PR fixes 2 problems with CodeOwner in the pull request.
- Don't use the pull request base branch but merge-base as a diff base to
detect the code owner.
- CodeOwner detection in fork repositories will be disabled because
almost all the fork repositories will not change CODEOWNERS files but it
should not be used on fork repositories' pull requests.
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-03-15 05:13:09 +00:00
silverwind
0827552d9a
Remove scrollbar customizations ( #29800 )
...
Fixes https://github.com/go-gitea/gitea/issues/29652 . Removes all
scrollbar customization as per popular vote on
https://github.com/go-gitea/gitea/issues/29652#issuecomment-1985846162 .
There is one more case of `-webkit-scrollbar` left in CSS and
https://github.com/go-gitea/gitea/pull/29400 will get rid of that as
well.
2024-03-15 04:45:45 +00:00
HEREYUA
2eb7c564df
Improve branch select list ui in go templates ( #29729 )
...
Relate:[#27417 ](https://github.com/go-gitea/gitea/issues/27471 )
Reference: [#26631 ](https://github.com/go-gitea/gitea/pull/26631 )
Before

After

---------
Co-authored-by: silverwind <me@silverwind.io>
2024-03-15 11:43:10 +08:00
silverwind
94512ee062
Fix Citation modal responsiveness and clipboard copy ( #29799 )
...
The modal was broken in two ways:
- On small screens, the input box was partially hanging outside the
modal. Fixed with flexbox and increased modal width.
- The clipboard copy was not working because the modal had both
`data-clipboard-text` and `data-clipboard-target`, while we only support
one of those. Made a small tweak in clipboard as well so that it will
still fall back to target if text is empty.
2024-03-15 02:38:13 +00:00
silverwind
256a1eeb9a
Add <overflow-menu>
, rename webcomponents ( #29400 )
...
1. Add `<overflow-menu>` web component
2. Rename `<gitea-origin-url>` to `<origin-url>` and make filenames
match.
<img width="439" alt="image"
src="https://github.com/go-gitea/gitea/assets/115237/2fbe4ca4-110b-4ad2-8e17-c1e116ccbd74 ">
<img width="444" alt="Screenshot 2024-03-02 at 21 36 52"
src="https://github.com/go-gitea/gitea/assets/115237/aa8f786e-dc8c-4030-b12d-7cfb74bdfd6e ">
<img width="537" alt="Screenshot 2024-03-03 at 03 05 06"
src="https://github.com/go-gitea/gitea/assets/115237/fddd50aa-adf1-4b4b-bd7f-caf30c7b2245 ">


TODO:
- [x] Check if removal of `requestAnimationFrame` is possible to avoid
flash of content. Likely needs a `MutationObserver`.
- [x] Hide tippy when button is removed from DOM.
- [x] ~~Implement right-aligned items
(https://github.com/go-gitea/gitea/pull/28976 )~~. Not going to do it.
- [x] Clean up CSS so base element has no background and add background
via tailwind instead.
- [x] Use it for org and user page.
---------
Co-authored-by: Giteabot <teabot@gitea.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-03-15 02:05:31 +00:00
silverwind
4a377c0336
Update JS dependences ( #29797 )
...
Update all non-excluded JS deps, tested monaco, swagger and mermaid.
2024-03-14 23:33:06 +00:00
Denys Konovalov
e0b002a4a8
Unify search boxes ( #29530 )
...
Unify all but a few search boxes to use uniform style, uniform
translations and shared templates where possible.
Remove a few duplicated search templates, e. g. code search.
<details><summary>Example after screenshots:</summary>




</details>
Also includes #29700
Co-authored-by: 6543 <6543@obermui.de>
---------
Co-authored-by: 6543 <m.huber@kithara.com>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Giteabot <teabot@gitea.io>
2024-03-14 23:24:59 +00:00
Daniel YC Lin
607ed27b4f
Fix document error about 'make trans-copy' ( #29710 )
...
Change document to 'make docs'
---------
Co-authored-by: techknowlogick <techknowlogick@gitea.com>
2024-03-14 22:54:11 +00:00
Yarden Shoham
70e077036f
Remove jQuery AJAX from the diff functions ( #29743 )
...
- Removed all jQuery AJAX calls and replaced with our fetch wrapper
- Tested the review conversation comment, resolve, unresolve, show more
files, and load diff functionality and it works as before
# Demo using `fetch` instead of jQuery AJAX

---------
Signed-off-by: Yarden Shoham <git@yardenshoham.com>
Co-authored-by: silverwind <me@silverwind.io>
2024-03-14 22:21:14 +00:00
silverwind
35def319fd
Fix Safari spinner rendering ( #29801 )
...
Fixes: https://github.com/go-gitea/gitea/issues/29041
Fixes: https://github.com/go-gitea/gitea/pull/29713
Any of the `width: *-content` properties seem to workaround this Webkit
bug, this one seemed most suitable.
2024-03-14 22:04:33 +00:00
Yarden Shoham
0679e60c77
Remove jQuery AJAX from the repo-issue.js
file ( #29776 )
...
Removed all jQuery AJAX calls and replaced with our fetch wrapper.
Tested the following functionalities and they work as before:
- due-date update
- comment deletion
- branch update by merge or rebase
- allow edits from maintainers button
- reviewer addition or deletion
- WIP toggle button
- new diff code comment button
- issue title edit button
# Demo using `fetch` instead of jQuery AJAX
## Updating the due-date of an issue

## Deleting a comment

## Updating a branch in a pull request

## Checking and unchecking the "Allow edits from maintainers" checkbox

## Requesting review and removing review request

## Toggling the WIP status of a pull request

## Clicking the new code comment button on the diff page

## Editing the issue title and target branch

---------
Signed-off-by: Yarden Shoham <git@yardenshoham.com>
Co-authored-by: silverwind <me@silverwind.io>
2024-03-14 21:36:17 +00:00
yp05327
ce085b26fc
Improve commit record's ui in comment list ( #26619 )
...
Before:


After:


---------
Co-authored-by: silverwind <me@silverwind.io>
2024-03-14 19:01:16 +00:00
Rafael Heard
03753cbc0f
enable tailwind nesting ( #29746 )
...
Currently, if you implement native CSS nesting within a Vue component a
warning will appear in the terminal. It states
`Nested CSS was detected, but CSS nesting has not been configured
correctly.
Please enable a CSS nesting plugin *before* Tailwind in your
configuration.` To fix this error we need to enable the built-in
[tailwinds nesting
config](https://tailwindcss.com/docs/using-with-preprocessors#nesting ).
Example code to trigger the warning within a vue component:
```CSS
<style>
.example {
&:hover,
&:focus-visible {
color: var(--color-text);
}
& svg {
margin-right: 0.78rem;
}
}
</style>
```
---------
Co-authored-by: rafh <rafaelheard@gmail.com>
Co-authored-by: silverwind <me@silverwind.io>
2024-03-14 19:20:54 +01:00
Jason Song
487ac9bf6c
Support GITEA_I_AM_BEING_UNSAFE_RUNNING_AS_ROOT env ( #29788 )
...
It is convenient to skip by setting environment, since it's OK
to use root user in job containers.
It's not a bug, but I want to backport it to v1.21 since it doesn't
break anything.
---------
Co-authored-by: Giteabot <teabot@gitea.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-03-14 16:44:49 +08:00
Lunny Xiao
8d979f1692
Fix missing translation on milestons ( #29785 )
...
Caused by #26569
Fix #29778
2024-03-14 07:40:52 +00:00
sillyguodong
2033eb7c11
Fix lint-swagger warning ( #29787 )
...
Caused by: #23106
Fix:
https://github.com/go-gitea/gitea/actions/runs/8274650046/job/22640335697
1. Delete `UserBadgeList` in `options.go`, because it wasn't used. (The
struct defined in `options.go` is the struct used to parse the request
body)
2. Move `BadgeList` struct under `routers/api/v1/swagger` folder which
response should be defined in.
2024-03-14 04:59:52 +00:00
silverwind
eb8c34fc36
Tweak actions view sticky ( #29781 )
...
Add some space when the left side items are sticky due to scrolling the
right side.
<img width="419" alt="image"
src="https://github.com/go-gitea/gitea/assets/115237/292e1b03-a071-4744-bb79-e50d109056c8 ">
2024-03-14 04:30:10 +00:00
Denys Konovalov
7a90e5954f
add skip ci support for pull request title ( #29774 )
...
Extends #28075 to support [skip ci] inside PR titles.
Close #29265
2024-03-14 03:18:04 +00:00
coldWater
e79a807a84
Refactor markup/csv: don't read all to memory ( #29760 )
2024-03-14 02:51:55 +00:00
silverwind
bbef5fc5c3
Fix make generate-swagger
in go 1.22 ( #29780 )
...
Fixes: https://github.com/go-gitea/gitea/issues/29664 . No release
available for https://github.com/go-swagger/go-swagger/issues/3070 so
let's depend on latest commit hash. Output is the same as before for me.
2024-03-14 02:23:58 +00:00
yp05327
2da13675c0
Fix incorrect menu/link on webhook edit page ( #29709 )
...
Fix #29699
---------
Co-authored-by: silverwind <me@silverwind.io>
2024-03-14 01:37:15 +00:00
wxiaoguang
43de021ac1
Add test for webhook ( #29755 )
...
Follow #29690
2024-03-14 01:10:51 +00:00
Lunny Xiao
83ba882bab
Fix possible NPE in ToPullReviewList ( #29759 )
...
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-03-13 19:46:15 +00:00
6543
712e19fa6f
fix missed RenderLabel change in card template ( #29772 )
...
regression of #29680
close #29770
PS: it would be nice to have a linter that is able to check template
helpers ...
2024-03-13 18:00:38 +00:00
wxiaoguang
df60dbfb99
Fix incorrect locale Tr for gpg command ( #29754 )
2024-03-13 16:24:34 +00:00
wxiaoguang
e01b0014de
Improve a11y document and dropdown item ( #29753 )
...
Co-authored-by: silverwind <me@silverwind.io>
2024-03-13 13:44:46 +00:00
wxiaoguang
3e94ac5c7c
Improve QueryEscape helper function ( #29768 )
...
Make it return "template.URL" to follow Golang template's context
auto-escaping.
2024-03-13 21:32:30 +08:00
KN4CK3R
85c59d6c21
Use relative links for commits, mentions, and issues in markdown ( #29427 )
...
Fixes #29404
Use relative links for
- commits
- mentions
- issues
---------
Co-authored-by: silverwind <me@silverwind.io>
2024-03-13 10:34:58 +00:00
Lunny Xiao
66edc888ee
Move fork router functions to a standalone file ( #29756 )
...
To reduce the pull.go file's size.
2024-03-13 10:07:53 +00:00
silverwind
9b1a8888fa
Configure pinned JS dependencies via updates.config.js ( #29696 )
...
Split out from https://github.com/go-gitea/gitea/pull/29684 . This
configures the [`updates`](https://github.com/silverwind/updates ) module
to exclude these modules for reasons stated in the comments.
2024-03-13 08:43:58 +00:00
6543
7fd0a5b276
Refactor to use optional.Option for issue index search option ( #29739 )
...
Signed-off-by: 6543 <6543@obermui.de>
2024-03-13 08:25:53 +00:00
Lunny Xiao
67e9f0d498
Fix user router possbile panic ( #29751 )
...
regression from #28023
2024-03-13 06:57:30 +00:00
6543
9a93b1816e
Refactor label.IsArchived() ( #29750 )
...
just some missed nits
2024-03-13 07:04:07 +01:00
silverwind
857243bed7
Fix date rendering by adding <gitea-absolute-date>
( #29725 )
...
Alternative to: https://github.com/go-gitea/gitea/pull/29698
Fixes: https://github.com/go-gitea/gitea/issues/29034
<img width="278" alt="image"
src="https://github.com/go-gitea/gitea/assets/115237/12ecd967-2723-410d-8a28-a1b0f41b7bba ">
It also fixes a secondary issue that we were showing timestamp tooltips
over date, which makes no sense, so these are now gone as well:
<img width="284" alt="image"
src="https://github.com/go-gitea/gitea/assets/115237/a70432f3-97b6-41e6-b202-b53b76924a66 ">
2024-03-12 22:37:02 +00:00
Denys Konovalov
225fc40528
Update to labeler v5 ( #29721 )
...
Updated to actions/labeler@v5
Updated labeler config accordingly, also improved the config and added
more labels.
---------
Co-authored-by: Giteabot <teabot@gitea.io>
2024-03-12 22:09:02 +00:00
JakobDev
3e7ae79f99
Update Chroma to v2.13.0 ( #29732 )
...
This adds new lexers and includes some fixes. See
https://github.com/alecthomas/chroma/releases/tag/v2.13.0 for the full
changelog.
---------
Co-authored-by: Giteabot <teabot@gitea.io>
2024-03-12 22:40:43 +01:00
6543
36de5b299b
Highlight archived labels ( #29680 )
...
the issue is, that you can not distinguish between normal and archived
labels.
So this will make archived labels 80% **grayscale**. And prepend
"Archived: " to the tooltip info




---
*Sponsored by Kithara Software GmbH*
---------
Co-authored-by: delvh <dev.lh@web.de>
2024-03-12 17:32:05 +00:00
Lunny Xiao
e5e2b2fcd7
Add more stats tables ( #29730 )
...
Add `Tags`, `Branches` and `CommitStatus` to monitor/stats
2024-03-12 11:21:09 +00:00
Lunny Xiao
171d3d9a3c
Use Get but not Post to get actions artifacts ( #29734 )
2024-03-12 11:53:53 +01:00
Lunny Xiao
d8bd6f34f0
Do some performance optimize for issues list and view issue/pull ( #29515 )
...
This PR do some performance optimzations.
- [x] Add `index` for the column `comment_id` of `Attachment` table to
accelerate query from the database.
- [x] Remove unnecessary database queries when viewing issues. Before
some conditions which id = 0 will be sent to the database
- [x] Remove duplicated load posters
- [x] Batch loading attachements, isread of comments on viewing issue
---------
Co-authored-by: Zettat123 <zettat123@gmail.com>
2024-03-12 07:23:44 +00:00
Lunny Xiao
aed3b53abd
Some performance optimization on dashboard and issues page ( #29010 )
...
This PR do some loading speed optimization for feeds user interface
pages.
- Load action users batchly but not one by one.
- Load action repositories batchly but not one by one.
- Load action's Repo Owners batchly but not one by one.
- Load action's possible issues batchly but not one by one.
- Load action's possible comments batchly but not one by one.
2024-03-12 04:57:19 +00:00
Yarden Shoham
75a9f61f89
Remove jQuery AJAX from the issue branch reference selection ( #29722 )
...
- Replaced a single jQuery AJAX instance with our fetch wrapper
- Tested the issue branch reference selection and it works as before
# Demo using `fetch` instead of jQuery AJAX

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
2024-03-12 04:29:51 +00:00
Lunny Xiao
e84e5db6de
Lazy load object format with command line and don't do it in OpenRepository ( #29712 )
...
Most time, when invoking `git.OpenRepository`, `objectFormat` will not
be used, so it's a waste to invoke commandline to get the object format.
This PR make it a lazy operation, only invoke that when necessary.
2024-03-12 04:21:27 +00:00
pengqiseven
7f856d5d74
remove repetitive words ( #29695 )
...
Signed-off-by: pengqiseven <912170095@qq.com>
2024-03-11 09:24:23 +00:00
Jason Song
e6d141182f
Sync branches first ( #29714 )
...
Follow #29493 .
Sync branches to DB first, then trigger push events.
2024-03-11 06:42:50 +00:00
Zettat123
4129e0e79b
Add a warning for disallowed email domains ( #29658 )
...
Resolve #29660
Follow #29522 and #29609
Add a warning for disallowed email domains when admins manually add/edit
users.
Thanks @yp05327 for the
[comment](https://github.com/go-gitea/gitea/pull/29605#issuecomment-1980105119 )

2024-03-11 06:07:36 +00:00