aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix profile page email display, respect settings (#23747)wxiaoguang2023-03-272-20/+31
| | | | | | | | | | | | | Always respect the `setting.UI.ShowUserEmail` and `KeepEmailPrivate` setting. * It doesn't make sense to show user's own E-mail to themself. * Always hide the E-mail if KeepEmailPrivate=true, then the user could know how their profile page looks like for others. * Revert the `setting.UI.ShowUserEmail` change from #4981 . This setting is used to control the E-mail display, not only for the user list page. ps: the incorrect `<div .../>` tag on the profile page has been fixed by #23748 together, so this PR becomes simpler.
* Update Gitea version in docs (#23755)John Olheiser2023-03-271-1/+1
| | | Updates the version to `1.19.0`
* Fix SVG close tag, improve commit graph page UI alignment (#23751)wxiaoguang2023-03-272-8/+8
| | | | | | | | | | | | | | | | | | | Follow #23748 Thanks to @delvh ---- And, fix the UI alignment by the way (adding some `gt-mr-xx`) Before: ![image](https://user-images.githubusercontent.com/2114189/228034794-7a6ac8d6-01fa-4dd2-97d4-0df0368f8ee0.png) After: ![image](https://user-images.githubusercontent.com/2114189/228034938-64edeadf-7c99-4e74-b658-0ca62b72d596.png)
* Remove incorrect HTML self close tag (#23748)wxiaoguang2023-03-2753-111/+111
| | | HTML is not XML.
* Refactor repo commit list (#23690)wxiaoguang2023-03-271-15/+8
| | | | | | | | | | | | | | | | | ### Before * The check of `if PullRequest.BaseRepo.Name` doesn't make sense, because the `$commitLink` is always constructed below * Many `if` blocks make the HTML tags (likely) not match in IDE. Although the rendered result matches, it's very unfriendly to editors or code analyzer, and it's difficult to read. ### After Move the `$commitLink` assignment ahead. Simplify the code, resolve the above problems.
* Fix tags view (#23243)Wiktor Kwapisiewicz2023-03-274-43/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This PR fixes several issues reported in https://github.com/go-gitea/gitea/issues/23221. It does three things: 1. Fixes the `DefaultBranch` variable that has not been set. 2. Sets `Title` and `Message` for newly created tags from the Tag message. This makes it easier to create releases from tags that have messages and for those that don't it doesn't have any effect. 3. Makes UI changes so that tags look more like proper releases. Before: ![2023-03-02-12-31-19](https://user-images.githubusercontent.com/1718963/222416890-941a74d4-9cd0-4c45-a59e-199d2580cd8c.png) After: ![2023-03-02-12-31-31](https://user-images.githubusercontent.com/1718963/222416919-abce2009-8955-4cd0-9bed-1374582e04f7.png) I purposefully didn't reformat the template so that the diff is cleaner but can do so if that's welcome. Thanks for your time! --------- Signed-off-by: Wiktor Kwapisiewicz <wiktor@metacode.biz>
* Add commit info in action page (#23210)yp053272023-03-272-0/+69
| | | | | Add more commit info in action detail page. ![image](https://user-images.githubusercontent.com/18380374/222069905-a5ab28b1-1cea-4eec-b3b9-f1c74145cb82.png)
* Use GitHub Actions compatible globbing for `branches`, `tag`, `path` filter ↵ChristopherHX2023-03-271-35/+107
| | | | | | | | | | | | | | | | | | | (#22804) Replaces the current globbing library with a https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet compatible one. This adds support for - `paths-ignore`, `tags-ignore` and `branches-ignore` filters. - negative patterns in `paths`, `tags` and `branches` filters - using both `tags` and `paths` filter on the push event Original PR https://gitea.com/gitea/act/pulls/13. nektos/act PR https://github.com/nektos/act/pull/1618 for the workflowpattern package (It can take some months for it to appear in https://gitea.com/gitea/act) Related to https://github.com/go-gitea/gitea/issues/13539
* Fix project card preview select and template select (#23684)Zettat1232023-03-272-2/+2
| | | | | | | | | | | Now user cannot set Card Previews when creating a new project. Before: https://user-images.githubusercontent.com/15528715/227488883-29bbd636-8b98-45b3-b2f8-de5206b045dc.mp4 After: https://user-images.githubusercontent.com/15528715/227488976-3447f252-805a-4f18-ae0e-1cddd921dcc3.mp4
* [skip ci] Updated translations via CrowdinGiteaBot2023-03-271-0/+4
|
* Add git dashes separator to some "log" and "diff" commands (#23606)wxiaoguang2023-03-261-3/+7
| | | | | | | | | | | | | | | | | Reference: https://github.com/go-gitea/gitea/issues/22578#issuecomment-1444180053 Credits to @tdesveaux , thank you very much for catching the problem. If you'd like to open a PR, feel free to replace this one. Git reports fatal errors for ambiguous arguments: ``` fatal: ambiguous argument 'refs/a...refs/b': unknown revision or path not in the working tree. Use '--' to separate paths from revisions, like this: 'git <command> [<revision>...] -- [<file>...]' ``` So the `--` separator is necessary in some cases.
* Add Simplified Chinese translate for oauth2-provider (#23713)Akkariin Meiko2023-03-261-0/+139
|
* Fix incorrect `toggle` buttons (#23676)wxiaoguang2023-03-264-8/+11
| | | | | | | | | | | | | | | | Some of those are still Copy&Paste problems. This PR: * Only cleans the legacy incorrect code, doesn't change or improve the "action" logic. * Remove the redundant `$('.toggle.button').on('click')`, now `$('.show-panel.button').on('click')` handles that kinds of buttons Actually, there is only one correct "toggle button" in code, the one on the webhook page. No need to backport.
* Fine tune more downdrop settings, use SVG for labels, improve Repo Topic ↵wxiaoguang2023-03-2610-86/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Edit form (#23626) Although it seems that some different purposes are mixed in this PR, however, they are all related, and can be tested together, so I put them together to save everyone's time. Diff: `+79 −84`, everything becomes much better. ### Improve the dropdown settings. Move all fomantic-init related code into our `fomantic.js` Fine-tune some dropdown global settings, see the comments. Also help to fix the first problem in #23625 , cc: @yp05327 The "language" menu has been simplified, and it works with small-height window better. ### Use SVG instead of `<i class="delete icon">` It's also done by `$.fn.dropdown.settings.templates.label` , cc: @silverwind ### Remove incorrect `tabable` CSS class It doesn't have CSS styles, and it was only in Vue. So it's totally unnecessary, remove it by the way. ### Improve the Repo Topic Edit form * Simplify the code * Add a "Cancel" button * Align elements Before: <details> ![image](https://user-images.githubusercontent.com/2114189/223325782-f09532de-0c38-4742-ba86-ed35cc9a858d.png) </details> After: ![image](https://user-images.githubusercontent.com/2114189/226796347-207feb0a-b3cd-4820-8a3e-01930bab1069.png)
* Allow new file and edit file preview if it has editable extension (#23624)Hester Gong2023-03-264-15/+38
| | | | | | | | | | | | | | | | Close #23579 Inspired by [idea](https://github.com/go-gitea/gitea/issues/23579#issuecomment-1475429247) from @brechtvl In this PR, the behavior is when extension switches from writatble to not, preview will hide, and vice versa. demo: https://user-images.githubusercontent.com/17645053/226786119-d20063da-8763-41ce-9b00-ae34929120e1.mov --------- Co-authored-by: silverwind <me@silverwind.io>
* [skip ci] Updated translations via CrowdinGiteaBot2023-03-2626-1093/+37
|
* Clean some legacy files and move some build files (#23699)wxiaoguang2023-03-2510-303/+26
| | | | | | | | | | | | | | | | | | | * Clean the "tools" directory. The "tools" directory contains only two files, move them. * The "external_renderer.go" works like "cat" command to echo Stdin to Stdout , to help testing. * The `// gobuild: external_renderer` is incorrect, there should be no space: `//gobuild: external_renderer` * The `fmt.Print(os.Args[1])` is not a well-defined behavior, and it's never used. * The "watch.sh" is for "make watch", it's somewhat related to "build" * After this PR, there is no "tools" directory, the project root directory looks slightly simpler than before. * Remove the legacy "contrib/autoboot.sh", there is no "gogs_supervisord.sh" * Remove the legacy "contrib/mysql.sql", it's never mentioned anywhere. * Remove the legacy "contrib/pr/checkout.go", it has been broken for long time, and it introduces unnecessary dependencies of the main code base.
* Remove row clicking from notification table (#22695)John Olheiser2023-03-253-37/+17
| | | | | | | | | | | | Resolves #22692 I don't think there's a need for this entire row to be clickable (and even different links depending on which segment you click) The links still point to the same spot, so no information is lost here. --------- Signed-off-by: jolheiser <john.olheiser@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Describe Gitea's purpose more accurately (#23698)Lunny Xiao2023-03-251-2/+2
| | | | | | | | As title. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Yarden Shoham <git@yardenshoham.com>
* [skip ci] Updated translations via CrowdinGiteaBot2023-03-2527-385/+18
|
* ensure go/bin path exists when copying hugo bin into it (#23692)techknowlogick2023-03-241-1/+1
| | | | | | follow up of https://github.com/go-gitea/gitea/pull/23686 path does not exist during static pipeline, and fails out (example: https://drone.gitea.io/go-gitea/gitea/70587/1/5 )
* Create commit status when event is `pull_request_sync` (#23683)sillyguodong2023-03-242-2/+2
| | | | | | | | | | | Fix: #23674 If the type of `hook_event` is `pull_request_sync`, also need to insert a record of `commit_status` into DB. Because `pull_request` event and `pull_request_sync` event have the same payload, so the code is reusable. Screenshot: ![image](https://user-images.githubusercontent.com/33891828/227465436-1b436807-d0b2-4a2b-8890-09d96c7f666d.png)
* Add `deps-docs` command to makefile (#23686)Yarden Shoham2023-03-242-6/+13
| | | | | | Refactored `deps-docs` out of `docs` because #23629 broke Gitpod's docs setup (which grepped to get the hugo install command). Now `make deps` really installs everything to develop (includes `docs`).
* Fix incorrect package doc link (#23679)yp053272023-03-241-1/+1
| | | | package doc link is changed in https://github.com/go-gitea/gitea/pull/23629
* Improve indices for `action` table (#23532)Zettat1232023-03-243-6/+51
| | | | | | | | | Close #21611 Add the index mentioned in https://github.com/go-gitea/gitea/issues/21611#issuecomment-1451113252 . Since we already have an index for `("created_unix", "user_id", "is_deleted")` columns on PostgreSQL, I removed the database type check to apply this index to all types of databases.
* Clarify that Gitea requires JavaScript (#23677)wxiaoguang2023-03-241-1/+1
| | | | | | | | Close #20553 There were already a lot of functions powered by JavaScript in Gitea. Without JavaScript, the Gitea Web UI almost doesn't work (only some static links work ....)
* Use data-tooltip-content for tippy tooltip (#23649)wxiaoguang2023-03-2477-228/+209
| | | | | | | | | | | | | | | | | Follow: * #23574 * Remove all ".tooltip[data-content=...]" Major changes: * Remove "tooltip" class, use "[data-tooltip-content=...]" instead of ".tooltip[data-content=...]" * Remove legacy `data-position`, it's dead code since last Fomantic Tooltip -> Tippy Tooltip refactoring * Rename reaction attribute from `data-content` to `data-reaction-content` * Add comments for some `data-content`: `{{/* used by the form */}}` * Remove empty "ui" class * Use "text color" for SVG icons (a few)
* Add aria attributes to interactive time tooltips. (#23661)Felipe Leopoldo Sologuren Gutiérrez2023-03-241-1/+1
| | | | | | Fixes #23645 * Added `describedby` attribute to the reference element. * Eliminated `aria-expanded` attribute to the reference element in order to conform strictly with WCAG 2.1 rules.
* Fix cancel button in the page of project edit not work (#23655)sillyguodong2023-03-245-3/+6
| | | | | | | | | | | | | | | | Before, in project edit page, the cancel button is not work. https://user-images.githubusercontent.com/33891828/227182731-6478e29f-0e52-48c4-beb0-6a7d1dda6a1d.mov 1. The wrong classname `cancel` was added to the `<a>` tag. That classname caused the default click event of `<a>` tag to be cancelled. Because we have the following settings in the global. So I remove the classname `cancel`. https://github.com/go-gitea/gitea/blob/9be90a58754061171bbd5025d85d2b891364efd3/web_src/js/features/common-global.js#L325-L327 2. Another change is that page will redirect to the previous page. https://user-images.githubusercontent.com/33891828/227187326-c653c6d6-9715-440f-a732-ba0a6f012c81.mov
* Fix long project name display in issue list and in related dropdown (#23653)Hester Gong2023-03-246-13/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This PR is to fix the second problem mentioned in #23625, along with the long texts problem in `issue-item-bottom-row` of `issuelist.tmpl` Main changes are: 1. Add `max-width` to the search dropdowns in issue list and make the possible long texts inside to show ellipsis if texts are long 2. Adjust the conditions in [issuelist.tmpl](https://github.com/go-gitea/gitea/blob/1d35fa0e784dffcadacb2322a3d7ac3ec2ff89b2/templates/shared/issuelist.tmpl#L146-L167) to fix the problem as mentioned by the [comment](https://github.com/go-gitea/gitea/issues/23625#issuecomment-1479281060) 3. Use `word-break: break-word;` in `issue-item-bottom-row` to break the possible long texts. After the PR issuelist in repo (similar for pr list): <img width="366" alt="截屏2023-03-23 17 42 40" src="https://user-images.githubusercontent.com/17645053/227163953-93e9adbd-5785-4c16-b538-9db901787775.png"> dropdowns with long name (Here take reference from github to deal with the long names cases: show ellipsis with no title, because all these options are clickable, and it might not be necessary to add titles to them ): <img width="370" alt="截屏2023-03-23 17 43 50" src="https://user-images.githubusercontent.com/17645053/227164215-df6fcaaa-9fee-4256-a57c-053fbcffafbb.png"> <img width="365" alt="截屏2023-03-23 17 43 56" src="https://user-images.githubusercontent.com/17645053/227164227-9c99abcd-f410-4e07-b5b8-cbce764eedcd.png"> issue page (similar for pr page): <img width="374" alt="截屏2023-03-23 17 45 37" src="https://user-images.githubusercontent.com/17645053/227164668-654a8188-dac8-4bbf-a6e3-f3768a644a1b.png"> on PC: <img width="1412" alt="截屏2023-03-23 17 47 20" src="https://user-images.githubusercontent.com/17645053/227166694-e7bcc6e5-9667-4cef-9fbf-db85640a2c6c.png"> <img width="1433" alt="截屏2023-03-23 17 46 40" src="https://user-images.githubusercontent.com/17645053/227165182-4e2a5d19-74bc-4c66-b73c-23cbca176ffe.png">
* Editor preview support for external renderers (#23333)Brecht Van Lommel2023-03-2423-215/+389
| | | | | | | | | | | | | | | | | | | | | | | | Remove `[repository.editor] PREVIEWABLE_FILE_MODES` setting that seemed like it was intended to support this but did not work. Instead, whenever viewing a file shows a preview, also have a Preview tab in the file editor. Add new `/markup` web and API endpoints with `comment`, `gfm`, `markdown` and new `file` mode that uses a file path to determine the renderer. Remove `/markdown` web endpoint but keep the API for backwards and GitHub compatibility. ## ⚠️ BREAKING ⚠️ The `[repository.editor] PREVIEWABLE_FILE_MODES` setting was removed. This setting served no practical purpose and was not working correctly. Instead a preview tab is always shown in the file editor when supported. --------- Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Fix incorrect `HookEventType` of pull request review comments (#23650)Zettat1232023-03-244-5/+5
| | | | | `HookEventType` of pull request review comments should be `HookEventPullRequestReviewComment` but some event types are `HookEventPullRequestComment` now.
* [skip ci] Updated translations via CrowdinGiteaBot2023-03-243-0/+4
|
* Fix codeblocks in the cheat sheet (#23664)Sandro2023-03-231-10/+10
|
* Drop migration for ForeignReference (#23605)Jason Song2023-03-231-15/+2
| | | | | | | Fix https://github.com/go-gitea/gitea/issues/21086#issuecomment-1476560381 Related to #21721
* Fix new issue/pull request btn margin when it is next to sort (#23647)Hester Gong2023-03-232-3/+5
| | | | | | | | | | | | | | | | | | | | | Close #23627 Added margin left to the button when it is next to the svg, which has a margin-right of `-0.5rem` And here it might be better if `white-space: nowrap;` is added because otherwise it might look like below on pull requests page on smaller screen <img width="945" alt="截屏2023-03-23 09 57 41" src="https://user-images.githubusercontent.com/17645053/227079613-71c696ab-55ec-4641-acb9-622a8baebb31.png"> After: <img width="936" alt="截屏2023-03-23 10 08 27" src="https://user-images.githubusercontent.com/17645053/227080971-6bf2588e-40dd-4770-b0d1-45d7c63e0f48.png"> Pull Request on smaller screen <img width="922" alt="截屏2023-03-23 10 25 16" src="https://user-images.githubusercontent.com/17645053/227084144-0c2ed3e6-5c11-4252-bba2-b5f971b70f4a.png">
* A tool to help to backport locales, changes source strings to fix other ↵wxiaoguang2023-03-232-19/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | broken translations (#23633) It use old en-US locales as reference, fill the old other locales with new locales. ---- ## More broken translations Many translations are still broken. The reason is: at the last time restoring the ini to crowdin, many semicolon are treated as comments. Two kinds of broken strings: ### Some translations can be re-translated <details> ``` skipping options/locale/locale_si-LK.ini org teams.add_nonexistent_repo skipping options/locale/locale_tr-TR.ini repo commits.search.tooltip skipping options/locale/locale_es-ES.ini repo settings.trust_model.committer.desc skipping options/locale/locale_es-ES.ini admin dashboard.new_version_hint skipping options/locale/locale_pt-PT.ini org teams.add_nonexistent_repo skipping options/locale/locale_hu-HU.ini install require_sign_in_view_popup skipping options/locale/locale_hu-HU.ini repo migrate.invalid_local_path skipping options/locale/locale_id-ID.ini repo migrate.invalid_local_path skipping options/locale/locale_id-ID.ini org teams.add_nonexistent_repo skipping options/locale/locale_de-DE.ini repo settings.protect_protected_file_patterns_desc ``` </details> So this PR also does some small changes on them, to trigger the re-translation. ### The `locale_el-GR.ini` contains many broken tranlsations I guess we should reset them from crowdin side, then translators can re-translate them. ---- Update: in latest main, the strings have been fixed. ## TODO Update: the el-GR translators have done great job and fixes these broken translations. <details> Merge this PR ASAP and upload `locale_el-GR.ini` to crowdin to remove broken strings. Out-dated, fixed in main. ![image](https://user-images.githubusercontent.com/2114189/226954531-36e14527-278a-41a1-8ddb-2b2b27bfc746.png) </details> --------- Co-authored-by: delvh <dev.lh@web.de>
* Fix incorrect `show-modal` and `show-panel` class (#23660)wxiaoguang2023-03-236-8/+8
| | | | | | | | That's incorrect code caused by Copy&Paste. `show-modal` / `show-panel` are used by JS to show something, but these links have `href`, they should navigate to new page. Close #23657
* Restructure documentation. Now the documentation has installation, ↵Lunny Xiao2023-03-23123-346/+261
| | | | | | | | | | | | | | | | | | | | | | administration, usage, development, contributing the 5 main parts (#23629) - **Installation**: includes how to install Gitea and related other tools, also includes upgrade Gitea - **Administration**: includes how to configure Gitea, customize Gitea and manage Gitea instance out of Gitea admin UI - **Usage**: includes how to use Gitea's functionalities. A sub documentation is about packages, in future we could also include CI/CD and others. - **Development**: includes how to integrate with Gitea's API, how to develop new features within Gitea - **Contributing**: includes how to contribute code to Gitea repositories. After this is merged, I think we can have a sub-documentation of `Usage` part named `Actions` to describe how to use Gitea actions --------- Co-authored-by: John Olheiser <john.olheiser@gmail.com>
* Check LFS/Packages settings in dump and doctor command (#23631)Zettat1232023-03-232-0/+13
| | | | | | | | | | Close #23622 As described in the issue, disabling the LFS/Package settings will cause errors when running `gitea dump` or `gitea doctor`. We need to check the settings and the related operations should be skipped if the settings are disabled. Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Use a general approach to show tooltip, fix temporary tooltip bug (#23574)wxiaoguang2023-03-2313-64/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ## TLDR * Improve performance: lazy creating the tippy instances. * Transparently support all "tooltip" elements, no need to call `initTooltip` again and again. * Fix a temporary tooltip re-entrance bug, which causes showing temp content forever. * Upgrade vue3-calendar-heatmap to 2.0.2 with lazy tippy init (initHeatmap time decreases from 100ms to 50ms) ## Details ### The performance Creating a lot of tippy tooltip instances is expensive. This PR doesn't create all tippy tooltip instances, instead, it only adds "mouseover" event listener to necessary elements, and then switches to the tippy tooltip ### The general approach for all tooltips Before, dynamically generated tooltips need to be called with `initTooltip`. After, use MutationObserver to: * Attach the event listeners to newly created tooltip elements, work for Vue (easier than before) * Catch changed attributes and update the tooltip content (better than before) It does help a lot, eg: https://github.com/go-gitea/gitea/blob/1a4efa0ee9a49d48549be7479a46be133b9bc260/web_src/js/components/PullRequestMergeForm.vue#L33-L36 ### Temporary tooltip re-entrance bug To reproduce, on try.gitea.io, click the "copy clone url" quickly, then the tooltip will be "Copied!" forever. After this PR, with the help of `attachTippyTooltip`, the tooltip content could be reset to the default correctly. ### Other changes * `data-tooltip-content` is preferred from now on, the old `data-content` may cause conflicts with other modules. * `data-placement` was only used for tooltip, so it's renamed to `data-tooltip-placement`, and removed from `createTippy`.
* Improve workflow event triggers (#23613)Zettat1232023-03-233-13/+155
| | | | | | | | | | | | | | | Follow #23037 Fix [#22598 comment](https://github.com/go-gitea/gitea/issues/22958#issuecomment-1475763042) Workflows with `pull_request` trigger event can't be triggered by `pull_request_sync` event. This PR adds the `canGithubEventMatch` function to check if a Github event can match any Gitea event. If the Github event matches a Gitea event, the related workflows should be triggered. --------- Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Improve `<SvgIcon>` to make it output `svg` node and optimize performance ↵wxiaoguang2023-03-239-24/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#23570) Before, the Vue `<SvgIcon>` always outputs DOM nodes like: ```html <span class="outer-class"> <svg class="class-name-defined" ...></svg> </span> ``` The `span` is redundant and I guess such layout and the inconsistent `class/class-name` attributes would cause bugs sooner or later. This PR makes the `<SvgIcon>` clear, and it's faster than before, because it doesn't need to parse the whole SVG string. Before: <details> ![image](https://user-images.githubusercontent.com/2114189/226156474-ce2c57cd-b869-486a-b75b-1eebdac8cdf7.png) </details> After: ![image](https://user-images.githubusercontent.com/2114189/226155774-108f49ed-7512-40c3-94a2-a6e8da18063d.png) --------- Co-authored-by: silverwind <me@silverwind.io>
* [skip ci] Updated translations via CrowdinGiteaBot2023-03-232-67/+260
|
* Add extra features to product comparison (#23638)Tim2023-03-221-0/+3
| | | | | | | Add some review features that are notably missing from Gitlab CE but not Gitea. Also add Merge Queues which is not supported by Gitea but is quite an important feature.
* Use a general approch to improve a11y for all checkboxes and dropdowns. (#23542)wxiaoguang2023-03-228-94/+198
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This PR follows #22599 and #23450 The major improvements: 1. The `aria-*.js` are totally transparent now, no need to call `attachDropdownAria` explicitly anymore. * It hooks the `$.fn.checkbox` and `$.fn.dropdown`, then our patch works. * It makes all dynamically generated checkbox/dropdown work with a11y without any change * eg: the `conversation.find('.dropdown').dropdown();` in `repo-diff.js` 2. Since it's totally transparent now, it could be easier to modify or remove in the future. 3. It handles all selection labels as well (by onLabelCreate), so it supports "multiple selection dropdown" now. * It partially completes one of my TODOs: `TODO: multiple selection is not supported yet.` 4. The code structure is clearer, code blocks are splitted into different functions. * The old `attachOneDropdownAria` was splitted into separate functions. * It makes it easier to add more fine tunes in the future, and co-work with contributors. 6. The code logic is similar as before, only two new parts: 1. the `ariaCheckboxFn` and `ariaDropdownFn` functions 2. the `onLabelCreate` and `updateSelectionLabel` functions In `aria-dropdown.js` I had to mix jQuery and Vanilla JS somewhat, I think the code is still understandable, otherwise the code would be much more complex to read. Thanks to fsologureng for the idea about "improving the 'delete icon' with aria attributes". If there is anything unclear or incorrect, feel free to ask and discuss, or propose new PRs for it.
* [skip ci] Updated translations via CrowdinGiteaBot2023-03-2214-2/+20
|
* Update PR documentation (#23620)John Olheiser2023-03-211-1/+37
| | | | | | | | | This updates the PR docs and explains how to work with PRs, for those who may not know. It was mentioned that this page could explain PRs a bit better, in case some users are not familiar with GitHub or similar forges. Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Set opaque background on markup and images (#23578)silverwind2023-03-213-0/+18
| | | | | | | | | | | | | | | | | | | | | | - Set opaque background on markup images so they can visually break `<hr>` - Change padding of comment box so `padding` is provided by the `.markup` element instead of its parent, matching the file rendering view which does the same. Before: <img width="243" alt="Screenshot 2023-03-19 at 19 22 03" src="https://user-images.githubusercontent.com/115237/226198663-8ff4d940-6a15-452d-ac58-14485b37fbc7.png"> After: <img width="261" alt="Screenshot 2023-03-19 at 19 23 26" src="https://user-images.githubusercontent.com/115237/226198689-1bf56561-4726-46dc-b583-423d65e1e13a.png"> <img width="263" alt="image" src="https://user-images.githubusercontent.com/115237/226199002-e93c817d-6d9c-4b98-bad8-0aa0bd45b62f.png"> Example documents: https://try.gitea.io/silverwind/symlink-test/src/branch/master/test-page.md https://github.com/silverwind/symlink-test/blob/master/test-page.md
* Decouple the issue-template code from comment_tab.tmpl (#23556)wxiaoguang2023-03-212-18/+23
| | | | | | It would help #23290 The issue-template code is only useful for "new issue" or "new PR", so it could only be put in the `new_form.tmpl`