Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor project templates #26448

Merged
merged 12 commits into from
Aug 12, 2023
Merged

Conversation

denyskon
Copy link
Member

This PR refactors a bunch of projects-related code, mostly the templates.
The following things were done:

  • rename boards to columns in frontend code
  • use the new ctx.Locale.Tr method
  • cleanup template, remove useless newlines, classes, comments
  • merge org-/user and repo level project template together
    • move "new column" button into project toolbar
  • move issue card (shared by projects and pinned issues) to shared template, remove useless duplicated styles
  • add search function to projects (to make the layout more similar to milestones list where it is inherited from 😆)
  • maybe more changes I forgot I've done 😆

Closes #24893

After:
Bildschirmfoto vom 2023-08-10 23-02-00
Bildschirmfoto vom 2023-08-10 23-02-26
Bildschirmfoto vom 2023-08-10 23-02-46

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Aug 10, 2023
@pull-request-size pull-request-size bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Aug 10, 2023
@denyskon denyskon added type/enhancement An improvement of existing functionality topic/ui Change the appearance of the Gitea UI type/refactoring Existing code has been cleaned up. There should be no new functionality. labels Aug 10, 2023
@denyskon denyskon added this to the 1.21.0 milestone Aug 10, 2023
@silverwind
Copy link
Member

silverwind commented Aug 10, 2023

Diff looks quite good, especially +339 −662 👍

templates/repo/issue/card.tmpl Outdated Show resolved Hide resolved
templates/repo/issue/card.tmpl Show resolved Hide resolved
templates/repo/issue/card.tmpl Outdated Show resolved Hide resolved
templates/repo/issue/card.tmpl Show resolved Hide resolved
templates/projects/view.tmpl Outdated Show resolved Hide resolved
templates/projects/view.tmpl Outdated Show resolved Hide resolved
templates/projects/view.tmpl Outdated Show resolved Hide resolved
templates/repo/issue/list.tmpl Outdated Show resolved Hide resolved
@GiteaBot GiteaBot removed the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Aug 12, 2023
@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Aug 12, 2023
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Aug 12, 2023
@silverwind silverwind added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Aug 12, 2023
@silverwind silverwind enabled auto-merge (squash) August 12, 2023 10:04
@silverwind silverwind merged commit ab78c39 into go-gitea:main Aug 12, 2023
24 checks passed
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Aug 12, 2023
@denyskon denyskon deleted the refactor/project-templates branch August 12, 2023 16:49
@wxiaoguang
Copy link
Contributor

There seems a bug for the "grab" cursor.

The default column is not draggable.

image

@denyskon
Copy link
Member Author

Thanks @wxiaoguang
#26476

wxiaoguang pushed a commit that referenced this pull request Aug 14, 2023
Fix #26448 (comment)

I accidentally set grab cursor for project columns instead of issue
cards, which actually turned out not to be a problem - with proper check
for the default column, which can't be moved.

---------

Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: Giteabot <teabot@gitea.io>
zjjhot added a commit to zjjhot/gitea that referenced this pull request Aug 14, 2023
* upstream/main: (24 commits)
  Update zh-cn documentation (go-gitea#26406)
  Fix NuGet search endpoints (go-gitea#25613)
  Fix tooltip of commit select button (go-gitea#26472)
  fix grab cursor on default column (go-gitea#26476)
  Fix storage path logic especially for relative paths (go-gitea#26441)
  Rename `Sync2` -> `Sync` (go-gitea#26479)
  Add ThreadID parameter for Telegram webhooks (go-gitea#25996)
  Fix stderr usages (go-gitea#26477)
  Use correct pull request commit link instead of a generic commit link (go-gitea#26434)
  Close stdout correctly for "git blame" (go-gitea#26470)
  Refactor tests (go-gitea#26464)
  Remove last newline from config file (go-gitea#26468)
  Add matrix to support (go-gitea#26382)
  Refactor project templates (go-gitea#26448)
  Avoiding accessing undefined mentionValues (go-gitea#26461)
  Tweak actions menu (go-gitea#26278)
  Adjust minio new sequence, now it will check whether bucket exist first and then create one if it doesn't exist (go-gitea#26420)
  Set commit id when ref used explicitly (go-gitea#26447)
  Fix 404 error when remove self from an organization (go-gitea#26362)
  Update index doc (go-gitea#26455)
  ...
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Nov 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. topic/ui Change the appearance of the Gitea UI type/enhancement An improvement of existing functionality type/refactoring Existing code has been cleaned up. There should be no new functionality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Merge the repo- and org-level templates into one
5 participants