Skip to content

Test: pinned tabs #98019

@bpasero

Description

@bpasero

Refs: #12622

Complexity: 4
Authors: @bpasero

Create Issue


Pinned tabs work when tabs are enabled through the following interactions:

  • from the context menu of a tab ("Pin" / "Unpin")
  • via keybinding
  • via global action from the command palette targeting the active editor

Verify

  • tabs can be pinned and unpinned in each editor group
  • pinned tabs always appear before unpinned tabs
    • opening a new tab always opens it after the last pinned tab
  • pinned tabs remain visible even when many tabs are opened and scrollbars appear
    • non-pinned tabs scroll "under" pinned tabs
    • pinned tabs eventually scroll as normal tabs once you make the size of an editor group small enough (120px is the limit)
    • the active tab is always fully revealed in the presence of pinned tabs
  • pinned tabs show with a small fixed size
    • showing only the icon if icons are enabled
    • showing the first letter of the file name otherwise
  • pinned tabs can only be closed explicitly (e.g. via CtrlCmd+W) and are exempted from mass close actions (like "Close Others")
    • enabling workbench.editor.limit.enabled will never close a pinned tab when the limit is reached
  • pinned tabs work together with any of the tab related settings
    • workbench.editor.tabSizing set to shrink and fit
    • workbench.editor.tabCloseButton set to left, right or off (note that pinned tabs never show any close button)
    • workbench.editor.highlightModifiedTabs enabled to show a dirty indication for dirty pinned tabs
    • workbench.editor.openPositioning set to left, right, first or last does never mix pinned editors with non-pinned
  • pinned tabs preserve their state
    • saving an untitled editor that is pinned shows the result as pinned too
    • switching an editor for displaying a resource (markdown preview vs markdown text) should preserve pinned state
    • the command to reopen a closed tab restores a pinned tab at the right index and preserves pinned state
  • verify drag and drop
    • moving pinned tabs preserves pinned state if dropped onto other pinned tabs
    • moving pinned tabs onto a non-pinned tab unpins it
    • moving unpinned tabs onto pinned tab pins it
    • this works in the same group and across editor groups or windows
  • pin an editor that we do not restore after restart (e.g. a SCM diff editor) and verify that after restart the number of pinned vs unpinned editors is not broken
  • disable tabs when you have pinned tabs and ensure that they drop their pinned status (e.g. now mass close commands work on them)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions