silverwind
33fb710bbf
Merge branch 'main' into enhancement/show-blocking-in-issue-list
2024-03-09 18:55:35 +01:00
silverwind
9bf693d98d
Suppress error from monaco-editor ( #29684 )
...
Fixes: https://github.com/go-gitea/gitea/issues/29414
I see no way for us to catch this error, so downgrade it until
https://github.com/microsoft/monaco-editor/issues/4325 is fixed, which
will likely take a few weeks to propagate up from vscode.
The entries in `updates.config.js` will make
[`updates`](https://github.com/silverwind/updates ) not upgrade these
anymore and I think it's good documentation as well to have the reasons
why we don't upgrade these dependencies.
2024-03-09 18:37:29 +01:00
Chongyi Zheng
a192a5ed99
Fix action runner offline label padding ( #29691 )
...
Before:
The `offline` padding is `calc(.833em - 1px)` from `basic` CSS class,
but `idle` padding is `6px`.
<img width="1035" alt="image"
src="https://github.com/go-gitea/gitea/assets/37034805/ccb42615-20d7-4032-a805-40cd9643012d ">
After:
<img width="1035" alt="image"
src="https://github.com/go-gitea/gitea/assets/37034805/d6af99c8-76cb-4850-96d6-5289b06e1ca8 ">
2024-03-09 13:13:08 +00:00
silverwind
6ea1c67ead
Update allowed attachment types ( #29688 )
...
Update to match GitHub's latest.
Co-authored-by: Giteabot <teabot@gitea.io>
2024-03-09 12:41:32 +00:00
silverwind
9b69f76e5a
Completely style the webkit autofill ( #29683 )
...
Previously it was only partially styled, e.g. there was black text on
white background even in dark theme caused by fomantic styles.
<img width="195" alt="image"
src="https://github.com/go-gitea/gitea/assets/115237/bc5cf516-2aef-45c3-854a-c9f5497aacca ">
<img width="195" alt="Screenshot 2024-03-09 at 02 09 29"
src="https://github.com/go-gitea/gitea/assets/115237/ef0af17d-6e0b-402e-b24d-bfa34dc2f4e0 ">
Co-authored-by: Giteabot <teabot@gitea.io>
2024-03-09 12:14:42 +00:00
silverwind
1695a5ac74
Include go files in tailwind processing ( #29686 )
...
We need to scan `.go` files for tailwind classes. Does not seem to
affect build time much luckily.
Fixes:
https://github.com/go-gitea/gitea/pull/29678#discussion_r1518448600
Verified via `rg tw-object-contain public/assets/css/index.css`.
---------
Co-authored-by: Giteabot <teabot@gitea.io>
2024-03-09 13:09:22 +01:00
Yarden Shoham
1dc7f53386
Fix WebHookEditor regression from jQuery removal ( #29692 )
...
Make these calls optional
---------
Signed-off-by: Yarden Shoham <git@yardenshoham.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-03-09 19:59:16 +08:00
6543
7fdc048153
Patch in exact search for meilisearch ( #29671 )
...
meilisearch does not have an search option to contorl fuzzynes per query
right now:
- https://github.com/meilisearch/meilisearch/issues/1192
- https://github.com/orgs/meilisearch/discussions/377
- https://github.com/meilisearch/meilisearch/discussions/1096
so we have to create a workaround by post-filter the search result in
gitea until this is addressed.
For future works I added an option in backend only atm, to enable
fuzzynes for issue indexer too.
And also refactored the code so the fuzzy option is equal in logic to
code indexer
---
*Sponsored by Kithara Software GmbH*
2024-03-09 01:39:27 +00:00
silverwind
baeb251174
Use more specific selector for name
links ( #29679 )
...
Followup https://github.com/go-gitea/gitea/pull/29305 . As per discussion
in https://github.com/go-gitea/gitea/pull/29666#discussion_r1517506422 ,
make this selector only search in the current `.markup` document, as
there can be multiples displayed at the same time.
@DanielMatiasCarvalho maybe you can review.
2024-03-08 23:21:45 +00:00
silverwind
82e102f8b0
Replace more gt- with tw- ( #29678 )
...
This will conclude the trivial class replacements.
2024-03-08 22:02:05 +01:00
charles
0c273f12e0
Fix commit_status problem when testing ( #29672 )
...
Close #29661
fix #29656
Co-authored-by: Giteabot <teabot@gitea.io>
2024-03-08 16:43:48 +01:00
silverwind
a3cfe6f39b
Support pasting URLs over markdown text ( #29566 )
...
Support pasting URLs over selection text in the textarea editor. Does
not work in EasyMDE and I don't intend to support it. Image paste works
as usual in both Textarea and EasyMDE.
The new `replaceTextareaSelection` function changes textarea content via
[`insertText`](https://developer.mozilla.org/en-US/docs/Web/API/Document/execCommand#using_inserttext )
command, which preserves history, e.g. `CTRL-Z` works and is also
demostrated below. We should later refactor the image paste code to use
the same function because it currently destroys history.
Overriding the formatting via `Shift` key is supported as well, e.g.
`Ctrl+Shift+V` will insert the URL as-is, like on GitHub.
![urlpaste](https://github.com/go-gitea/gitea/assets/115237/522b1023-6797-401c-9e4a-498570adfc88 )
2024-03-08 15:15:58 +00:00
yp05327
b253463e95
bump python version to 3.12 in dev container ( #29670 )
...
![image](https://github.com/go-gitea/gitea/assets/18380374/963dc021-ac9b-4713-8344-654f966c80a4 )
The default version is 3.9.2, which is not supported by poetry.
---------
Co-authored-by: silverwind <me@silverwind.io>
2024-03-08 16:10:01 +01:00
Lunny Xiao
44cd71879d
Fix swagger
2024-03-08 19:23:33 +08:00
Tim-Niclas Oelschläger
611cccb471
added index to IssueDependency
2024-03-08 19:17:09 +08:00
Tim-Niclas Oelschläger
40c3343016
remove join
2024-03-08 19:15:35 +08:00
Tim-Niclas Oelschläger
899f5adf5e
chore: typo fix
2024-03-08 19:15:34 +08:00
Tim-Niclas Oelschläger
86b10061f4
remove option from api
2024-03-08 19:15:33 +08:00
Tim-Niclas Oelschläger
2994945eb4
use tailwind
2024-03-08 19:13:53 +08:00
6543
fa199e7e59
move issues to be tested into higher range
2024-03-08 19:13:52 +08:00
Tim-Niclas Oelschläger
c2d67ff088
added test
2024-03-08 19:13:52 +08:00
Tim-Niclas Oelschläger
9e331751ff
add final new line
2024-03-08 19:13:52 +08:00
Tim-Niclas Oelschläger
e0a4164595
render issue-link in go-template
2024-03-08 19:13:50 +08:00
6543
58d7e4f318
Apply suggestions from code review
...
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-03-08 19:12:41 +08:00
Tim-Niclas Oelschläger
f41b8fb9f1
chore: corrected 'retrieve'
2024-03-08 19:12:41 +08:00
Tim-Niclas Oelschläger
c0d5bc43b8
chore: add documentation
2024-03-08 19:12:41 +08:00
Tim-Niclas Oelschläger
c68b79f90d
chore: update swagger
2024-03-08 19:12:39 +08:00
Tim-Niclas Oelschläger
0df1b3766a
enhancement: show dependencies only with enabled setting
2024-03-08 19:10:56 +08:00
Tim-Niclas Oelschläger
f2ae3bdc01
refactor: use xorm builder
2024-03-08 19:10:56 +08:00
Tim-Niclas Oelschläger
eff4d3024c
chore: lint fix
2024-03-08 19:10:55 +08:00
Tim-Niclas Oelschläger
28bca98564
style: better selector for middot
2024-03-08 19:10:55 +08:00
Tim-Niclas Oelschläger
d6acba16e8
style: better popups
2024-03-08 19:10:55 +08:00
Tim-Niclas Oelschläger
d460a5cdc0
performance: better sql
2024-03-08 19:10:55 +08:00
Tim-Niclas Oelschläger
f9726ea8a4
style: middot as divider
2024-03-08 19:10:55 +08:00
Tim-Niclas Oelschläger
20dcbade91
review: Dependencies as template.HTML
2024-03-08 19:10:53 +08:00
Tim-Niclas Oelschläger
5b8d4aa865
enhancement: line-through for closed issues
2024-03-08 19:06:56 +08:00
Tim-Niclas Oelschläger
586a42b640
chore: lint -> double-quotes
2024-03-08 19:06:56 +08:00
Tim-Niclas Oelschläger
67797f5ac0
chore: lowercase
2024-03-08 19:06:56 +08:00
Tim-Niclas Oelschläger
5c35d88110
enhancement: shows divider
2024-03-08 19:06:56 +08:00
Tim-Niclas Oelschläger
ad4d893ad5
refactor: use translations to support rtl
2024-03-08 19:06:55 +08:00
Tim-Niclas Oelschläger
2b39981064
chore: resolve lint errors
2024-03-08 19:06:55 +08:00
Tim-Niclas Oelschläger
925ac870dc
refactor: extract to subtemplate
2024-03-08 19:06:55 +08:00
Tim-Niclas Oelschläger
aa061b409f
enhancement: Show blocked_by and blocking in issue-list-view
2024-03-08 19:06:55 +08:00
Lunny Xiao
930bae2300
Add cache for branch divergence on branch list page ( #29577 )
...
The branch page for blender project will take 6s because calculating
divergence is very slow.
This PR will add a cache for the branch divergence calculation. So when
the second visit the branch list, it will take only less 200ms.
2024-03-08 10:21:24 +00:00
DC
f219ea8d0e
Fix user-defined markup links targets ( #29305 )
...
This seeks to fix the bug reported on issue #29196 .
Cause:
ID's with custom characters (- , _ , etc.), were not linking correctly
in the Markdown file when rendered in the browser because the ID in the
respective destinies would be different than the one in anchor, while
for IDs with only letters, the ID would be the same.
Fix:
It was suggested that to fix this bug, it should more or less like
GitHub does it. While in gitea the anchors would be put in HTML like
this:
```
<p dir="auto"><a href="#user-content-_toc152597800" rel="nofollow">Review</a></p>
<p dir="auto"><a href="#user-content-_toc152597802" rel="nofollow">Staging</a></p>
<p dir="auto"><a href="#user-content-_toc152597803" rel="nofollow">Development</a></p>
<p dir="auto"><a href="#user-content-_toc152597828" rel="nofollow">Testing</a></p>
<p dir="auto"><a href="#user-content-_toc152597829" rel="nofollow">Unit-tests</a></p>
```
In GitHub, the same anchor's href properties would be the same without
"user-content-" trailing behind.
So my code made sure to change those anchors, so it would not include
"user-content-" and then add respective Event Listeners so it would
scroll into the supposed places.
Fixes : #29196
---------
Co-authored-by: silverwind <me@silverwind.io>
2024-03-08 09:53:01 +00:00
silverwind
886e90aa82
Don't show AbortErrors on logout ( #29639 )
...
When logging out of Gitea, a error toast can be seen for a split second.
I don't know why or how it happens but I found it it's an `AbortError`
(related to
[AbortController#abort](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort )),
so let's hide it.
2024-03-08 09:47:32 +00:00
silverwind
114bb505a3
Style fomantic grey labels ( #29458 )
...
Fomantic grey labels in the dashboard repo lists were showing original
fomantic colors, fixed that. Also slightly tweaked the light theme
colors so it uses same opacity values as dark theme.
<img width="165" alt="Screenshot 2024-03-07 at 21 06 23"
src="https://github.com/go-gitea/gitea/assets/115237/72744d6f-2ee1-4e5d-8ba0-b482a446f535 ">
<img width="167" alt="Screenshot 2024-03-07 at 21 06 00"
src="https://github.com/go-gitea/gitea/assets/115237/1ba93775-e5a9-4b28-b90f-59c1e9199687 ">
2024-03-08 09:42:12 +00:00
Yarden Shoham
b5c418f271
Don't use <br />
in alert block ( #29650 )
...
- Follows https://github.com/go-gitea/gitea/pull/29121
When I implemented alert blocks I was always testing the markdown in
issue comments. I used `<br />` for line breaks and it looked good. I
have since learned that the markdown on README files doesn't allow these
tags. So a comment with
```md
> [!NOTE]
> If you're interested in using our APIs, we have experimental support with [documentation](https://try.gitea.io/api/swagger ).
```
looked like this in a comment
![image](https://github.com/go-gitea/gitea/assets/20454870/96b1de01-2c87-4d4f-83dd-98192b83e9d0 )
but looked like this in a README
![image](https://github.com/go-gitea/gitea/assets/20454870/474b636d-dd7a-4b7f-ba27-643803c71aa3 )
So I changed how we render the alert block by having the alert itself
have a dedicated paragraph, so line breaks happen naturally between
paragraphs.
# Before
![image](https://github.com/go-gitea/gitea/assets/20454870/474b636d-dd7a-4b7f-ba27-643803c71aa3 )
![image](https://github.com/go-gitea/gitea/assets/20454870/167a8d37-9a44-4479-9340-5dc80347b595 )
# After
![image](https://github.com/go-gitea/gitea/assets/20454870/2f99fec0-98ff-4ba8-97fe-b4567041ae79 )
![image](https://github.com/go-gitea/gitea/assets/20454870/ffdeae11-fb06-4d00-b497-eae135f0d7ad )
---------
Signed-off-by: Yarden Shoham <git@yardenshoham.com>
Co-authored-by: silverwind <me@silverwind.io>
2024-03-08 09:30:41 +00:00
yp05327
9dc8a6336e
Fix incorrect rendering csv file when file size is larger than UI.CSV.MaxFileSize ( #29653 )
...
Fix #29506
2024-03-08 08:44:50 +00:00
silverwind
f86e9a0367
Set user's 24h preference from their current OS locale ( #29651 )
...
Fixes: https://github.com/go-gitea/gitea/issues/28371
Fixed by using a JS solution that formats according to `lang`, but alters the 24h format setting as per user's locale. This will work for all tooltips:
<img width="243" alt="Screenshot 2024-03-07 at 23 03 35" src="https://github.com/go-gitea/gitea/assets/115237/6d16c71c-6786-4eda-8cdc-50ec68ba62c6 ">
<img width="250" alt="Screenshot 2024-03-07 at 23 03 17" src="https://github.com/go-gitea/gitea/assets/115237/4e26bbb7-12df-4b81-bd37-14705e87e8f7 ">
<img width="310" alt="Screenshot 2024-03-07 at 23 14 34" src="https://github.com/go-gitea/gitea/assets/115237/1ef599f0-6401-4e19-b1da-59cdfc09b0f6 ">
I think there is only one other place in the UI where we render such absolute dates, which is in the actions view and which I've also fixed:
<img width="275" alt="Screenshot 2024-03-07 at 23 04 00" src="https://github.com/go-gitea/gitea/assets/115237/df0fbe1f-96ee-4338-ab5e-2b10e215005d ">
2024-03-08 16:07:56 +08:00