Let users choose the views in each task layout

Abierto
#17,519 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
5/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
typescript
Área
frontend

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.
Lenguaje dominante
TypeScript
Estrellas
4.4k
Forks
207
Merge medio
1 d 7 h
PR fusionados (30 d)
341

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de posit-dev/positron

Todos los issues de posit-dev/positron

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.