Skip to content

Adjust the layout of the toolbar on the Issues/Projects page #33667

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

Merged
merged 6 commits into from
Mar 28, 2025

Conversation

kerwin612
Copy link
Member

before:
570ffee34fbc0c3c3d8998ee0c2df41

after:
21f1b350cc01bb555435a7101188c1c

On the list page, labels and milestones do not serve as a switch-tab. Instead, they function as page navigation. The switch-tab is only appropriate for use on the labels and milestones pages, just like this:
f5f4dfb7b4484c1ea043b6190c394bf

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Feb 21, 2025
@github-actions github-actions bot added the modifies/templates This PR modifies the template files label Feb 21, 2025
@lunny
Copy link
Member

lunny commented Feb 21, 2025

What's the reason to change the labels and milestones's positions?

@kerwin612
Copy link
Member Author

What's the reason to change the labels and milestones's positions?

As I described, on the default issue list page, labels and milestones do not fall under the functional definition of the switch-tab type. Instead, they serve as a page navigation function.
So, the first step is to change the current switch-tab into the buttons.
After switching to buttons, you will notice that with buttons both in front of and behind an input box, it will look uncoordinated. Therefore, I naturally moved it to the right side.
Coincidentally, after I made the modification, I compared it with GitHub and found that they also have the same layout (it's purely a coincidence).

@silverwind
Copy link
Member

silverwind commented Feb 21, 2025

Imho, you want to modify template repo/issue/navbar so its consistent in all places. We shouldn't be singling out the repo issue page like that.

@kerwin612
Copy link
Member Author

kerwin612 commented Feb 24, 2025

Imho, you want to modify template repo/issue/navbar so its consistent in all places. We shouldn't be singling out the repo issue page like that.

In fact, I have already explained it above. Let's just take a look through the page screenshots:

  • /issues
    3000-gogitea-gitea-y4ulxr46c4k ws-us117 gitpod io_test_test_issues (2)

  • /labels
    3000-gogitea-gitea-y4ulxr46c4k ws-us117 gitpod io_test_test_labels (1)
    3000-gogitea-gitea-y4ulxr46c4k ws-us117 gitpod io_test_test_labels (2)

  • /milestones
    3000-gogitea-gitea-y4ulxr46c4k ws-us117 gitpod io_test_test_milestones
    3000-gogitea-gitea-y4ulxr46c4k ws-us117 gitpod io_test_test_milestones (1)

  • /projects
    95391e33abaa1627908931db4f94ab5

As I have repeatedly explained before, Page /issues should, of course, be different from Page /labels and Page /milestones. Therefore, it is impossible for it to share the same template(repo/issue/navbar) with Page /labels and Page /milestones.

@silverwind
Copy link
Member

silverwind commented Feb 24, 2025

Hmm, if we could add a search bar to /labels, it could be made so all three pages use the same layout? Alternatively, add a SearchBar=boolean option to the subtemplate.

@kerwin612 kerwin612 closed this Mar 5, 2025
@kerwin612 kerwin612 deleted the issues-page-toolbar-layout-adjust branch March 5, 2025 06:26
@kerwin612 kerwin612 restored the issues-page-toolbar-layout-adjust branch March 5, 2025 06:28
@kerwin612 kerwin612 reopened this Mar 5, 2025
@kerwin612
Copy link
Member Author

Hmm, if we could add a search bar to /labels, it could be made so all three pages use the same layout? Alternatively, add a SearchBar=boolean option to the subtemplate.

To be frank, my point of view is that these are two completely different sets of functional positioning. One is similar to a tab - like button, and the other is an ordinary button group. There's no need to abstract them into one template. It's a bit of over - abstraction.

@lunny lunny added this to the 1.24.0 milestone Mar 28, 2025
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Mar 28, 2025
@wxiaoguang
Copy link
Contributor

No, don't do that IsBtns. It is an over-design.

@wxiaoguang wxiaoguang force-pushed the issues-page-toolbar-layout-adjust branch from 73cc7b2 to 433d9cf Compare March 28, 2025 07:01
@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 Mar 28, 2025
@wxiaoguang wxiaoguang enabled auto-merge (squash) March 28, 2025 07:14
auto-merge was automatically disabled March 28, 2025 07:15

Head branch was pushed to by a user without write access

@kerwin612
Copy link
Member Author

kerwin612 commented Mar 28, 2025

I have applied the same modifications to the projects-view page

@wxiaoguang
Copy link
Contributor

I have applied the same modifications to the projects-view page

Good to have it, will take a test.

@pull-request-size pull-request-size bot added size/M and removed size/S labels Mar 28, 2025
@wxiaoguang
Copy link
Contributor

image

@wxiaoguang wxiaoguang enabled auto-merge (squash) March 28, 2025 07:33
@wxiaoguang wxiaoguang linked an issue Mar 28, 2025 that may be closed by this pull request
@wxiaoguang wxiaoguang changed the title Adjust the Layout of the Top Toolbar on the Issues Page Adjust the layout of the toolbar on the Issues/Projects page Mar 28, 2025
@wxiaoguang
Copy link
Contributor

Backport Adjust the layout of the toolbar on the Issues/Projects page (#33667) #34047

@wxiaoguang wxiaoguang added backport/done All backports for this PR have been created backport/manual No power to the bots! Create your backport yourself! backport/v1.23 This PR should be backported to Gitea 1.23 labels Mar 28, 2025
@wxiaoguang wxiaoguang merged commit b542769 into go-gitea:main Mar 28, 2025
26 checks passed
@kerwin612 kerwin612 deleted the issues-page-toolbar-layout-adjust branch March 28, 2025 07:57
wxiaoguang added a commit that referenced this pull request Mar 28, 2025
…#34047)

And fix layout for mobile

Backport #33667 

Fix #33880

---------

Co-authored-by: Kerwin Bryant <[email protected]>
zjjhot added a commit to zjjhot/gitea that referenced this pull request Mar 31, 2025
* giteaofficial/main:
  [skip ci] Updated translations via Crowdin
  Add toggleClass function in dom.ts (go-gitea#34063)
  Add a config option to block "expensive" pages for anonymous users (go-gitea#34024)
  add additional ReplaceAll in pathsep to cater for different pathsep (go-gitea#34061)
  [skip ci] Updated translations via Crowdin
  enable staticcheck QFxxxx rules (go-gitea#34064)
  update to golangci-lint v2 (go-gitea#34054)
  Add descriptions for private repo public access settings and improve the UI (go-gitea#34057)
  Add anonymous access support for private/unlisted repositories (go-gitea#34051)
  Hide activity contributors, recent commits and code frequrency left tabs if there is no code permission (go-gitea#34053)
  Update action status badge layout (go-gitea#34018)
  Add anonymous access support for private repositories (backend) (go-gitea#33257)
  Simplify emoji rendering (go-gitea#34048)
  Adjust the layout of the toolbar on the Issues/Projects page (go-gitea#33667)
  Fix bug on downloading job logs (go-gitea#34041)
  Fix git client accessing renamed repo  (go-gitea#34034)
  Decouple Batch from git.Repository to simplify usage without requiring the creation of a Repository struct. (go-gitea#34001)
  fix org repo creation being limited by user limits (go-gitea#34030)
  Fix the issue with error message logging for the `check-attr` command on Windows OS. (go-gitea#34035)
  Try to fix check-attr bug (go-gitea#34029)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/done All backports for this PR have been created backport/manual No power to the bots! Create your backport yourself! backport/v1.23 This PR should be backported to Gitea 1.23 lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/frontend modifies/templates This PR modifies the template files
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Projects have too little space on mobile for titles
5 participants