silverwind and wxiaoguang
78eb95ab19
fix: enable more djlint rules and improve keyboard navigation ( #40081 )
...
Enable djlint's [H018](https://djlint.com/docs/linter/#h018 ),
[H046](https://djlint.com/docs/linter/#h046 ) and
[H054](https://djlint.com/docs/linter/#h054 ) rules, fix their findings
and the keyboard navigation problems around them. H054 found links
nested in `<button>` dropdowns and radio inputs nested in links, both
invalid HTML.
- "Add File" and "More Operations" in the repo file list become `div`
dropdowns, the disabled state stays unfocusable
- The diff whitespace menu marks the current option with a check and
`aria-current` instead of radios, which made our dropdown aria patch
announce it as a combobox
- Sign-in moves "Forgot password?" below "Sign In" and drops the
positive tabindexes from https://github.com/go-gitea/gitea/pull/31689 ,
so the tab order follows the DOM: username, password, remember, sign in,
forgot
- The focus ring on primary, red and green buttons is near-white on dark
themes and near-black on light ones, the primary-colored ring was
invisible on primary buttons
<img width="500" alt="Whitespace menu, before and after"
src="https://github.com/user-attachments/assets/d22a423d-95e5-434c-aec4-59264c7132b7 "
/>
<img width="600" alt="Sign-in form, main and this PR"
src="https://github.com/user-attachments/assets/d6780690-d906-4791-8a2b-8d80fb03067a "
/>
<img width="215" height="132" alt="Keyboard-focused primary and red
buttons, dark and light theme"
src="https://github.com/user-attachments/assets/a2400b18-4802-4383-8560-7e8267a7f02f "
/>
---------
Signed-off-by: silverwind <me@silverwind.io >
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2026-11-03 15:30:59 +00:00
silverwind and wxiaoguang
e645afbb3f
refactor: replace Fomantic modal with native dialog ( #39846 )
...
Replace Fomantic's hard-forked jQuery modal with native `<dialog>`
elements, advancing https://github.com/go-gitea/gitea/issues/29849 . The
UI is visually unchanged. Dialogs open with `show()` over an `inert`
page, so tooltips, popups and toasts mounted on `<body>` stay usable
above them, unlike with `showModal()`
(https://github.com/whatwg/html/issues/9936 ).
- Remove the Fomantic modal and dimmer, add `showModal` and `hideModal`
- Declare modals as `<dialog class="modal-dialog">`, shown inside a
`.modal-backdrop`, instead of `ui modal` with its unused size classes
- Remove two modals that could never be opened
- Block the page while a modal is open, close the topmost one on Escape
and restore focus to its opener
- Allow stacked modals, use a confirm modal instead of `window.confirm`
for deleting content history
- Hide popups and toasts when a modal opens or closes
- Keep the release notes modal open when generating notes fails
Fixes: https://github.com/go-gitea/gitea/issues/39643
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2026-10-20 12:32:27 +02:00
silverwind
f5c7b21f1d
refactor(templates): update djlint to 1.46.0 and resolve its new findings ( #39231 )
2026-09-08 23:17:17 +00:00
PineBale
f52b6f3315
Add URL to Learn more about blocking a user ( #37355 )
...
Closes #29992
2026-04-22 16:13:45 +08:00
silverwind and Claude Opus 4.6
6e7991316c
Refactor text utility classes to Tailwind CSS ( #36703 )
...
Replace Fomantic/custom CSS text utility classes with their Tailwind
equivalents:
- `.text.<color>` compound classes → `tw-text-<color>` classes
- `.text.small` (`font-size: 0.75em`) → `tw-text-xs` (11px)
- `.text.truncate` (`overflow-x: hidden; text-overflow: ellipsis;
white-space: nowrap; display: inline-block`) → `tw-inline-block
tw-truncate`
Remove the now-unused CSS rules from `base.css` and `dashboard.css`.
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com >
2026-02-22 22:56:33 +00:00
silverwind and wxiaoguang
42d294941c
Replace CSRF cookie with CrossOriginProtection ( #36183 )
...
Removes the CSRF cookie in favor of
[`CrossOriginProtection`](https://pkg.go.dev/net/http#CrossOriginProtection )
which relies purely on HTTP headers.
Fixes: https://github.com/go-gitea/gitea/issues/11188
Fixes: https://github.com/go-gitea/gitea/issues/30333
Helps: https://github.com/go-gitea/gitea/issues/35107
TODOs:
- [x] Fix tests
- [ ] Ideally add tests to validates the protection
---------
Signed-off-by: wxiaoguang <wxiaoguang@gmail.com >
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2025-12-25 12:33:34 +02:00
silverwind and wxiaoguang
1ea5216f4a
Replace text-align classes with tailwind ( #33905 )
...
Small refactor to remove these CSS classes in favor of tailwind.
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2025-03-16 12:08:16 +00:00
KN4CK3R and Lauris BH
c337ff0ec7
Add user blocking ( #29028 )
...
Fixes #17453
This PR adds the abbility to block a user from a personal account or
organization to restrict how the blocked user can interact with the
blocker. The docs explain what's the consequence of blocking a user.
Screenshots:



---------
Co-authored-by: Lauris BH <lauris@nix.lv >
2024-03-04 08:16:03 +00:00