jbauer opened 2 years ago
|
|||||
OneDev changed state to 'Closed' 2 years ago
|
|||||
State changed as code fixing the issue is committed |
|||||
OneDev changed state to 'Released' 2 years ago
|
|||||
State changed as build #2673 is successful |
|||||
jbauer changed state to 'Open' 2 years ago
|
|||||
Thanks for the quick update! I updated OneDev and opened a large pull request and try to review it. I think it is still not optimal. Here are some observations: 1.) OneDev always opens the "all files" view which is pretty slow. The PR has 40 files now (displaying 37 of them), with lengthly changes within files and the browser tab is barely usable (Mac, Safari). It feels pretty sluggish until you are able to hit the "one by one" link. For example when the "all files" view is open and has been rendered, it takes 1-2 seconds for mouse over effects to get rendered. 2.) During review I wanted to switch to a specific file in a new browser tab because the current file under review called code in the other file. I noticed that the file list itself is gone in 7.1.7 and it was pretty annoying to open a specific file in the PR (manually open a new tab and then hit multiple times 'next' to find the correct file). 3.) A file list also helps to quickly get an overview about the files changed. This gives you a first impression how large a PR is, which packages have been touched, you might even think something like "Eh, why has this file being changed for that PR, that's weird". Without a file list it is also not possible to start reviewing on a specific file / package because sometimes you review files in a specific order which is not alphabetically. So without a file list I felt a bit lost in the beginning. So some improvements could be: 1.) OneDev should automatically switch to the "one-by-one" mode if too many file changes have been detected. In my PR are 37 of 40 files visible and it feels too much, so maybe reducing the limit might be worth as well. 2.) Both modes "all files" / "one-by-one" should display a file list. In "all files" it can be used to scroll to a specific file and in "one-by-one" it can be used to jump to a specific file. In both modes it can be used to open a new browser tab for a specific file, so you can more easily view multiple, specific files. 3.) This is optional but might be a nice user experience: If we have a file list, then in the "all files" mode it might be worth thinking about having a sticky header containing a dropdown component to jump to a specific file. That way you can always access the file list, even when having scrolled down a lot. Instead of a sticky header using HTML anchors might also be possible. That means you have one anchor per file so you can scroll to that file and a "back to file list" link somewhere which scrolls back to the top file list. This would also be useable with browser back/forward buttons and can integrate nicely with computer mice having back/forward buttons. Github currently tests a file tree on the left side and each file has it's own anchor (for example https://github.com/gradle/gradle/pull/20687/files). If you click through some files in the tree, you can move back and forward using browser/mice buttons. Personally I think the "all files" view is nice for very small pull requests because you can quickly go through them. Maybe up to 10 files or a total of XXXX changed lines (whichever comes first). For all other cases I prefer seeing files one by one to have a snappy UI and having a UI control to jump between any file in the PR quickly (and possibly open them in new browser tabs). |
|||||
Thanks for the suggestion. Maybe adding a cookie to remember the "show all files" vs "one by one" is better, as switching mode dynamically may cause confusions. Also the file list is already available. Just click on the |
|||||
Or remove the "all files" view (even if it hurts very small pull requests a bit) and make the "one-by-one" view very good, given that it has best performance in all cases. That would also simplify your code and new features must not be applied to two views in possibly different ways. I used Gerrit Code Review quite a bit and never had the feeling it was unpleasant to use. Even though they have two dedicated views (file list only / file diff) it was easy to use and to navigate. Probably because the UI is pretty fast and works well with browser back/forward. I usually had one tab open with the file list view and another tab open where I stepped through file diffs using prev/next. Using the first tab I could easily open any file if needed and use that file while reviewing in the second tab. Would have been nice to access the file list view from within the file diff view, but maybe they will provide it one day. If you really want to keep both modes, then a cookie is a good start. But a setting which defines the default view would also be nice.
The If I view |
|||||
The filter gives you an overview on what has been changed. You may select a specific folder or specify a certain file pattern ( I am curious why you want to open File B while reviewing File A. Is it because some changes in File A make you believe that File B may also be affected, and you want to check that further? In this case, you can simply input File B in the filter (no need to drill into folder), and OneDev will show if that file is changed, and if yes, you can hit Enter to show File B, and then hit browser back button to go back to File A. You may also open a new tab to do this. |
|||||
OneDev originally shows a flat change list, but our internal users find that it is often hard to find which sub system is affected, as different reviewer may only need to review interested files. |
|||||
Yes kind of. Usually when File A uses File B and either both files are new or File B has been changed (method added, changed). Then I want to know what exactly that method in File B does if method naming isn't perfect and/or I don't know that method at all. Or if that method handles null input correctly if File A suddenly can pass null into it. Things like that. Basically some quick cross file checks to better understand and verify changes in File A.
Didn't know I could enter the file name directly. That makes it a bit quicker but when I hit ENTER only the input box is filled. Then I have to hit ENTER again to actually apply the filter. Ok I can live with that. However when in "one-by-one" mode and applying a filter, then I only see a String showing the full path of the file I have entered in the filter box and the link "show all files". Now I have to click the "show all files" link again to actually see the file. So switching to a different file via the filter is a bit inconvenient in "one-by-one" mode. Maybe the UI should automatically and always be in "all files" mode when applying a filter? However that would also mean that when I manually remove/clear the filter I would expect to be in "one-by-one" mode again (with the correct file) since that is where I started (this would happen naturally when using back button in browser). However with the above knowledge, I could open two tabs now, one in "all files" mode for using the filter box and one in "one-by-one" mode to actually review. HOWEVER given that the "all files" view only shows 37 of 40 files there are situation where the filter simply does not show any files. For example from these 40 files there is one What I dislike using the filter input box approach during a review is that I have to switch between mouse and keyboard often. Maybe it is just a habit but it feels more comfortable if you can work through files using mouse only because you only read and sometimes write a comment. Coming from Gerrit it was very easy to do so. Clicking a link with the mouse wheel opens the link in a new tab, back/forward buttons on the mouse and switching tab using the mouse. So everything was doable with just reading code and navigating using the mouse. Now I have to switch do keyboard more often which feels more complicated.
I see. But if your internal users now use the filter box to achieve that, couldn't they have used the filter box before as well? I mean once I enter a filter, the flat list of files would be filtered as well, wouldn't they? So they would see a flat list of files they are interested in. Now that list is gone completely and you may see these files in the filter box. |
|||||
You do not need to press ENTER twice, just input partial path of the file you want to open, and hit tab to complete it, followed by a ENTER to show it (check the hint at bottom of the filter dropdown). It is actually an auto-completion system helping you write patterns (the full path is treated as a pattern without wildcards). The nothing being displayed in one-by-one mode when re-filtering is a bug, it should reset to show first matching file in this case. Alternatively you can also hover mouse over method in question in the diff view, and OneDev will prompt possible definitions of that method, so that you can go to the method definition directly.
The pattern
Most of the time, we click on the filter box, and it shows which top folders are changed, and then select the top folder and click the search button to show changes under that folder, or go down the folder to select relevant sub folders to show changes. Occasionally we input some negative patterns to filter off certain files, for instance html templates, css files etc.
Actually our users use the flat file list vary rarely, as it only serves the purpose of jumping between files. As mentioned earlier, our review workflow is normally select a subset of changes, and get them reviewed. Also the large change set not being fully shown issue can often be solved by reviewing a subset of changes each time. If we want to check some other file, we simply find that file with filter again. Also even if I can filter the flat file list, it may not suffice our users, as it can not aggregate changes into a top down hierarchy to instantly get an idea of what subsystem is changed. |
|||||
Oh right, that makes it a bit easier
Hm yes, but OneDev then jumps into the commit UI and I loose information wether or not it has been added/changed in this PR (no diff coloring) and I should not write a code comment in that view because it is not attached to the pull request code comments. But it helps to see the implementation of the method. While testing it, I noticed a minor inconvenience in the popup showing method definitions: When clicking the link using the middle mouse button / mouse wheel then the browser still loads the new page in the same tab instead of opening a new tab. I assume the link has some javascript attached which does the page loading. Maybe check explicitly for the left mouse button.
Interesting. Then missing consistency has confused me. When I type Shouldn't both act the same for consistency? Basically I thought the content of the filter box popup acts as a preview of what the UI would show once the pattern is applied. But that is currently not the case.
Always interesting to see different approaches. After updating OneDev my coworkers directly asked where the file list can be seen 😃 Anyways after this discussion I would come up with the following improvements:
Suggestions to think about as a compromise between your way of working and other people:
These are just two ideas how to bring two different workflows closer together. I kind of like 2. but it is probably also the most work to get a prototype going to see how it feels. |
|||||
Will improve the filter to get consistent experience. As to display file list first in both suggestions, it complicates review process for major pull requests which are small (at least at our side) and file filtering is not necessary at all. Current mechanism is an evolvement of our own review process to make simple things simple, and complicate things possible. Nevertheless, I will think about your ideas for next iteration of review workflow. Thanks for all the ideas, 👍 |
|||||
Robin Shen changed state to 'Closed' 2 years ago
|
|||||
Robin Shen changed state to 'Open' 2 years ago
|
|||||
Robin Shen referenced from other issue 2 years ago
|
|||||
OneDev changed state to 'Closed' 2 years ago
|
|||||
State changed as code fixing the issue is committed |
Type |
Improvement
|
Priority |
Normal
|
Assignee |
When a pull request has some more files (no idea about the concrete limit) then OneDev displays "Sorry we are unable to display all files as there are too many".
This is quite unfortunate if you have branch protection enabled, a pull request review is required but you do not see all changes in the PR.
Maybe instead of showing the above warning it would be possible to simply render a different UI which renders file changes incrementally. For example instead of showing all file changes right away only the list of files could be shown. Then the reviewer has to open a file (open/close panel, collapse panel) and changes will be rendered to the UI for that file only. That way the UI would naturally render itself incrementally because the reviewer goes through the files one by one, opens them and thus trigger the rendering.
Alternatively the UI could be like in Gerrit which always only renders a list of changed files. You have to click a file and then end up on a new page showing the changes. On the top right there are links to switch to the previous or next file. See https://gerrit-review.googlesource.com/c/gerrit/+/336589 for example.
From my experience Gerrit can handle a lot of files with their UI. See https://gwt-review.googlesource.com/c/gwt/+/23760 for example.