Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Fix preview tabs #218

Closed
Closed

Description

@benogle

There have been a lot of issues created related to preview tabs. It seems like nearly all of these issues could be solved by a couple things:

  1. Create all tabs as 'permanent' by default and only open in a preview tab in a couple cases:
    • Single clicking in the tree-view
    • Single clicking in project find results pane
    • And eventually (when open files is suuuper fast) opening preview tabs when arrowing through the fuzzy finder
  2. Close the preview tab when it loses focus

The issues

The short term approach

Currently preview-tabs is implemented entirely in the tabs package. When a new pane item is opened, the tabs package closes the old pane item associated with the preview tab, and creates a new tab. So atom core (or other packages) has no idea that there are preview tabs. This is kind of crappy as

That said, we could probably do a quick fix to change the default behavior to open a 'permanent' tab, and hack the other packages to open preview tabs in the exceptions listed above.

The long term approach

A cleaner and more robust approach would be to bake the notion of a preview pane item into atom core. Packages could then decide to open preview items if they so choose. Then there would be no hacks: tree-view and the find results could open a preview item on single click; tabs could watch for preview items and have them all share one tab element.

@nathansobo @maxbrunsfeld not sure how much effort this longer term approach would be. Can you estimate how long it would take to add a new option to open() indicating the notion of a preview pane-item + related events?

cc @atom/feedback

Activity

  1. benogle commented on Oct 15, 2015

    @benogle
    ContributorAuthor

    This issue was moved to atom/atom#9165

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions