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

Show outdated comments in files changed tab #24936

Merged

Conversation

sebastian-sauer
Copy link
Contributor

@sebastian-sauer sebastian-sauer commented May 25, 2023

If enabled show a clickable label in the comment. A click on the label opens the Conversation tab with the comment focussed - there you're able to view the old diff (or original diff the comment was created on).

Screenshots

image
image

When resolved and outdated:
image

Option to enable/disable this (stored in user settings - default is disabled):
image
image

fixes #24913

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label May 25, 2023
@pull-request-size pull-request-size bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label May 25, 2023
@sebastian-sauer sebastian-sauer force-pushed the feature/24913_show_outdated_comments branch from 88bf017 to f7be42e Compare May 25, 2023 19:18
@techknowlogick techknowlogick added the topic/ui Change the appearance of the Gitea UI label May 25, 2023
@sebastian-sauer
Copy link
Contributor Author

Thanks @silverwind i've changed the label and applied your suggestions. I've updated the screenshots to show the latest version.

@silverwind
Copy link
Member

I will restyle this a bit and then push those changes here.

@silverwind
Copy link
Member

After latest fixes:

Screenshot 2023-05-27 at 21 48 47 Screenshot 2023-05-27 at 21 49 09

Questions

  1. Do these comments auto-resolve or is it always a user action?
  2. I would use octicon-check for this as well, do you agree? I don't like this "warning" style icon when there's nothing really wrong.

@sebastian-sauer
Copy link
Contributor Author

Thanks - looks very good.
One thing:
image
A resolved and outdated comment looks "wrong" as those two texts are just concatenated.

Regarding icon - octicon-check is fine for me.

These comments don't resolve, as an outdated comment is not automatically resolved (when adding lines at the beginning of a file it's quite possible that multiple comments in the same file will be outdated as the commit sha of the line is different)

@silverwind
Copy link
Member

silverwind commented May 27, 2023

These comments don't resolve, as an outdated comment is not automatically resolved (when adding lines at the beginning of a file it's quite possible that multiple comments in the same file will be outdated as the commit sha of the line is different)

Okay, if it's always an concious action, we can restore the "Outdated" label again. Can you make it so the only difference between active and outdated comment is this label added after the text on the left side of that box?

And yes, please change to checkmark, as that checkmark is there to indicate the resolved state.

@sebastian-sauer
Copy link
Contributor Author

sebastian-sauer commented May 27, 2023

Do you mean like this:

image
(first is resolved and outdated, second is outdated but not resolved)

@silverwind
Copy link
Member

silverwind commented May 27, 2023

I think a unresolved but outdated comment should not have this full width header.

Can we remove it and instead put the "Outdated" label onto the first comment's header, left side of the "Review" label?

Screenshot 2023-05-27 at 22 12 23

This looses the ability to toggle, but I think it's more consistent to not have these toggleable.

@sebastian-sauer
Copy link
Contributor Author

sebastian-sauer commented May 27, 2023

Sounds good. But where should we put the Show original link in this case?
image

Just putting the link in front of the label doesn't look that good:
image

@silverwind
Copy link
Member

silverwind commented May 27, 2023

You could make the label itself an <a> tag and then maybe add a "Click to show original." sentence to this label only (please put a second translation string with both sentences).

@sebastian-sauer
Copy link
Contributor Author

sebastian-sauer commented May 27, 2023

image

image

@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 20, 2023
@lunny lunny added this to the 1.21.0 milestone Jun 21, 2023
@lunny lunny added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Jun 21, 2023
@GiteaBot
Copy link
Contributor

@sebastian-sauer please fix the merge conflicts. 🍵

@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Jun 21, 2023
@silverwind silverwind added the backport/v1.20 This PR should be backported to Gitea 1.20 label Jun 21, 2023
@silverwind silverwind added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Jun 21, 2023
@silverwind silverwind enabled auto-merge (squash) June 21, 2023 16:01
@silverwind silverwind merged commit 25455bc into go-gitea:main Jun 21, 2023
@GiteaBot
Copy link
Contributor

I was unable to create a backport for 1.20. @sebastian-sauer, please send one manually. 🍵

go run ./contrib/backport 24936
...  // fix git conflicts if any
go run ./contrib/backport --continue

@GiteaBot GiteaBot added backport/manual No power to the bots! Create your backport yourself! and removed reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. labels Jun 21, 2023
sebastian-sauer added a commit to sebastian-sauer/gitea that referenced this pull request Jun 21, 2023
Backport go-gitea#24936

If enabled show a clickable label in the comment. A click on the label
opens the Conversation tab with the comment focussed - there you're able
to view the old diff (or original diff the comment was created on).

**Screenshots**

![image](https://github.com/go-gitea/gitea/assets/1135157/63ab9571-a9ee-4900-9f02-94ab0095f9e7)

![image](https://github.com/go-gitea/gitea/assets/1135157/78f7c225-8d76-46f5-acfd-9b8aab988a6c)

When resolved and outdated:

![image](https://github.com/go-gitea/gitea/assets/1135157/6ece9ebd-c792-4aa5-9c35-628694e9d093)

Option to enable/disable this (stored in user settings - default is
disabled):

![image](https://github.com/go-gitea/gitea/assets/1135157/ed99dfe4-76dc-4c12-bd96-e7e62da50ab5)

![image](https://github.com/go-gitea/gitea/assets/1135157/e837a052-e92e-4a28-906d-9db5bacf93a6)

fixes go-gitea#24913

---------

Co-authored-by: silverwind <me@silverwind.io>
sebastian-sauer added a commit to sebastian-sauer/gitea that referenced this pull request Jun 21, 2023
Backport go-gitea#24936

If enabled show a clickable label in the comment. A click on the label
opens the Conversation tab with the comment focussed - there you're able
to view the old diff (or original diff the comment was created on).

**Screenshots**

![image](https://github.com/go-gitea/gitea/assets/1135157/63ab9571-a9ee-4900-9f02-94ab0095f9e7)

![image](https://github.com/go-gitea/gitea/assets/1135157/78f7c225-8d76-46f5-acfd-9b8aab988a6c)

When resolved and outdated:

![image](https://github.com/go-gitea/gitea/assets/1135157/6ece9ebd-c792-4aa5-9c35-628694e9d093)

Option to enable/disable this (stored in user settings - default is
disabled):

![image](https://github.com/go-gitea/gitea/assets/1135157/ed99dfe4-76dc-4c12-bd96-e7e62da50ab5)

![image](https://github.com/go-gitea/gitea/assets/1135157/e837a052-e92e-4a28-906d-9db5bacf93a6)

fixes go-gitea#24913

---------

Co-authored-by: silverwind <me@silverwind.io>
@sebastian-sauer
Copy link
Contributor Author

I was unable to create a backport for 1.20. @sebastian-sauer, please send one manually. 🍵

go run ./contrib/backport 24936
...  // fix git conflicts if any
go run ./contrib/backport --continue

Backport in #25428

@yardenshoham yardenshoham added the backport/done All backports for this PR have been created label Jun 21, 2023
silverwind added a commit to silverwind/gitea that referenced this pull request Jun 21, 2023
* origin/main: (47 commits)
  Move some regexp out of functions (go-gitea#25430)
  Show outdated comments in files changed tab (go-gitea#24936)
  Remove "CHARSET" config option for MySQL, always use "utf8mb4" (go-gitea#25413)
  Fine tune project board label colors and modal content background (go-gitea#25419)
  Fix missing commit message body when the message has leading newlines (go-gitea#25418)
  add python/poetry to devcontainer (go-gitea#25407)
  Refactor path & config system (go-gitea#25330)
  Add actor and status dropdowns to run list (go-gitea#25118)
  Use the new download domain replace the old (go-gitea#25405)
  Avoid polluting config file when "save" (go-gitea#25395)
  Fix dropdown icon layout on diff page (go-gitea#25397)
  Support configuration variables on Gitea Actions (go-gitea#24724)
  Substitute variables in path names of template repos too (go-gitea#25294)
  Navbar styling rework (go-gitea#25343)
  Fix blank dir message when uploading files from web editor (go-gitea#25391)
  Add git-lfs support to devcontainer (go-gitea#25385)
  Use qwtel.sqlite-viewer instead of alexcvzz.vscode-sqlite (go-gitea#25386)
  Use Actions git context instead of dynamically created buildkit one (go-gitea#25381)
  rename tributeValues to mentionValues (go-gitea#25375)
  Fix LDAP sync when Username Attribute is empty (go-gitea#25278)
  ...
6543 pushed a commit that referenced this pull request Jun 22, 2023
Backport #24936

If enabled show a clickable label in the comment. A click on the label
opens the Conversation tab with the comment focussed - there you're able
to view the old diff (or original diff the comment was created on).

**Screenshots**


![image](https://github.com/go-gitea/gitea/assets/1135157/63ab9571-a9ee-4900-9f02-94ab0095f9e7)


![image](https://github.com/go-gitea/gitea/assets/1135157/78f7c225-8d76-46f5-acfd-9b8aab988a6c)

When resolved and outdated:


![image](https://github.com/go-gitea/gitea/assets/1135157/6ece9ebd-c792-4aa5-9c35-628694e9d093)

Option to enable/disable this (stored in user settings - default is
disabled):


![image](https://github.com/go-gitea/gitea/assets/1135157/ed99dfe4-76dc-4c12-bd96-e7e62da50ab5)


![image](https://github.com/go-gitea/gitea/assets/1135157/e837a052-e92e-4a28-906d-9db5bacf93a6)

fixes #24913

Co-authored-by: silverwind <me@silverwind.io>
@sebastian-sauer sebastian-sauer deleted the feature/24913_show_outdated_comments branch July 9, 2023 19:35
@nikola-suljagic
Copy link

Please tell me is this feature ("show outdated comments") available?
image
Because I still don't see this option

@lunny
Copy link
Member

lunny commented Aug 9, 2023

Only for 1.21 which is not released yet.

@nikola-suljagic
Copy link

Thanks for fast reply !

@go-gitea go-gitea locked as resolved and limited conversation to collaborators Sep 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport/done All backports for this PR have been created backport/manual No power to the bots! Create your backport yourself! backport/v1.20 This PR should be backported to Gitea 1.20 lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. topic/ui Change the appearance of the Gitea UI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add option to show outdated review comments
8 participants