edgafner / dorkag

Issue Tracker repository for all Dorkag plugins
Other
5 stars 0 forks source link

[IMPROVEMENT]: "Mark as viewed" from Source Editor #113

Open ursmeili opened 1 month ago

ursmeili commented 1 month ago

I often review files in the source editor, and not in the diff views. This is great, because I can also add comments and see what's changed with the magenta stripe.

However, I have no way of marking those files as "Mark as viewed", as I can do this in the "AZD pull requests" tool window: grafik

Maybe it would be possible to add a "Mark as viewed" option to the "Review mode" dropdown? grafik

But it only makes sense if I would also see that a file has been viewed already in the sourc editor. Maybe you can add a "mark as viewed" indicator to the "Review Mode" menu header?

Jonatha1983 commented 1 month ago

Hi @ursmeili

The blue dot next to each file is the indicator if the file was viewed or not. Under Settings >>version Control>> Azure DevOps you have checkbox to enable automatic mark as viewed when you open a diff of a PR.

Unfortunately Azure DevOps REST API doesn't expose this data and so this data is not in sync with what you seen on the Azure DevOps portal.

ursmeili commented 1 month ago

It's a pity this doesn't apply to files I view in the source code editor. If I view them in the source code editor, I have also "viewed" them, and it would be great if it would be marked as such.

Jonatha1983 commented 1 month ago

Do you mean that if the current local branch is the PR's source branch and you do a image

Jump to Source to the local file In this case, would you like the plugin to mark it as viewed?

ursmeili commented 1 month ago

Jump to Source to the local file In this case, would you like the plugin to mark it as viewed?

That's not the whole story. If I jump to another source e.g. by "Find Usings", I am also viewing this source. In fact I'd like to mark it as viewed as soon as I open a source code file in the source editor, regardless if it's opened explicitly by "Jump to source" or by any of the IDE's feature (find usings, find in files etc.)

Jonatha1983 commented 1 month ago

@ursmeili Yes but there must be a connection to the pr - if you go to a source that is not in the PR or is a different version from the one in the PR- you don't want to mark that as viewed

ursmeili commented 1 month ago

In fact, whenever I go to a source where the "review" dropdown is displayed, I want to mark it as viewed.

JG9 @.***> schrieb am Di., 10. Sept. 2024, 17:35:

@ursmeili https://github.com/ursmeili Yes but there must be a connection to the pr - if you go to a source that is not in the PR or is a different version from the one in the PR- you don't want to mark that as viewed

— Reply to this email directly, view it on GitHub https://github.com/edgafner/dorkag/issues/113#issuecomment-2341278409, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFTYRQW35E3CRLGPTQSSI7LZV4GSVAVCNFSM6AAAAABN57K6NCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNBRGI3TQNBQHE . You are receiving this because you were mentioned.Message ID: @.***>

Jonatha1983 commented 1 month ago

Sorry didn't get what do you mean

ursmeili commented 1 month ago

Here I'm opening a file in the source editor, the "review mode" item is shown. It should be marked as viewed for this PR, since I am actively viewing the file. Whether I opened it directly from the PR tool window, or e.g. by Ctrl+Shift+T (go to file), shouldn't matter grafik

Jonatha1983 commented 1 month ago

@ursmeili yes but only in case the current local branch is the source branch of the pull request and only if it is aligned with the latest changes.

Imagine I opened a PR from my branch named br1 and I want to merge it to main. The PR include a change I made of a 3 lines removed in a file: f.txt

Now you are on your branch br2 and you go to f.txt on your local branch you don't see the changes I made so there is no point in marking the file as viewed.

So your request is valid but it is a specific case which is currently not implemented and not supported, and it requires more thought.