Commit graph

18058 commits

Author SHA1 Message Date
Earl Warren 012ed7019a Merge pull request '[port] Move all login and account creation page labels to be above inputs (gitea#29432)' (#2742) from algernon/forgejo:gitea/port/29432/move-some-labels-above-inputs into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2742
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-03-23 13:56:18 +00:00
Earl Warren a631e5c249 Merge pull request 'Don't use <br /> in alert block (#29650)' (#2741) from algernon/forgejo:gitea/port/29650-dont-use-br-in-alert-block into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2741
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-03-23 13:46:40 +00:00
Earl Warren 1a1e1604d5 Merge pull request 'Replace "configurable clone methods" with Gitea's more flexible implementation' (#2740) from algernon/forgejo:gitea/port/repo-open-with into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2740
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-03-23 13:44:42 +00:00
Rafael Heard 3acea02eb6
Move all login and account creation page labels to be above inputs (#29432)
There are a few inconsistencies within Gitea and this PR addresses one
of them. This PR updates the sign-in page layout, including the register
and openID tabs, to match the layout of the settings pages
(/user/settings) for more consistency.

This PR updates the following routes:
`/user/login`
`/user/sign_up`
`/user/login/openid`
`/user/forgot_password`
`/user/link_account`
`/user/recover_account`

**Before**
<img width="968" alt="Screenshot 2024-02-05 at 8 27 24 AM"
src="https://github.com/go-gitea/gitea/assets/6152817/fb0cb517-57c0-4eed-be1d-56f36bd1960d">

**After**
<img width="968" alt="Screenshot 2024-02-05 at 8 26 39 AM"
src="https://github.com/go-gitea/gitea/assets/6152817/428d691d-0a42-4a67-a646-05527f2a7b41">

This PR addresses a revert of the original PR due to this
[comment](https://github.com/go-gitea/gitea/pull/28753#issuecomment-1956596817).

---------

Co-authored-by: rafh <rafaelheard@gmail.com>
2024-03-23 12:36:12 +01:00
Gergely Nagy 1386d3faf7
[DEADCODE] update
Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>
2024-03-23 12:26:14 +01:00
Yarden Shoham 20446ac6b3
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.

![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)

![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-23 12:18:40 +01:00
Gergely Nagy 6c330a85ec
Add tests for the "Open with" repository clone menu
Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>
2024-03-23 11:58:54 +01:00
wxiaoguang eb4061baba
Move citiation button to proper place (#29374)
The citiation button shouldn't be controlled by
DisableDownloadSourceArchives (line 134)

So move it out of that "if" block.

Co-authored-by: Giteabot <teabot@gitea.io>
2024-03-23 11:58:54 +01:00
wxiaoguang 44221a3cd7
Customizable "Open with" applications for repository clone (#29320)
Users could customize the "clone" menu with their own application URLs on the admin panel.

Replace #22378
Close #21121
Close #22149
2024-03-23 11:58:54 +01:00
Gergely Nagy 3123725ff3
Revert "[GITEA] Configurable clone methods"
This reverts commit 1d8bca07f3.
2024-03-23 11:58:54 +01:00
Earl Warren b7ee0b6ad2 Merge pull request '[RELEASE] v1.21.8-0 release notes' (#2722) from earl-warren/forgejo:wip-release-notes-1.21 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2722
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-03-22 13:26:06 +00:00
Earl Warren f68100ceea Merge pull request '[CI] workerqueue attempt to fix flacky test' (#2721) from oliverpool/forgejo:queue_flaky_fix into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2721
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-03-22 09:14:00 +00:00
Earl Warren 1d530ba022
[RELEASE] v1.21.8-0 release notes 2024-03-22 09:02:57 +01:00
oliverpool 5c248adcf1 [CI] workerqueue attempt to fix flacky test 2024-03-22 08:52:16 +01:00
Earl Warren 0aa77d0b9e Merge pull request 'Add plural support for PR subtitles' (#2614) from 0ko/forgejo:prplu into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2614
Reviewed-by: Otto <otto@codeberg.org>
Reviewed-by: oliverpool <oliverpool@noreply.codeberg.org>
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-03-22 06:14:10 +00:00
0ko 60a9df1908
Add test for pull summary 2024-03-22 07:11:52 +01:00
0ko debeedfe42
Add plural support for PR subtitles 2024-03-22 07:11:24 +01:00
Codeberg Translate 489805c322 [I18N] Translations update from Weblate (#2710)
Translations update from [Weblate](https://translate.codeberg.org) for [Forgejo/forgejo](https://translate.codeberg.org/projects/forgejo/forgejo/).

Current translation status:

![Weblate translation status](https://translate.codeberg.org/widget/forgejo/forgejo/horizontal-auto.svg)

Co-authored-by: Fjuro <Fjuro@users.noreply.translate.codeberg.org>
Co-authored-by: Dirk <Dirk@users.noreply.translate.codeberg.org>
Co-authored-by: Wuzzy <Wuzzy@users.noreply.translate.codeberg.org>
Co-authored-by: be4zad <be4zad@users.noreply.translate.codeberg.org>
Co-authored-by: 0ko <0ko@users.noreply.translate.codeberg.org>
Co-authored-by: Mumulhl <mumulhl@duck.com>
Co-authored-by: ormai <ormai@users.noreply.translate.codeberg.org>
Co-authored-by: yeziruo <yeziruo@users.noreply.translate.codeberg.org>
Co-authored-by: earl-warren <earl-warren@users.noreply.translate.codeberg.org>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2710
Co-authored-by: Codeberg Translate <translate@noreply.codeberg.org>
Co-committed-by: Codeberg Translate <translate@noreply.codeberg.org>
2024-03-22 06:02:26 +00:00
Earl Warren 96d2f2b8cd Merge pull request 'Fix repo badges when the label or text contains dashes' (#2711) from algernon/forgejo:badges/dash-encoding into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2711
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-03-21 07:05:34 +00:00
Gergely Nagy 8433f3aa09
Fix repo badges when the label or text contains dashes
shields.io uses dashes to separate parts of the badge it needs to
return. If our label or text parts contain dashes, we need to encode
those for shields.io to recognise what we want it to do, and to have the
correct text on the badge, too.

Fortunately, this is as simple as replacing all dashes with double
dashes in both the label and the text parts. We do not need to do the
same for the color, because that part is not user controlled.

This fixes the badges for cases when a workflow name includes dashes, or
when a release's tag name does.

Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>
2024-03-20 22:41:20 +01:00
Earl Warren 3fb488e80d Merge pull request '[CI] simplify running end-to-end tests while building a release' (#2709) from earl-warren/forgejo:wip-release into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2709
2024-03-20 20:14:52 +00:00
Earl Warren 03aebc4b0f
[CI] simplify running end-to-end tests while building a release 2024-03-20 20:20:42 +01:00
Earl Warren 89f8d33127 Merge pull request '[CI] simplify end-to-end test cascading PR' (#2706) from wip-ci-end-to-end into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2706
2024-03-20 18:12:41 +00:00
Earl Warren a1889ac348
[CI] simplify end-to-end test cascading PR
Closes: https://codeberg.org/forgejo/forgejo/issues/2670
2024-03-20 18:16:56 +01:00
Earl Warren 6d340bcfea Merge pull request 'Update look of repo/org tabs on homepage' (#2593) from 0ko/forgejo:hometab into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2593
Reviewed-by: Otto <otto@codeberg.org>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-03-20 11:45:17 +00:00
Earl Warren d4f067c6f9 Merge pull request '[CI] attempt to fix flacky test' (#2704) from oliverpool/forgejo:workerqueue_flaky_test into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2704
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-03-20 11:38:54 +00:00
Earl Warren 84f33ead4e Merge pull request '[BUG] Reflect Cargo index state in settings' (#2698) from gusted/forgejo-cargo-index into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2698
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-03-20 11:38:26 +00:00
Earl Warren 468b879fe8 Merge pull request '[PORT] add skip ci support for pull request title (#29774)' (#2701) from earl-warren/forgejo:wip-gitea-skip-ci into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2701
Reviewed-by: oliverpool <oliverpool@noreply.codeberg.org>
2024-03-20 11:34:49 +00:00
oliverpool 9b3bfd0585 [CI] attempt to fix flacky test 2024-03-20 11:06:44 +01:00
Gusted b06110715c Merge pull request 'Accessibility: Label Stars/Forks links in repo explore' (#2634) from fnetx/explore-label into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2634
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-03-20 08:20:32 +00:00
Gusted 461f925554
[BUG] Reflect Cargo index state in settings
- Currently in the Cargo section of the packages setting menu two
buttons are always shown, "Initalize index" and "Rebuild index", however
only of these should be shown depending on the state of the index, if
there's no index the "Initalize index" button should be shown and if
there's an index the "Rebuild index" button should be shown. This patch
does exactly that.
- Resolves #2628
2024-03-20 09:17:49 +01:00
Earl Warren 2f78daa3af Merge pull request '[gitea] week 12 cherry-pick' (#2679) from algernon/forgejo:wcp/week-12 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2679
Reviewed-by: Otto <otto@codeberg.org>
Reviewed-by: oliverpool <oliverpool@noreply.codeberg.org>
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-03-20 08:15:06 +00:00
Earl Warren dd884cde6c Merge pull request 'Plurals and translations for heatmap (take 2)' (#2702) from earl-warren/forgejo:wip-heatmap-i18n into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2702
2024-03-20 07:54:19 +00:00
Gergely Nagy adbc5d206b
[DEADCODE] update
Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>
2024-03-20 08:46:30 +01:00
silverwind f2fc2dcfc9
Load citation JS only when needed (#29855)
Previously, the citation js would load every time when opening a citable
repo. Now it only loads when the user clicks the button for it. The
loading state is representend with a spinner on the button:

<img width="83" alt="Screenshot 2024-03-17 at 00 25 13"
src="https://github.com/go-gitea/gitea/assets/115237/29649089-13f3-4974-ab81-e12c0f8e651f">

Diff ist best viewed with whitespace hidden.

---------

Co-authored-by: Giteabot <teabot@gitea.io>
(cherry picked from commit 4b1c88628a6856e533ff10d346ca5bd73ce952b3)
2024-03-20 08:46:30 +01:00
silverwind f4ed953b1b
Fix semantic.json (#29860)
Followup https://github.com/go-gitea/gitea/pull/29856

(cherry picked from commit c20b56815d4f27ffd1b457ec238e494adc5fba81)
2024-03-20 08:46:30 +01:00
norohind d74f74a025
Fix PR creation via api between branches of same repo with head field namespaced (#26986)
Fix #20175

Current implementation of API does not allow creating pull requests
between branches of the same
repo when you specify *namespace* (owner of the repo) in `head` field in
http request body.

---

Although GitHub implementation of API allows performing such action and
since Gitea targeting
compatibility with GitHub API I see it as an appropriate change.

I'm proposing a fix to the described problem and test case which covers
this logic.

My use-case just in case:
https://github.com/go-gitea/gitea/issues/20175#issuecomment-1711283022

(cherry picked from commit ed02d1fab85c9b8206c0af84dcfc3792e61609cf)
2024-03-20 08:46:30 +01:00
silverwind cd83e8bce6
Remove fomantic message module (#29856)
Remove this CSS-only module, which gives a nice reduction in CSS size.
Should look exactly like before.

(cherry picked from commit 4e547822f348c2963e0db33135b45d43dfc58df8)
2024-03-20 08:46:30 +01:00
silverwind 547a619744
fix double border and border-radius on empty action steps (#29845)
Before, double border-bottom and incorrect border-radius:

<img width="914" alt="Screenshot 2024-03-16 at 14 46 31"
src="https://github.com/go-gitea/gitea/assets/115237/6ea63c42-754c-420c-a0f5-c889a8507d9f">

After, both fixed:

<img width="917" alt="Screenshot 2024-03-16 at 14 45 59"
src="https://github.com/go-gitea/gitea/assets/115237/9d3f2dba-6b22-441d-8e99-5809d5f1f1c0">

(cherry picked from commit 43aa914b1750add631698a7fd57d76f743b0489b)
2024-03-20 08:46:30 +01:00
silverwind b9ef8b7839
add .suppressed link class (#29847)
Extract from https://github.com/go-gitea/gitea/pull/29344. With this
class it's possible to have links that don't color on hover. It will be
useful for https://github.com/go-gitea/gitea/pull/29429.

(cherry picked from commit ffeaf2d0bd6c99c486aa7869779bb9ceb0aedad6)
2024-03-20 08:46:30 +01:00
Gergely Nagy 4db9cbc29c
Forbid jQuery .prop and fix related issues (#29832) (followup)
Fixes the remaining jQuery `.prop()` uses.

Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>
2024-03-20 08:46:30 +01:00
silverwind 18256b024e
Forbid jQuery .prop and fix related issues (#29832)
The issue checkbox code received a few more cleanups and I specifically
tested it. The other changes are trivial. Also, I checked the cases for
how many elements match the jQuery selection to determine querySelector
vs. querySelectorAll.

---------

Co-authored-by: Giteabot <teabot@gitea.io>
(cherry picked from commit 21fe512aac42c9ce3440b8eaae6b2cb2116a0e50)
2024-03-20 08:46:30 +01:00
Yarden Shoham c1b6182625
Forbid HTML injection using jQuery (#29843)
See
https://github.com/wikimedia/eslint-plugin-no-jquery/blob/master/docs/rules/no-append-html.md

Tested the following components and they work as before:
- notification table
- issue author dropdown
- comment edit box attachments div

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
Co-authored-by: Giteabot <teabot@gitea.io>
(cherry picked from commit f9b4efd42c17d7f75b689142b17575a478fe903c)
2024-03-20 08:46:30 +01:00
6543 9ea9b850da
Meilisearch double quote on "match" query (#29740)
make `nonFuzzyWorkaround` unessesary

cc @Kerollmops

(cherry picked from commit c6e5ec51bd5d2d3ede30b7506e7cc47f18a49ca8)
2024-03-20 08:46:30 +01:00
Yarden Shoham d5f44c2499
Forbid variables containing jQuery collections not having the $ prefix (#29839)
See
https://github.com/wikimedia/eslint-plugin-no-jquery/blob/master/docs/rules/variable-pattern.md

---------

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
Co-authored-by: silverwind <me@silverwind.io>
(cherry picked from commit 3cd64949ae1402a4ff45fba0a27c4acca1c5aead)
2024-03-20 08:46:30 +01:00
Yarden Shoham 96e5d38b55
Forbid jQuery AJAX (#29818)
Please use the fetch wrapper instead, or even better `htmx`.

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
Co-authored-by: 6543 <6543@obermui.de>
(cherry picked from commit 6ead30dbc469803d7e8361b13217e07d87d6f80d)
2024-03-20 08:46:30 +01:00
Yarden Shoham afc27fb2a3
Remove jQuery AJAX from the notifications (#29817)
- Removed 2 jQuery AJAX calls and replaced with our fetch wrapper
- Deleted an AJAX call that wasn't attached to any element since #24989
- Tested the notification count and notification table functionality and
it works as before

# Demo using `fetch` instead of jQuery AJAX

![demo](https://github.com/go-gitea/gitea/assets/20454870/ff862a9a-1c88-41cc-bd01-5a0711dbd6f8)

---------

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
Co-authored-by: silverwind <me@silverwind.io>
(cherry picked from commit 043f55fabfadd765125690052920ba31ebd3817b)
2024-03-20 08:46:30 +01:00
silverwind 23e2ace77d
Light theme color enhancements (#29830)
Same as https://github.com/go-gitea/gitea/pull/29822 but for light
theme. Slight shift towards blue and made the themes match more, like on
header and footer background.

Before
<img width="1342" alt="Screenshot 2024-03-16 at 00 43 03"
src="https://github.com/go-gitea/gitea/assets/115237/b46021a1-241c-446a-b220-ca25cc90f3bf">

After
<img width="1343" alt="Screenshot 2024-03-16 at 00 45 21"
src="https://github.com/go-gitea/gitea/assets/115237/1c898875-a6bb-4bd3-b059-f82e1a145c99">

Before
<img width="1018" alt="Screenshot 2024-03-16 at 00 43 13"
src="https://github.com/go-gitea/gitea/assets/115237/d237ee7d-b4cc-4688-a074-1e96515ac475">

After
<img width="1022" alt="Screenshot 2024-03-16 at 00 43 50"
src="https://github.com/go-gitea/gitea/assets/115237/89b1da77-6bc9-4b38-9688-546e794aadfa">

(cherry picked from commit 68169133a3b0d29fe348ee065088d33f6dd1b087)
2024-03-20 08:46:30 +01:00
Yarden Shoham 24305e4d09
Remove the time-since class (#29826)
It serves no purpose.

---------

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
Co-authored-by: Giteabot <teabot@gitea.io>
(cherry picked from commit 3f1e4896b6d71dc061e23fa2dcac4c1b7d412540)
2024-03-20 08:46:30 +01:00
Yarden Shoham b97b1d03cf
Remove jQuery AJAX from the project page (#29814)
Removed all jQuery AJAX calls and replaced with our fetch wrapper.

Tested the following functionalities and they work as before:
- column creation
- column deletion
- issue movement between columns
- column reordering
- column edit
- default column changing

# Demo using `fetch` instead of jQuery AJAX

![demo](https://github.com/go-gitea/gitea/assets/20454870/99e6898f-baa3-462c-acec-46a910874dbe)

---------

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
(cherry picked from commit 397997093870226dafb70c4a3133f2ebe0fe3e2c)
2024-03-20 08:46:30 +01:00