marta-issues icon indicating copy to clipboard operation
marta-issues copied to clipboard

Provides the ability to open a new tab in the last position. (matches the behavior of version 0.8)

Open page-down opened this issue 2 years ago • 2 comments

Note: This issue is extracted from the Marta 0.8.1 Beta EAP #750. Link to the original comment: https://github.com/marta-file-manager/marta-issues/issues/750#issuecomment-886031457

In version 0.8.1, breaking changes appear in the "New Tab" Action. The newly created tab opens on the right side of the current tab.

Please provide a separate Action or parameter to be bound to a dedicated shortcut key to open a tab in the last position. (matches the behavior of version 0.8)

Or name this behavior in the current version (0.8.1) as "Duplicate Tab" as mentioned in the previous comment. (see below)


(The following is based on the previous comment.)

The creation of a new tab from New Tab Action should always be on the far right of the pane.

Based on the following considerations:

  1. Consistent behavior with other macOS software

For example, when you open Finder, creating a new Tab is always on the far right. Open Safari, right click on the Tab and select Duplicate Tab, it will be created immediately to the right of the current Tab, which is exactly what I mentioned in my original comment, the behavior of 0.8.1 is actually "Duplicate Tab", it is also recommended to create an Action like this to use.

For example, I would consider binding Command+T to Dupilcate Tab on my own config. However keeping the macOS menu bar, Tab right click context menu is still New Tab (created in the last position).

  1. Does not affect shortcut changes to existing Tabs

This is because the position of each Tab is related to the shortcut key. In fact there may be shortcut keys Cmd+1, Cmd+2, Cmd+3 which are most commonly used, and it is less important what the rightmost shortcut key is. If a Tab is created immediately to the right, it will cause the shortcut to change, for example if a new Tab is created while the first Tab is active, it will cause the original Cmd+2 to switch to this open Tab. it would be very annoying not to have an exclusive Action that creates a Tab on the far right.

Summary:

  • Action "New Tab"
    • position: current active pane far right (next to the last one)
    • view settings:
      • default: default from conf.marco
    • history: NONE, can NOT use "core.back"
    • path:
      • default: default from conf.marco
  • Action "Duplicate Tab"
    • position: next to the right of current tab
    • view settings: reusing current tab's settings
    • history: reusing current tab's history
    • path: reusing current tab's path
  • Action "Open in New Tab"
    • position: current active pane far right (next to the last one)
    • view settings:
      • default: reusing current tab's view
      • configurable: Can be configured to conf.marco default
      • why: behave consistently with previous behavior without breaking changes also provides the ability to configure
    • history: NONE, can NOT use "core.back"
    • path:
      • default: reusing current tab's path.
      • configurable: Can be configured to conf.marco default
      • why: Consistent with Finder, consistent with other multi-tab software.
  • Command Line Launcher
    • Please use "Open in New Tab" to create
      • Open a new tab in the last position
      • should use default view settings (same as new Window)

page-down avatar Aug 08 '21 10:08 page-down

To better understand the difference between New Tab and Duplicate Tab, I have opened a new feature request.

Show favorites in New Tab #805

page-down avatar Aug 08 '21 12:08 page-down

In a window where all my tabs columns are ">size:80,added:135", how can I open a new tab with the default configuration?

behavior {
    table {
        defaults {
            columns ">size:80,modified:135"
        }
    }
}

Due to the lack of a true "New Tab", I can't do that unless I manually change the view settings for this duplicated "new" tab, or open a new window.

If I turn on the following configuration, I will lose the current "Duplicate Tab" feature - which is supposed to be a standalone Action.

behavior {
    actions {
        core.tab.new.useDefaults true
    }
}

page-down avatar Aug 29 '21 07:08 page-down