summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Refactor clone-panel styles (#29861)wxiaoguang2024-03-177-32/+18
| | | | | | | 1. The borders were doubled on the "empty" page, fix it. 2. Remove unnecessary CSS classes like "clone", "compact", etc 3. Use CSS class "clone-panel" instead of ID "clone-panel" 4. Use `tw-flex-1` instead of `gt-f1` 5. Remove unnecessary ID "more-btn"
* Simplify README (#29827)silverwind2024-03-172-104/+32
| | | | | | | | Came to the conclusion that a simple format Readme is easier to read than the previous fancy centered stuff. --------- Co-authored-by: Yarden Shoham <git@yardenshoham.com>
* Load citation JS only when needed (#29855)silverwind2024-03-172-19/+30
| | | | | | | | | | | | | | 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>
* Fix semantic.json (#29860)silverwind2024-03-171-1/+0
| | | Followup https://github.com/go-gitea/gitea/pull/29856
* Fix PR creation via api between branches of same repo with head field ↵norohind2024-03-172-0/+19
| | | | | | | | | | | | | | | | | | | | | | 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
* Remove fomantic message module (#29856)silverwind2024-03-174-751/+100
| | | | Remove this CSS-only module, which gives a nice reduction in CSS size. Should look exactly like before.
* fix double border and border-radius on empty action steps (#29845)silverwind2024-03-161-2/+6
| | | | | | | | | | | 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">
* add `.suppressed` link class (#29847)silverwind2024-03-161-3/+11
| | | | | 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.
* Forbid jQuery `.prop` and fix related issues (#29832)silverwind2024-03-166-27/+37
| | | | | | | | | | 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>
* Fix wrong test for TestPullView_CodeOwner (#29838)Lunny Xiao2024-03-161-3/+3
| | | It's weird the previous test was PASS.
* Forbid HTML injection using jQuery (#29843)Yarden Shoham2024-03-165-9/+12
| | | | | | | | | | | | 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>
* Meilisearch double quote on "match" query (#29740)65432024-03-162-70/+37
| | | | | make `nonFuzzyWorkaround` unessesary cc @Kerollmops
* Forbid variables containing jQuery collections not having the `$` prefix ↵Yarden Shoham2024-03-1614-193/+193
| | | | | | | | | | | (#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>
* Remove AddParamIfExist(AddParam) (#29841)wxiaoguang2024-03-1617-58/+55
| | | | | | Follow #29834 Remove AddParamIfExist, use "AddParamString" instead, it should clearly know what is being added into the parameters.
* Refactor markdown attention render (#29833)wxiaoguang2024-03-164-38/+23
| | | | | | | * Remove some deadcode * Use 2-word name for CSS class names * Remove "gt-*" rules for sanitizer The UI doesn't change much.
* Refactor code_indexer to use an SearchOptions struct for PerformSearch (#29724)65432024-03-169-39/+86
| | | | | | | | similar to how it's already done for the issue_indexer --- *Sponsored by Kithara Software GmbH*
* Refactor AddParam to AddParamIfExist (#29834)wxiaoguang2024-03-1617-54/+53
| | | | | | | When read the code: `pager.AddParam(ctx, "search", "search")`, the question always comes: What is it doing? Where is the value from? Why "search" / "search" ? Now it is clear: `pager.AddParamIfExist("search", ctx.Data["search"])`
* Forbid jQuery AJAX (#29818)Yarden Shoham2024-03-161-2/+2
| | | | | | 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>
* Remove jQuery AJAX from the notifications (#29817)Yarden Shoham2024-03-161-63/+37
| | | | | | | | | | | | | | | - 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>
* Light theme color enhancements (#29830)silverwind2024-03-161-67/+67
| | | | | | | | | | | | | | | | | | | | | | | 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">
* Better highlighting of archved labels (#29749)65432024-03-151-1/+2
| | | | | | | | | | as followup of the not jet finished discussion at https://github.com/go-gitea/gitea/pull/29680#discussion_r1521867261 we enhance and chat about how best to highlight archived labels here :) --------- Co-authored-by: silverwind <me@silverwind.io>
* Remove the `time-since` class (#29826)Yarden Shoham2024-03-154-4/+6
| | | | | | | | It serves no purpose. --------- Signed-off-by: Yarden Shoham <git@yardenshoham.com> Co-authored-by: Giteabot <teabot@gitea.io>
* Remove jQuery AJAX from the project page (#29814)Yarden Shoham2024-03-151-68/+60
| | | | | | | | | | | | | | | | | | | 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>
* Upgrade `htmx` to v1.9.11 (#29821)Yarden Shoham2024-03-153-8/+7
| | | | | | | | | Also added BSD Zero Clause License to the list of allowed licenses in webpack. Tested various `htmx` operations. Nothing broke. Signed-off-by: Yarden Shoham <git@yardenshoham.com> Co-authored-by: Giteabot <teabot@gitea.io>
* Dark theme color enhancements (#29822)silverwind2024-03-152-71/+71
| | | | | | | | | | | | | | | | | | | | | | | - Few very minor colors tweaks to dark theme. Slightly darker background, slightly bluer secondary colors. - Alias `--color-nav-hover-bg` in both themes. Before: <img width="1013" alt="Screenshot 2024-03-15 at 18 43 59" src="https://github.com/go-gitea/gitea/assets/115237/ce4bdb0d-6e25-4fd6-88f5-dc8f9e3093cd"> After: <img width="1016" alt="Screenshot 2024-03-15 at 19 02 04" src="https://github.com/go-gitea/gitea/assets/115237/4a6dd5a1-a5b4-4fc2-9835-05a0c2c58c42"> Before: <img width="1340" alt="Screenshot 2024-03-15 at 18 40 19" src="https://github.com/go-gitea/gitea/assets/115237/4465fa9c-d529-4a05-94d7-e21080e0a153"> After: <img width="1341" alt="Screenshot 2024-03-15 at 19 00 51" src="https://github.com/go-gitea/gitea/assets/115237/6595afef-592b-42c4-a6cd-196968ba5881">
* Remove jQuery AJAX from the comment edit box (#29812)Yarden Shoham2024-03-151-19/+29
| | | | | | | | | | | | | | - Removed all jQuery AJAX calls and replaced with our fetch wrapper - Tested the file addition and removal functionality and it works as before # Demo using `fetch` instead of jQuery AJAX ![demo](https://github.com/go-gitea/gitea/assets/20454870/846ed6d5-3798-43ca-920c-d619e9c3d745) --------- Signed-off-by: Yarden Shoham <git@yardenshoham.com> Co-authored-by: silverwind <me@silverwind.io>
* Tweak labeler (#29809)silverwind2024-03-151-2/+2
| | | | - `poetry.toml` does not picture dependencies - Add `.vue` files to `modifies/js`
* Fix `for` attribute not pointing to the ID of the color picker (#29813)Yarden Shoham2024-03-151-1/+1
| | | | | It didn't include the word picker. Signed-off-by: Yarden Shoham <git@yardenshoham.com>
* Refactor graceful manager, fix misused WaitGroup (#29738)coldWater2024-03-154-51/+55
| | | Follow #29629
* Improve repo search UI (#29767)wxiaoguang2024-03-156-27/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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> ![image](https://github.com/go-gitea/gitea/assets/2114189/b965ac00-bad6-4d2f-9103-8841bd940aa5) </details> New UI (doesn't change much, but the items align) <details> ![image](https://github.com/go-gitea/gitea/assets/2114189/a1add892-21dc-423b-90d5-5569faa3dced) ![image](https://github.com/go-gitea/gitea/assets/2114189/fb4040b2-96d8-4fb2-a0ed-760b9881fd86) </details> --------- Co-authored-by: silverwind <me@silverwind.io>
* Use `Temporal.PlainDate` for absolute dates (#29804)silverwind2024-03-154-10/+40
| | | | | | | | | | | | | | | | | | | | | 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.
* Fix codeowner detected diff base branch to mergebase (#29783)Lunny Xiao2024-03-155-74/+248
| | | | | | | | | | | | | | 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>
* Remove scrollbar customizations (#29800)silverwind2024-03-151-24/+0
| | | | | | | | | 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.
* Improve branch select list ui in go templates (#29729)HEREYUA2024-03-157-9/+45
| | | | | | | | | | | | | | | | | | Relate:[#27417](https://github.com/go-gitea/gitea/issues/27471) Reference: [#26631](https://github.com/go-gitea/gitea/pull/26631) Before ![image](https://github.com/go-gitea/gitea/assets/37935145/88ca8da5-25dd-4f60-bea8-a80107f19cc5) After ![image](https://github.com/go-gitea/gitea/assets/37935145/3cb180dc-1331-43e9-8633-be5e288401e8) --------- Co-authored-by: silverwind <me@silverwind.io>
* Fix Citation modal responsiveness and clipboard copy (#29799)silverwind2024-03-154-20/+12
| | | | | | | | | | 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.
* Add `<overflow-menu>`, rename webcomponents (#29400)silverwind2024-03-1554-287/+458
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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"> ![image](https://github.com/go-gitea/gitea/assets/115237/0f43770c-834c-4a05-8e3d-d30eb8653786) ![image](https://github.com/go-gitea/gitea/assets/115237/4b4c6bd7-843f-4f49-808f-6b3aed5e9f9a) 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>
* Update JS dependences (#29797)silverwind2024-03-142-519/+844
| | | Update all non-excluded JS deps, tested monaco, swagger and mermaid.
* Unify search boxes (#29530)Denys Konovalov2024-03-1451-397/+347
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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> ![grafik](https://github.com/go-gitea/gitea/assets/47871822/e20e7d6b-c6be-4a47-b132-672766f41421) ![grafik](https://github.com/go-gitea/gitea/assets/47871822/d5b11b9c-c12f-4a29-8fb0-24e5aa511d18) ![grafik](https://github.com/go-gitea/gitea/assets/47871822/d86bb444-36c7-426d-9cf1-c634963dffb1) ![grafik](https://github.com/go-gitea/gitea/assets/47871822/a76c0319-0518-484a-a840-563d02b61198) </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>
* Fix document error about 'make trans-copy' (#29710)Daniel YC Lin2024-03-144-49/+2
| | | | | | | Change document to 'make docs' --------- Co-authored-by: techknowlogick <techknowlogick@gitea.com>
* Remove jQuery AJAX from the diff functions (#29743)Yarden Shoham2024-03-141-28/+41
| | | | | | | | | | | | | | - 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 ![demo](https://github.com/go-gitea/gitea/assets/20454870/cc0bed59-f11f-4e48-bfa3-59ab52d9889e) --------- Signed-off-by: Yarden Shoham <git@yardenshoham.com> Co-authored-by: silverwind <me@silverwind.io>
* Fix Safari spinner rendering (#29801)silverwind2024-03-141-0/+1
| | | | | | | 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.
* Remove jQuery AJAX from the `repo-issue.js` file (#29776)Yarden Shoham2024-03-141-84/+114
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 ![due_date](https://github.com/go-gitea/gitea/assets/20454870/7de395d3-63e8-49e8-9a13-8d14fc26810d) ## Deleting a comment ![comment_delete](https://github.com/go-gitea/gitea/assets/20454870/2814e695-44e3-4548-9ee7-7b437bef4b01) ## Updating a branch in a pull request ![branch_update](https://github.com/go-gitea/gitea/assets/20454870/137da77e-acc4-4984-a1bc-be58583bf52a) ## Checking and unchecking the "Allow edits from maintainers" checkbox ![allow_edits](https://github.com/go-gitea/gitea/assets/20454870/8d4829af-5813-432d-90ef-da057f8cdafc) ## Requesting review and removing review request ![reviewer_addition](https://github.com/go-gitea/gitea/assets/20454870/08f210e0-be3f-41af-b271-214a1dd2d0ba) ## Toggling the WIP status of a pull request ![wip](https://github.com/go-gitea/gitea/assets/20454870/dea5e668-1c89-4f3d-a5d6-4c26aefc4814) ## Clicking the new code comment button on the diff page ![code_comment](https://github.com/go-gitea/gitea/assets/20454870/1d17174e-3bba-4cf8-81fe-c3a2c21f80b9) ## Editing the issue title and target branch ![issue_title](https://github.com/go-gitea/gitea/assets/20454870/7099888e-81c0-47d4-9371-8e4469e9e519) --------- Signed-off-by: Yarden Shoham <git@yardenshoham.com> Co-authored-by: silverwind <me@silverwind.io>
* Improve commit record's ui in comment list (#26619)yp053272024-03-142-13/+9
| | | | | | | | | | | | | | | | | Before: ![image](https://github.com/go-gitea/gitea/assets/18380374/795f9941-9989-4045-b0fc-d6dd0262269b) ![image](https://github.com/go-gitea/gitea/assets/18380374/f6505f5e-4248-456e-a98d-e714c6484b2f) After: ![image](https://github.com/go-gitea/gitea/assets/18380374/321dda1e-6999-4851-afff-2e6c8d20367b) ![image](https://github.com/go-gitea/gitea/assets/18380374/182f18d1-2295-4004-852b-c0ebb498b411) --------- Co-authored-by: silverwind <me@silverwind.io>
* enable tailwind nesting (#29746)Rafael Heard2024-03-143-2/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Support GITEA_I_AM_BEING_UNSAFE_RUNNING_AS_ROOT env (#29788)Jason Song2024-03-141-0/+3
| | | | | | | | | | | | 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>
* Fix missing translation on milestons (#29785)Lunny Xiao2024-03-141-2/+2
| | | | Caused by #26569 Fix #29778
* Fix lint-swagger warning (#29787)sillyguodong2024-03-144-26/+8
| | | | | | | | | | | 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.
* Tweak actions view sticky (#29781)silverwind2024-03-141-1/+1
| | | | | | | 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">
* add skip ci support for pull request title (#29774)Denys Konovalov2024-03-144-11/+54
| | | | | Extends #28075 to support [skip ci] inside PR titles. Close #29265
* Refactor markup/csv: don't read all to memory (#29760)coldWater2024-03-142-12/+55
|