Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Misc icon tweaks, relax lint rules#36046

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
silverwind wants to merge18 commits intogo-gitea:main
base:main
Choose a base branch
Loading
fromsilverwind:icons

Conversation

@silverwind
Copy link
Member

@silverwindsilverwind commentedNov 27, 2025
edited
Loading

  1. Useocticon-repo-locked to indicate private repos, also visible on the repo header now
  2. Useocticon-repo-forked to indicate forked repos
  3. Fix pull icons on pulse page
  4. Remove "gold" color from private icons, we have been removing this color on frontpage repolist, so now the rest of the UI is also consistent. Also remove the now-unused gold color.
Screenshot 2025-11-28 at 00 50 42
Screenshot 2025-11-28 at 00 45 21
Screenshot 2025-11-28 at 00 38 53
Screenshot 2025-11-28 at 00 36 34
Screenshot 2025-11-28 at 00 36 25

@GiteaBotGiteaBot added the lgtm/need 2This PR needs two approvals by maintainers to be considered for merging. labelNov 27, 2025
@github-actionsgithub-actionsbot added modifies/templatesThis PR modifies the template files modifies/frontend labelsNov 27, 2025
@GiteaBotGiteaBot added lgtm/need 1This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2This PR needs two approvals by maintainers to be considered for merging. labelsNov 28, 2025
@github-actionsgithub-actionsbot added the modifies/goPull requests that update Go code labelNov 28, 2025
@silverwind
Copy link
MemberAuthor

Regardingocticon-repo-locked: I'm not sure it's actually right. I checked GH and they do not use it for the purpose of private repos at all. All they do is show aocticon-lock besides repo names in some places. So I think I will revert this change.

@github-actionsgithub-actionsbot removed the modifies/goPull requests that update Go code labelNov 28, 2025
@silverwind
Copy link
MemberAuthor

silverwind commentedNov 28, 2025
edited
Loading

Regardingocticon-repo-locked: I'm not sure it's actually right. I checked GH and they do not use it for the purpose of private repos at all. All they do is show aocticon-lock besides repo names in some places. So I think I will revert this change.

Maybe this icon is actually fine. I think a repo book icon with a padlock is better than a padlock only. We do not have a "locked" state yet for repos, so this icon is unambiguous too.

@silverwind
Copy link
MemberAuthor

One more minor change,ShowRepoAvatar is now enabled in repo lists, meaning they will render the repo avatar. This affects at least the explore repo list and org repo list.

@lunny
Copy link
Member

A repository can fall into several state groups:

  • Group 1: IsMirror, IsFork, IsRegular
  • Group 2: IsTemplate
  • Group 3: Public, Private

We can add icons for the states in Group 1, and use text labels for the other groups to maintain consistency and avoid visual conflicts.

@silverwind
Copy link
MemberAuthor

Sounds like a plan, I will try that.

@silverwindsilverwind marked this pull request as draftDecember 1, 2025 13:24
@silverwind
Copy link
MemberAuthor

Applied that logic, so there is only 3 states of the repo icon now.

Also, I disabled lint rules that forbid "else-return" constructs. I find those just annoying because they forbid code like this and fixing it breaks the symmetry of the block which looks ugly.

}else{return'octicon-repo';}

@silverwindsilverwind changed the titleMisc icon tweaksMisc icon tweaks, relax lint rulesDec 4, 2025
Signed-off-by: silverwind <me@silverwind.io>
@silverwindsilverwind marked this pull request as ready for reviewDecember 4, 2025 20:54
@silverwind
Copy link
MemberAuthor

Ready now, I think it's a good cleanup and now all repo icons are the same everywhere.

{{else}}
<spanclass="icon">{{svg"octicon-repo"}}</span>
{{end}}
{{template"repo/icon" (dict"Repo" $repo"Size"16)}}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

It's better to have labels(private, template & etc.) for this repository

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

You mean adding labels in this specific place (and below)?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I mean, it appears that the labels are only shown on the repository detail page. They could also be displayed on the list page, but I’m not sure whether we should enable that.

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

In lists we can add them, yes.

{{else}}
{{svg"octicon-repo"}}
{{end}}
{{template"repo/icon" (dict"Repo" ."Size"16)}}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Same as the above

@GiteaBotGiteaBot added lgtm/doneThis PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1This PR needs approval from one additional maintainer to be merged. labelsDec 5, 2025
{{else if $repo.IsMirror}}
<spanclass="icon">{{svg"octicon-mirror"}}</span>
{{else if $repo.IsTemplate}}
<spanclass="icon">{{svg"octicon-repo-template"}}</span>
Copy link
Contributor

@wxiaoguangwxiaoguangDec 5, 2025
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

IsTemplate is missing inicon.tmpl

If intentionally, should the comment#36046 (comment) be added to the template code? ps: I don't understand whyIsTemplate is in a separate "group".

Copy link
Member

@lunnylunnyDec 5, 2025
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Both mirror repositories and regular repositories(public or private) could be template repositories.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

If intentionally, should the comment#36046 (comment) be added to the template code? ps: I don't understand why IsTemplate is in a separate "group".

If intentionally, should the comment#36046 (comment) be added to the template code?

Copy link
MemberAuthor

@silverwindsilverwindDec 6, 2025
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I can add it. And yes I've implemented that only group 1 is represented with the icon, all other groups are represented with tags in places that have enough room to display them (not on frontpage repo list).

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Thought maybe we should make an exception for templates. I think it's highly unlikely that a repo is both a mirror and a template, so I guess showing a template icon in such a case would make more sense.

@wxiaoguangwxiaoguang marked this pull request as draftDecember 12, 2025 03:06
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@lunnylunnylunny approved these changes

@wxiaoguangwxiaoguangwxiaoguang left review comments

@delvhdelvhdelvh approved these changes

Assignees

No one assigned

Labels

lgtm/doneThis PR has enough approvals to get merged. There are no important open reservations anymore.modifies/frontendmodifies/internalmodifies/templatesThis PR modifies the template filestopic/code-linting

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

5 participants

@silverwind@lunny@wxiaoguang@delvh@GiteaBot

[8]ページ先頭

©2009-2025 Movatter.jp