-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Conversation
CirnoT
commented
Jun 15, 2020
•
edited
Loading
edited
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. |
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> |
There was a problem hiding this comment.
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
?
There was a problem hiding this comment.
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.
I think multiple icons or lables are better. The repositories could be private or not, template or not, archive or not, forked or not. Or keep private and fork as icons but template and archive as lables. |
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 |
Current variations should be: [Private template] [Archived] (Fork/Mirror icon) -- They can freely mix and match between these 3 sets, eg. |
ping lg-tm |
* 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>
* 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>
* 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>