By GitLab %11.0 we will have markdown previews, CI traces, Git commits and maybe a web terminal. The current panels and workflows won't scale to support this. We should start to immediately make improvements to existing interfaces and have a plan for how the workflow will eventually work.
Proposal
Design workflow that will support viewing source, traces, and terminal simultaneously
Review workflow for committing changes while traces and terminal are visible
Consider splitting commit workflow into distinct area
Design
Most of the design is already in. This design now mostly defines how to display the secondary information right sidebar!
Reusing header design of the left and also boldened so we align it with other headers throughout the interface (also updated left sidebar headers)
@dimitrieh a sketch based on this mornings Web IDE discussion:
Your suggestion to split the commit interface out feels quite a natural, and I like how it removes the file list from the commit view which is not really relevant and consumes a lot of space. It also solves the problem of what to do with possibly open CI trace and web terminal.
An alternative approach could be automatically collapse the file tree when the commit panel is open. But it raises the question of what to do with the traces and terminal. We should probably explore both options as wireframes before settling on one.
One way to things would be to only permit one secondary view to be open at a time, where the commit panel, job traces and web terminal would all be treated as a secondary view.
But, I really like the idea of finding a way to make the file tree disappear when review diffs and making a commit. I suppose it could automatically collapse? But I feel like that is more distracting than just completely changing modes.
@dimitrieh it struck me that one of the other aspects I like about have the commit panel on the left is that it means file lists are always on the left.
Tree list is a list of all files
Commit panel is a flat lists of files (with options beneath)
The sketch below uses a tab bar at the top of the list to toggle between All (normal file list) and Changes which is the commit panel.
I'm not sure about the always present Commit button a I drew at the bottom, but I thought it might help people familiar with Git work out what was going on.
Summarizing progress, we are focussing on a three column layout:
┌────────────────────────────┐│┌─────┐┌────────────┐┌─────┐│││ ││ ││ ││││ A ││ B ││ C ││││ ││ ││ │││└─────┘└────────────┘└─────┘│└────────────────────────────┘
Left column (A) - project name/icon (context) and editor state, always shown
Central column (B) - primary area where project content is shown, always shown
Right column (C) - secondary information (project level), contextual and collapsable - e.g. CI traces, web terminal etc
IDE modes of use
The distinct modes of use we are currently considering are:
Edit: a user is trying to make a change to the project. This task might be supported by looking at a failed CI trace, verifying the changes using a web terminal, reviewing the description/discussion in an issue/merge request.
Review: a user is seeking to understand their changes in the context of the entire project. Is the scope of them sufficient? Has the broader context been considered? This task requires diffs, and access to the entirety of any file in the project. The review stage may in fact be two distinct stages:
reviewing local changes not yet committed
reviewing the entire set of changes of a merge request
Commit: a user is reviewing the immediately changes with the intention of selecting all or a subset of the changes to be committed as a unit, and writing a commit message describing what was changed and why it needed to be changed.
Left column
Currently always file tree. When committing, a change there is significant duplication if the file list, unstages changes, and staged changes are shown simultaneously. A single file could be visible in three lists, two of which will describe the same state.
We are exploring using the left column to describe and change the mode of the editor.
How might the left column handle switching between the three modes: edit, review, commit?
What information would the left column contain in each mode?
edit: file list, changed/added files are highlighted
review: file list, changed/added/deleted files are highlighted, maybe possible to switch between local changes, local + mr changes (if in context of MR)
commit: unstaged/staged file lists with commit input box, options to create new branch/merge request
Center column
Currently this is where the content of files is shown, with a tab bar at the top. Only one file can be shown, but a secondary preview is supported.
How would the file specific secondary information work for:
regex railroad: a visual preview of the specific regex selected by the caret, typically horizontal
CI pipeline diagram: a visual preview of the entire file, likely horizontal
markdown preview: a visual preview of the entire file, typically vertical
linting errors: textual feedback of the code selected by the caret
Complex example: a markdown file with a Javascript code block with a regexp. The markdown should be rendered. When I move the caret to the regexp I should see regex railroad and JS linting feedback.
Right column
Currently this is the commit panel.
In the current proposal, it provide access to project level secondary information including:
CI trace
Web terminal
(idea) Issue description/comments
(idea) Merge request description/comments
(idea) Snippets
Each of these are information heavy, and in some cases interactive (web terminal: running commands, snippets: creating/editing/inserting a snippet).
Should we initially allow multiple secondary information of different types to be open simultaneously? For example web terminal and CI trace side by side?
Should we initially allow multiple secondary information of the same types to be open simultaneously? For example two different CI traces, or thee different web terminals (gdk run app, gdk run db, and rails console)
Only "changes" icons (no longer means staged/unstaged)
Commit:
Only available if comparing "Changes", in compare mode between branches or later commits (merge request review) commit panel is hidden and not available
Only 1 file viewable at a time
Future: Preferably want to view only excerpts of changed files (long files will only show sections)
@sarrahvesselov this is still in development. There are some nuances still left to be figured out. Tomorrow we will have the next meeting on this in order to make short term final decisions.
edit opens a dropdown similar to what we currently have to switch between the 2 diff review modes
edit dissappears when the ide has not opened from a merge request
Default review mode (latest changes)
Merge request review mode
This mode opens automatically if opened from a merge request
Commit mode
unstaged and staged icons are introduced
only 1 file can be opened at the same time
opens by default the file you had last open in edit/review mode (@jramsay I think we could iterate on this with a general all files diff blob view similar as in vscode/atom, when no files are selected)
How are we looking here @dimitrieh? Do you think we can get this completed in 10.8 along with your other assigned issues or do we need to push this off further? Please be frank about your time, don't try to do more than you can handle.
@sarrahvesselov I expect to finish this Friday and/or else at the latest next week. I will see @jramsay this week in the Netherlands in person, so the idea is to do some quick back and forths to finalize the last bits of this design, mainly for the secondary information panel (ci/terminal/etc). The essentials for 10.8 were already figured out
@jramsay as discussed here is the result of our discussions
We are going for a short-term design solution for the right sidebar for secondary information like terminal/logs etc. Short-term is a bit vague here, with this is meant we are choosing for a simpler solution without difficult (multi)window management which we do need in the immediate future. Also, we'll be reusing existing UI from the left for the right. We can adjust from there.
For documentation purposes, I'll leave some non-expanded screenshots of WIP mockups:
@dimitrieh I'd like to resolve the header of the tab a bit more. In those concepts there are quite a few different styles shown. I think the header should be consistent.
The only area that feels a little funny to me is the terminal. There is a white frame around it that is not present on the other sidebar. I understand why you did it @dimitrieh but I am wondering if it needs to go all the way around. It may make more sense for it to only exist on the side with the tab. I hope that makes sense!
Done, updated description! This issue can essentially be closed.
Thanks @dimitrieh. I will leave it up to @jramsay whether he wants to move the designs to a new issue or simply roll this over to another milestone for development.