0
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2025-01-31 18:05:00 -05:00
Commit graph

2082 commits

Author SHA1 Message Date
Otto
aa986ef1a6 fix(ui): prevent overflow of branch selector in commit graph (#6617)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6617
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Reviewed-by: Otto <otto@codeberg.org>
2025-01-20 15:26:49 +00:00
0ko
0379739ac9 Fix mention and emoji expansion & Improve leaving list completion (#6597)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6597
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
2025-01-20 12:51:39 +00:00
Beowulf
3d3ffaf5cb
fix(ui): prevent overflow of branch selector in commit graph 2025-01-19 21:50:12 +01:00
Beowulf
86c8949d9c
Remove DiffFileList component
The benefit / functionality provided by DiffFileList is already (better)
integrated in the header of the files.
If you want an overview, you can collapse all files via the same
overflow menu (where the stats were available).
To reduce the maintenance effort, the DiffFileList component is
therefore removed.
2025-01-19 18:56:18 +01:00
Beowulf
7ea62c5ce4
Leave list/quote expanison with double enter
When editing a list or similar syntax elements, pressing enter starts a
new line with the line introducer (e.g. `- ` for a plain list).
But currently it's uncomfortable when someone wants to leave the list.
Pressing enter again simply adds more and more lines with the prefix.

With this change the list is terminated if enter is pressed on a line
which contains the introducer but nothing else. This behavior is known
from other markdown editors like the on used by GitLab or GitHub.

Additionally I changed the regex for detecting a prefix.
- Why: With the change you can add a single whitespace at the end if you
  want to keep an "empty" line. So if you want to write:
  ```
  - First
  -
  - Third
  ```
  You just need to add a whitespace in the second line to prevent that
  the prefix will be removed.
- Changes in detail:
  - ordered bullet list prefix detection:
    nothing changed
  - todo list and unordered list prefix detection:
    have been split up:
    - todo list: Changed that only 1 to 4 whitespaces can be between the
      list char (`-`,`*`,`+`) and the checkbox (`[ ]`,`[x]`) - Why? If
      more then 4 spaces are between the list char and the checkbox,
      this is no longer detected as a prefix for a todo item based on
      the markdown standard. Due to the amount of spaces it is instead
      parsed as code.
    - unordered list: The prefix now needs to have exactly one space
      after the list char (`-`,`*`,`+`). More spaces will not be taken
      into account for detecting the prefix.
  - quote prefix detection:
    nothing changed

The current e2e-tests where simplified and duplicated tests where
removed. Test cases for the new functionality where added.
2025-01-18 19:00:41 +01:00
Beowulf
276ef10dd5
Prevent prefix continuation if currently a text expander popup is open
This fixes that mentions and emoji autocompletion was broken in e.g. a
list, because the list handling take presidency over the text expansion.
2025-01-18 18:39:53 +01:00
Beowulf
34e1100ae2 fix(ui): reset content of text field for comments when cancelling (#6595)
Currently, the content of the text field is not reset when you cancel editing. This change resets the content of the text field when editing is canceled.

If this is not done and you click on cancel and then on edit again, you can no longer return to the initial content without completely reloading the page.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6595
Reviewed-by: Otto <otto@codeberg.org>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Beowulf <beowulf@beocode.eu>
Co-committed-by: Beowulf <beowulf@beocode.eu>
2025-01-17 20:14:28 +00:00
0ko
30c7a0b947 Make switch larger on touchscreen devices (#6546)
Followup to https://codeberg.org/forgejo/forgejo/pulls/6459.

Usually it's quite hard to have inputs with balanced size that works for both desktop and mobile: it's either too large or too small for one of them. I think this can be a solution for this new element.

I tried it locally, it feels good on a phone. There's likely one downside which is that the switch will still be larger on touch devices even when they're wide, like on tablets. I think it can be resolved separately at some point. It isn't a problem on small devices because usually these elements go on separate rows.

## Preview

This change only affects touch devices.

|Before|After|
|-|-|
|![](/attachments/75311c3f-2e19-4b03-9596-7f78c78f0a70)|![](/attachments/74f987af-57c1-417d-89ed-f96666cb9bad)|

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6546
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Reviewed-by: Otto <otto@codeberg.org>
Co-authored-by: 0ko <0ko@noreply.codeberg.org>
Co-committed-by: 0ko <0ko@noreply.codeberg.org>
2025-01-13 17:28:36 +00:00
0ko
4e6f8dd57a Use redesigned switch on commit graph page (#6545)
[skip ci] no related tests (covered by visual testing only)

Followup to https://codeberg.org/forgejo/forgejo/pulls/5214 and https://codeberg.org/forgejo/forgejo/pulls/6459.

Resolves https://codeberg.org/forgejo/forgejo/issues/2852.

## Preview

|Before|After|
|-|-|
|![](/attachments/c871bcdd-f60c-460f-93d8-33550b409d25)|![](/attachments/e97e63d8-2917-408d-87ce-37ee31dedc93)|

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6545
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Reviewed-by: Otto <otto@codeberg.org>
Co-authored-by: 0ko <0ko@noreply.codeberg.org>
Co-committed-by: 0ko <0ko@noreply.codeberg.org>
2025-01-13 17:20:32 +00:00
0ko
03fe21d020 Use flex for switch items (#6544)
[skip ci] no related tests (covered by visual testing only)

Followup to https://codeberg.org/forgejo/forgejo/pulls/6459.

More specifically, to https://codeberg.org/forgejo/forgejo/pulls/6459#issuecomment-2562521. Thanks, @viceice!

I found a good reason to use `display: flex;` for the switch items: it prevents whitespaces between HTML tags from showing up between the icon and the text.

I was wondering why the new switch is wider, now I noticed why while playing with it. Lack of this additional whitespace looks better and is consistent with most of the UI.

## Preview

|Description|Image|
|-|-|
|The margin that's supposed to be (no whitespace)|![](https://codeberg.org/attachments/c0377eaa-7dec-4ef1-a4d6-70ad67608a8c)|
|Redesigned switch before|![](https://codeberg.org/attachments/d05bb17a-7e5f-4356-9840-2682f5b31f8a)|
|After|![](https://codeberg.org/attachments/b62c9373-395c-47a3-a8aa-b6905a22b11a)|

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6544
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Reviewed-by: Otto <otto@codeberg.org>
Co-authored-by: 0ko <0ko@noreply.codeberg.org>
Co-committed-by: 0ko <0ko@noreply.codeberg.org>
2025-01-13 17:10:43 +00:00
0ko
0858a879e5 Prevent vertical stretching of the switch (#6543)
Followup to https://codeberg.org/forgejo/forgejo/pulls/6459 and https://codeberg.org/forgejo/forgejo/pulls/6542.

There are some edge cases where the UI would try to stretch the switch. Such inputs aren't really supposed to be dynamically stretched like this because it never looks good. So, I added a few rules to prevent this.

## Preview

This is the edge case with an artificially narrow screen.

|Before|After|
|-|-|
|![](/attachments/343d395c-54dd-4d86-a402-0c6b6a06237a)|![](/attachments/26b072a3-4056-4b1a-a08f-e903160609d9)|

No visual changes are expected outside of such edge case.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6543
Reviewed-by: Otto <otto@codeberg.org>
Co-authored-by: 0ko <0ko@noreply.codeberg.org>
Co-committed-by: 0ko <0ko@noreply.codeberg.org>
2025-01-13 08:28:30 +00:00
0ko
333f384bc8 Fix minor misalignment (#6541)
[skip ci] no relevant tests

It's been there for a while. `flex-start` causes all items to stick to one side and be misaligned if they have different heights.

`align-items` isn't actually needed in this area when the goal is centered vertical alignment, however, unsetting it _could_ break items' height. I couldn't make it do that, but to be safe I kept it and only replaced the value.

## Preview

|![](/attachments/5ccf3c2d-c468-4524-84b4-efa3b3d5a60a)|
|-|
|![](/attachments/5ad079e9-5e22-4118-b1cd-492ad51f0371)|

There's no difference when they're broken into two rows, on mobile.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6541
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Reviewed-by: Otto <otto@codeberg.org>
Co-authored-by: 0ko <0ko@noreply.codeberg.org>
Co-committed-by: 0ko <0ko@noreply.codeberg.org>
2025-01-13 08:27:42 +00:00
Renovate Bot
6169090c13 Update dependency happy-dom to v16 (forgejo) (#6454)
Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
2025-01-07 11:38:58 +00:00
Renovate Bot
6449b6c01f Lock file maintenance (forgejo) (#6478)
This PR contains the following updates:

| Update | Change |
|---|---|
| lockFileMaintenance | All locks refreshed |

🔧 This Pull Request updates lock files to use the latest dependency versions.

---

### Configuration

📅 **Schedule**: Branch creation - "* 0-3 * * 1" (UTC), Automerge - "* 0-3 * * *" (UTC).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://github.com/renovatebot/renovate/discussions) if that's undesired.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS45MC4wIiwidXBkYXRlZEluVmVyIjoiMzkuOTAuMCIsInRhcmdldEJyYW5jaCI6ImZvcmdlam8iLCJsYWJlbHMiOlsiZGVwZW5kZW5jeS11cGdyYWRlIiwidGVzdC9ub3QtbmVlZGVkIl19-->

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6478
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
2025-01-06 06:47:42 +00:00
0ko
a23cf58d47 ui: switch redesign (#6459)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6459
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2025-01-05 18:46:47 +00:00
JakobDev
1600255c26
Make new table modal work when editing a issue 2024-12-31 17:24:54 +01:00
Otto
bd7db225e8 Merge pull request 'Fix edit cancel button' (#6421) from JakobDev/forgejo:cancelfix into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6421
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: Otto <otto@codeberg.org>
2024-12-31 02:10:32 +00:00
Otto
ceee649086 Merge pull request 'Fix issue/comment menus' (#6419) from fnetx/issue-view-a11y into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6419
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-12-30 20:28:53 +00:00
JakobDev
29c59c96bd
Fix edit cancel button 2024-12-30 17:33:52 +01:00
Otto Richter
2885ea8da2 Rework user profile settings
Accessibility:

- improved semantic layout
- Fixes unlabelled input for custom pronouns. CC @hazy
- Adds labels to dropdowns.
- Shortens certain texts for less verbose screen reader outputs and
  people with slow reading speed.
- Turned optional username rename helper text with low contrast into
  "normal" help text.

UI/UX:

- Removes section about primary email which is no longer managed in the
  profile section.
- Fixes section about primary email not displaying in user settings when notifications are
  not available.
- Removes primary email display, because it is not actually a form
  element here. (Alternatively, we could display it and link to the
account settings for managing the email)
2024-12-30 16:42:58 +01:00
Otto Richter
c67d63d88a Fix issue/comment menus
Closes https://codeberg.org/forgejo/forgejo/issues/1120

- Adds labels to reaction and context menu.
- Fixes taborder in markdown combobox buttons. They are now only one
  "tab" stop and can be navigated with arrow buttons and in the right
order (previously, it would skip the table button).
- Generates more verbose output for the reactio selectors to provide
  content for users who cannot identify the meaning of these buttons
visually. Explicit aria-labels are now preferred over auto-generated
ones.
2024-12-30 16:06:18 +01:00
Gusted
db7be1a1db Merge pull request 'feat: add synchronization for SSH keys for OpenID Connect' (#6232) from Maks1mS/forgejo:feat/add-oidc-ssh-keys into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6232
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-12-29 22:43:28 +00:00
Otto
b74406d82c Merge pull request 'Cosmetic changes and fixes around repo homepage' (#6401) from 0ko/forgejo:ui-repo-meta-2 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6401
Reviewed-by: Otto <otto@codeberg.org>
2024-12-29 14:46:34 +00:00
0ko
02c34f9908 ui: cosmetic changes and fixes around repo homepage 2024-12-29 18:52:02 +05:00
Otto Richter
471e5b1975 New repo: Clean up and improve CSS
- drop custom layout rules for this page
- move form-related content to form.css
- extend new form CSS to add gap between labels and input fields
2024-12-28 22:31:12 +01:00
Maks1mS
8a3fb4885e Merge branch 'forgejo' into feat/add-oidc-ssh-keys 2024-12-26 14:33:09 +00:00
Earl Warren
1fffd116e5 Merge pull request '[gitea] week 2024-52 cherry pick (gitea/main -> forgejo)' (#6342) from earl-warren/wcp/2024-52 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6342
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-12-24 06:28:36 +00:00
Renovate Bot
2132759889 Lock file maintenance 2024-12-23 02:04:47 +00:00
0ko
4e820ff795 feat(ui): show repo size on mobile (#6344)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6344
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-12-22 17:05:27 +00:00
Shiny Nematoda
ee214cb886 feat: filepath filter for code search (#6143)
Added support for searching content in a specific directory or file.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6143
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Co-authored-by: Shiny Nematoda <snematoda.751k2@aleeas.com>
Co-committed-by: Shiny Nematoda <snematoda.751k2@aleeas.com>
2024-12-22 12:24:29 +00:00
wxiaoguang
90b65da7e4
Fix incomplete Actions status aggregations (#32859)
fix #32857

(cherry picked from commit d28a4843b8de5d5e01ef3d7b2ad25f22853247ad)

Conflicts:
	web_src/js/components/ActionRunStatus.vue
  remove the refactoring, keep the additional cancelled status
2024-12-22 08:46:38 +01:00
Maxim Slipenko
bbcd7d6fae Merge remote-tracking branch 'upstream/forgejo' into feat/add-oidc-ssh-keys 2024-12-19 10:45:59 +00:00
Earl Warren
380e266440 Merge pull request '[gitea] week 2024-51 cherry pick (gitea/main -> forgejo)' (#6271) from earl-warren/wcp/2024-51 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6271
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-12-19 07:08:01 +00:00
Gusted
275e029fc9
chore: Update katex import path 2024-12-18 01:17:23 +01:00
Otto
66e1975e24 Merge pull request '[gitea] Add links to commit lists in contributors graph page (#32799)' (#6274) from wetneb/forgejo:gitea_contributor_link into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6274
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Reviewed-by: Otto <otto@codeberg.org>
2024-12-16 21:19:11 +00:00
Otto
f94b159704 Merge pull request 'Put issue actions in a single row on mobile' (#6044) from 0ko/forgejo:ui-commenting-singlerow into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6044
Reviewed-by: Otto <otto@codeberg.org>
2024-12-16 21:13:18 +00:00
Chai-Shi
ad7df0f70a Add "n commits" link to contributors in contributors graph page (#32799)
Fixes Issue #29365 and inherit PR #29429

- I should extend the #29429 fork but the fork is not synced, so I
created another PR.
- Use `silenced` class for the link, as in #29847

---------

Co-authored-by: Ben Chang <ben_chang@htc.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-12-15 13:21:02 +01:00
Lunny Xiao
2b5c69c451
Detect whether action view branch was deleted (#32764)
Fix #32761

![图片](https://github.com/user-attachments/assets/a5a7eef8-0fea-4242-b199-1b0b73d9bbdb)

(cherry picked from commit 6370d2fb93a5ee897b82969ca30a9feb33667714)

Conflicts:
	routers/web/repo/actions/actions.go
	routers/web/repo/actions/view.go
  trivial context conflicts
2024-12-15 09:45:10 +01:00
Otto
05fb3692f7 Merge pull request 'Simplify main-attribute labels' (#6201) from 0ko/forgejo:ui-simple-spec-labels into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6201
Reviewed-by: Otto <otto@codeberg.org>
2024-12-13 19:05:52 +00:00
Maks1mS
ab2127faef Merge branch 'forgejo' into feat/add-oidc-ssh-keys 2024-12-10 07:26:37 +00:00
Maxim Slipenko
4500757acd feat: add synchronization for SSH keys with OpenID Connect
Co-authored-by:  Kirill Kolmykov <cyberk1ra@ya.ru>
2024-12-09 18:59:11 +03:00
0ko
6e729b6179 ui: simplify main-attribute labels 2024-12-08 17:30:52 +05:00
metiftikci
b811574d47
fix: render job title as commit message (#32748)
resolves #32724

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
(cherry picked from commit ad994780af48e2aff27b0e7e496fd559dc0fe3fc)

Conflicts:
	routers/web/repo/actions/view.go
  because of RenderCommitMessage context
2024-12-08 08:32:20 +01:00
Mathieu Fenniak
d9252f53a3 Fix bug where Action UI may occasionally not load logs (#6122)
In the combination of events where the user is viewing an action that is completed (and therefore no interval-based loading of logs is occurring), and `loadJob` is called while `loadJob` is already running (commonly from expanding two log sections back-to-back), the second request for loading would be discarded and never occur.

To fix this, the invocation of `loadJob` keeps track of the log cursors it is attempting to load, and an aborted invocation stores its attempted load.  If `loadJob` succeeds in loading and finds that an attempt was aborted while it was busy, it will reload the data.

Steps to reproduce:
- Open an Action UI that is already "Done".
- Click on two steps in rapid succession to expand their logs.
- (Race condition) As long as the second click is registered while the first log chunk is being loaded, its data won't load.

## Checklist

The [contributor guide](https://forgejo.org/docs/next/contributor/) contains information that will be helpful to first time contributors. There also are a few [conditions for merging Pull Requests in Forgejo repositories](https://codeberg.org/forgejo/governance/src/branch/main/PullRequestsAgreement.md). You are also welcome to join the [Forgejo development chatroom](https://matrix.to/#/#forgejo-development:matrix.org).

### Tests

- I added test coverage for Go changes...  (**not applicable**)
  - [ ] in their respective `*_test.go` for unit tests.
  - [ ] in the `tests/integration` directory if it involves interactions with a live Forgejo server.
- I added test coverage for JavaScript changes...
  - [x] in `web_src/js/*.test.js` if it can be unit tested.
  - [ ] in `tests/e2e/*.test.e2e.js` if it requires interactions with a live Forgejo server (see also the [developer guide for JavaScript testing](https://codeberg.org/forgejo/forgejo/src/branch/forgejo/tests/e2e/README.md#end-to-end-tests)).

### Documentation

- [ ] I created a pull request [to the documentation](https://codeberg.org/forgejo/docs) to explain to Forgejo users how to use this change.
- [x] I did not document these changes and I do not expect someone else to do it.

### Release notes

- [ ] I do not want this change to show in the release notes.
- [x] I want the title to show in the release notes with a link to this pull request.
- [ ] I want the content of the `release-notes/<pull request number>.md` to be be used for the release notes instead of the title.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6122
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Reviewed-by: Otto <otto@codeberg.org>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Mathieu Fenniak <mathieu@fenniak.net>
Co-committed-by: Mathieu Fenniak <mathieu@fenniak.net>
2024-12-05 18:08:11 +00:00
Renovate Bot
8247a8f2d0 Lock file maintenance 2024-12-04 07:44:05 +00:00
william-allspice
2faccf5374
Fix race condition in mermaid observer (#32599)
This Pull Request addresses a race condition in the updateIframeHeight
function where it is sometimes called when the iframe is not fully
loaded or accessible resulting in an alarming error message for the
user.

To address this we:
1. Add defensive programming within the updateIframeHeight function
2. Delay instantiating the intersection observer until the iframe has
loaded

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
(cherry picked from commit 88f5d33ab267f330ffaf02eb019e772ed06ed34f)
2024-12-03 10:19:22 +01:00
FermeLeLundi
01e1bc0cb8 Update web_src/js/features/comp/ComboMarkdownEditor.js
Typo
2024-11-28 10:26:12 +00:00
Earl Warren
1b796fd2d9 Merge pull request 'Fix wiki search overflowing on wide screens (#6047)' (#6063) from spiffyk/forgejo:wiki-search-too-wide into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6063
Reviewed-by: Shiny Nematoda <snematoda@noreply.codeberg.org>
2024-11-27 18:28:27 +00:00
Earl Warren
a7cae463b2 Merge pull request 'Improve colors used by colorblind-friendly forgejo themes' (#6059) from DanielGibson/forgejo:improve-colorblind-themes into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6059
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-11-26 16:30:53 +00:00
0ko
787e3163f8 fix(ui): put buttons in a single row on mobile 2024-11-25 18:43:09 +05:00