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

Use label to describe repository type #11891

Merged
merged 12 commits into from
Jun 22, 2020

Conversation

CirnoT
Copy link
Contributor

@CirnoT CirnoT commented Jun 15, 2020

chrome_2020-06-15_14-45-46
chrome_2020-06-15_15-17-28
chrome_2020-06-15_15-17-40
chrome_2020-06-15_15-17-53
chrome_2020-06-15_15-18-18

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jun 15, 2020
@CirnoT CirnoT marked this pull request as draft June 15, 2020 12:24
@CirnoT CirnoT changed the title Use label instead of icon to describe repository type when repo avatar is set Use label describe repository type Jun 15, 2020
@CirnoT
Copy link
Contributor Author

CirnoT commented Jun 15, 2020

Reworked this now to do it everywhere. This should now follow GH style more closely, which we kind of must do in some places because we're using octicons and have to go around some missing icons.

Together with #11895 we should now be good to safely use octicons v2 as per #11889 without any ill-effect of losing certain information.

Additionally this PR resolves the issue whereas templates where not marked on explore page at all.

@CirnoT CirnoT marked this pull request as ready for review June 15, 2020 13:27
@CirnoT CirnoT mentioned this pull request Jun 15, 2020
@CirnoT CirnoT changed the title Use label describe repository type Use label to describe repository type Jun 15, 2020
@CirnoT
Copy link
Contributor Author

CirnoT commented Jun 15, 2020

A slight note is that this does not touch dashboard with repository list so that would be one place where private template is not marked after octicons v2.

The text on dashboard is generated dynamically client-side and we can't use translations there for label, nor it would look very well on such small space.

{{if .IsArchived}}<span class="ui compact label">{{$.i18n.Tr "repo.desc.archived"}}</span>{{end}}
{{if .IsTemplate}}
{{if .IsPrivate}}
<span class="ui basic label">{{$.i18n.Tr "repo.desc.private_template"}}</span>
Copy link
Member

Choose a reason for hiding this comment

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

Why not render 2 labels? E.g. private template?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Takes more space and looks weird imho, makes unnecessary distinction with a visible margin and usually user is interested in content of both, not separately.

@techknowlogick techknowlogick added the topic/ui Change the appearance of the Gitea UI label Jun 15, 2020
@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 Jun 17, 2020
@lafriks lafriks added this to the 1.13.0 milestone Jun 17, 2020
@lunny
Copy link
Member

lunny commented Jun 18, 2020

I think multiple icons or lables are better.

The repositories could be private or not, template or not, archive or not, forked or not.
If a private template repository is a fork and has been archived, it will display 4 icons or lables.

Or keep private and fork as icons but template and archive as lables.

@CirnoT
Copy link
Contributor Author

CirnoT commented Jun 18, 2020

Fork and mirror icon is kept, ideally in future we would display where repo is forked/mirrored from right on the explore page, like we do on repo header itself. We could then move mirror/fork icon along with source link to second line.

Archive has its own separate label with slightly different styling (check screenshots); not shown on screenshots is the fact that it is completely separate from other labels

@CirnoT
Copy link
Contributor Author

CirnoT commented Jun 18, 2020

Current variations should be:

[Private template]
[Template]
[Private]
[Internal]
[Internal template]

[Archived]

(Fork/Mirror icon)

--

They can freely mix and match between these 3 sets, eg.
[Internal template] [Archived] (Fork icon)
or
[Private] (Mirror icon)

@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 Jun 22, 2020
@techknowlogick
Copy link
Member

ping lg-tm

@techknowlogick techknowlogick merged commit d9aa007 into go-gitea:master Jun 22, 2020
@CirnoT CirnoT deleted the repo-av-label branch June 22, 2020 20:45
CirnoT added a commit to CirnoT/gitea that referenced this pull request Jun 22, 2020
lafriks pushed a commit that referenced this pull request Jun 26, 2020
* Add org avatar on top of internal repo icon

* add color for arc-green

* use wrapper div to avoid negative margins

* rename class and move div

* move div to icon tmpl

* remove unnecessary margin for lock octicon

* fix label align together with #11891

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
ydelafollye pushed a commit to ydelafollye/gitea that referenced this pull request Jul 31, 2020
* Use label instead of icon to describe repository type when repo avatar is set

* header_icon is not longer duplicated; move out of separate template

* handle archived case too

* use everywhere

* public template -> template

* bring back separate icon in better form

* definitely was overthinking this

* 32

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
ydelafollye pushed a commit to ydelafollye/gitea that referenced this pull request Jul 31, 2020
* Add org avatar on top of internal repo icon

* add color for arc-green

* use wrapper div to avoid negative margins

* rename class and move div

* move div to icon tmpl

* remove unnecessary margin for lock octicon

* fix label align together with go-gitea#11891

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
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. topic/ui Change the appearance of the Gitea UI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants