-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
[UI] Group Label Changed Comments in timeline #13268
Comments
☝️ as gh does it too :) - save space |
Mind if I take this? It'd be good if I can get some pointers too, but I think I can figure it out on my own |
I've gone into the translation and added |
You should probably figure out the overal design/plan first if you have questions as "some sort of macro" would be the entire problem to solve here -- golang template loops are super limited to just range unfortunately and our design currently is based on ranging one entry at a time inside template which makes this problem more annoying than it should be : ( |
I'm thinking having the loop over the labels on the function that actually calls the template, then this way we avoid looping inside the template.
|
The template loops over ever single "comment" entry for an issue, some of which will be "xx added y label" type comments" and they are all stored as individual comment entries in the db. there is no individual label loop |
Oh no that isn't what I meant, I meant that before we pass the comments along to the template, we find the labels that were added at the same time and group them together into one "comment". Seems like the most feasible option to me.
|
Okay, so here's what I'm doing:
What do you think? |
Also, I think this might mess with the translations, should I add a new translation string? Since non-up-to-date translations will have the HTML for the label, which will now be inserted with a function. |
@pta2002 Yes, please. |
Should I add a "Labels" field to the Comment model? So something like: type Comment struct {
...
Labels []*Label
...
} |
This comment has been minimized.
This comment has been minimized.
How'd this work? Something like this wouldn't filter out the other label comments from getting passed into the view.
|
I'm trying to check how the "removed" comments work, but as far as I can tell it checks for the |
it puts a 1 in the comment field if it was added, nothing if it was deleted so you could check with if comment.Content {
/*added*/ } else {
/* deleted */
} |
Hmm in the end adding a |
Closed since #13304 merged. |
group label changes witch are only 1-2sec away from each other ...
at the moment:
with proposed feature:
The text was updated successfully, but these errors were encountered: