-
-
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
Display issue task list on project cards #27865
Conversation
The icon/text spacing in that screenshot looks a bit odd, but not the fault of this PR of course. |
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.
Could maybe share a new subtemplate with issue list, otherwise LGTM.
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.
We should refactor this issue card to use "flex-text", but it is out of scope for this PR
{{$tasks := .GetTasks}} | ||
{{if gt $tasks 0}} | ||
<div class="meta gt-my-2"> | ||
{{svg "octicon-checklist" 16 "gt-mr-2 gt-vm"}} | ||
<span class="gt-vm">{{.GetTasksDone}} / {{$tasks}}</span> | ||
</div> | ||
{{end}} |
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.
Can we perhaps extract a subtemplate instead of manually adding it each time?
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.
"each time"?
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.
issue/PR list, milestones, projects, …
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.
They already share a template (besides projects now). I have little frontend knowledge, someone else must create a subtemplate which works in all places.
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.
When the HTML content is the same it's trivial to extract a subtemplate, e.g. cut-paste into new file and add {{template "file"}}
in place.
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.
Sure, but the classes are totally different.
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.
Ideally make classes the same, but we can do later I guess then.
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.
Same as @silverwind
* upstream/main: Refactor Find Sources and fix bug when view a user who belongs to an unactive auth source (go-gitea#27798) [skip ci] Updated translations via Crowdin Add `Hide/Show all checks` button to commit status check (go-gitea#26284) Fix http protocol auth (go-gitea#27875) Display issue task list on project cards (go-gitea#27865) Reduce margin/padding on flex-list items and divider (go-gitea#27872)
Display the issue task list on project cards. ![grafik](https://github.com/go-gitea/gitea/assets/1666336/e6cb3196-8980-403c-9795-3a7b03fbfb3c) Co-authored-by: Giteabot <teabot@gitea.io>
Display the issue task list on project cards.