Let users choose the views in each task layout

オープン
#17,519 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
5/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
typescript
領域
frontend

調査の方向性

This is design-heavy UI work across the primary side bar, secondary side bar and bottom panel, behind the workbench.experimental.uiRevamp setting, and it is blocked by #17517. Start from the Figma layout popover designs and the dhruvi/ui-revamp-spike mockup, which the issue says must be redesigned rather than reused. Done would mean the popover lists every view with pills, hides and restores views per saved layout, and supports drag and undo, but the open questions on keyboard grouping and default hidden views still need answers first.

索引モデルが issue の本文から書いたものです。

説明

area: ui usability

Part of #17419. Behind workbench.experimental.uiRevamp.

Blocked by #17517 (task layouts).

Terms

  • Area: the primary side bar (left), the secondary side bar (right), or the bottom panel.
  • View: one piece of content with its own title, like Explorer, Console, or Variables.
  • View group: one or more views that open together. A view group has one icon in the activity bar, or one tab in the secondary side bar or the bottom panel. For example, the Session view group holds the Console, Variables, Plots, and Terminal views. VS Code calls a view group a view container.
  • Hidden view: a view that a layout leaves out. In that layout, a hidden view has no activity bar icon, no tab, and no place in its view group.
  • Layout popover: the popover that opens from the Layout button in the title bar.
  • Layout card: a button in the layout popover for one layout. Each layout card has a layout picture, a small drawing of the window in that layout.
  • Area section: the part of the layout popover that lists the views in one area.
  • Pill: a button in an area section for one view.

Summary

Add a layout popover where users change the task layouts. In the layout popover, users can hide a view in a layout, and bring a hidden view back. Users can drag a view to a different area, or into a different view group. Each layout remembers its own changes, so changes to the Data Analysis layout do not change the Notebook layout.

Designs: Layout Popover page in Figma

Why

Task layouts start each kind of work with the views that work needs in front. Users still have their own preferences, and a task layout will not suit every user as it ships.

The layout popover shows the user what each layout includes. The user can change a layout, and put a layout back to how it started. A hidden view is still listed in the layout popover, one click away.

Layout cards

  • The layout popover shows one layout card for each layout.
  • The current layout's picture shows the window as it is right now, including changes the user made. Every other layout picture shows that layout as the user saved it.
  • Clicking a layout card applies that layout, with the changes the user saved for that layout.
  • Layout changes are saved per user, not per folder. A user's changes to a layout follow that user to every folder and window.
  • After the user changes the current layout, the layout popover header says so and shows a Reset link. Only the Reset link puts a layout back to its starting views.

Hiding views in a layout

  • A task layout can start with some views hidden. The Default layout never hides a view.
  • The user can hide a view in a layout, and bring a hidden view back.
  • Hiding a view leaves the other views in the same order. Bringing a hidden view back puts it in the spot it was in.
  • Each layout keeps its own order. A layout never reorders activity bar icons, tabs, or views on its own. When the user reorders activity bar icons, tabs, or views in one layout, only that layout changes.
  • When a feature opens a hidden view on its own, like the Viewer while an app runs, the view still appears. When the user closes that view, the view goes away again.

Pills

  • Every view has a pill, in the area section for the area where the view lives. Hidden views have pills too.
  • A blue pill means the current layout includes that view. A plain pill means the view is hidden in the current layout.
  • Clicking a pill hides the view, or brings the hidden view back. The pill stays in the same spot.
  • Hovering a pill outlines where the view lives in the current layout's picture.
  • When the view's view group is a tab behind another tab, the outline goes around the whole area. The other views in that area stay unlit.
  • Hovering a pill shows a short hint, such as "Hide Variables" and "Drag to move it".

Moving views

  • Dragging a pill into a different area section moves the view to that area. If the view was hidden, the view becomes part of the layout.
  • Dropping a pill into an area that is closed opens that area, showing the dropped view.
  • Dragging a pill to a new spot in the same area section reorders the tabs or activity bar icons in that area.
  • Alt+Up and Alt+Down move the focused pill to the area section above or below, for keyboard users.

View groups in the layout popover

  • When a view group holds two or more views, the pills for those views sit inside one outline. The outline shows the view group's name, for example "Session". A view group with one view has no outline.
  • Dropping a pill onto another pill puts the two views in one view group. While the user drags a pill over another pill, the target pill lights up.
  • Dropping a pill between two pills puts the view in its own view group at that spot.
  • Dropping a pill inside an outline, between two of its pills, adds the view to that view group at that spot.
  • The layout picture draws one block for each view. A view group with two views shows as two blocks in its area.

Comparing layouts

  • Hovering a layout card that is not the current layout marks some pills with orange dashes. The marked pills are the views that the hovered layout includes.
  • When the hovered layout puts a view in a different area, a dashed ghost pill appears in that area. The view's own pill fades.

Undo and reset

  • After each click or drag, a line at the bottom of the layout popover says what changed, with an Undo link. Undo takes back the last change.
  • The Reset link puts a layout back to its starting views, view groups, and areas.
  • Moving the primary side bar or the bottom panel to a different side of the window stays in the View menu and the command palette. The layout popover does not link to VS Code's Customize Layout picker.

Rough mockup

The dhruvi/ui-revamp-spike branch has a rough interactive mockup of the layout popover that shows the shape of the idea. The mockup is not fully functional, and it does not match this issue in every detail. The work in this issue needs a new design and implementation.

Open questions

  • Which views does each task layout start with hidden?
  • Comparing the Default layout with a task layout moves many views at once. Is a ghost pill for each moved view too noisy?
  • How do keyboard and screen reader users put two views in one view group? Alt+Up and Alt+Down move a view to a different area, but do not group views.
主要言語
TypeScript
スター
4.4k
フォーク
207
平均マージ
1日 7時間
マージ済み PR(30日)
341

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

posit-dev/positron のほかの issue

posit-dev/positron の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。