Giter VIP home page Giter VIP logo

maciekmm / container-tabs-sidebar Goto Github PK

View Code? Open in Web Editor NEW
119.0 4.0 14.0 1.02 MB

Firefox addon aiming to utilize screen estate more efficiently by showing tabs in a sidebar grouped by privacy containers. Inspired by TreeStyleTab.

Home Page: https://addons.mozilla.org/en-US/firefox/addon/container-tabs-sidebar/

License: Mozilla Public License 2.0

JavaScript 77.36% HTML 9.33% CSS 13.31%
browser-extension sidebar firefox firefox-addon privacy tabs-management hacktoberfest

container-tabs-sidebar's Introduction

Container Tabs Sidebar

A firefox addon that shows currently opened tabs in a sidebar grouped by a privacy container.

Promotional screenshot

How to use

In order to use this addon it's recommended to have firefox version >=59 installed. It might work with a version as low as 54, but there were no tests done with these builds. You can download the latest firefox from firefox.com

Installing from addons.mozilla.org

  1. Visit Container Tabs Sidebar on mozilla.org
  2. Click Add to Firefox button

Manually installing the addon for development purposes

Debugging via npm:

  1. If you have npm installed, you can execute the following command: npm run dev. A Firefox window should open.

Installing as temporary add-on

  1. Clone or download a zip of this repository.
  2. Navigate to about:debugging.
  3. Click Load Temporary Add-on.
  4. Select manifest.json inside src directory.

Opening the sidebar

In order to open the sidebar click F2 button on your keyboard. If it doesn't work then open any sidebar (eg. using Ctrl+b), and change the sidebar via dropdown menu.

Customizing containers

In order to add/remove containers navigate to about:preferences#containers.

Appearance modifications

Summary of How to Create a userChrome.css File on userchrome.org

  1. Create a file called 'userChrome.css' in a directory called 'chrome' inside your user profile directory
  2. Add the below data to the file

Warning: Starting with Firefox 69 you have to enable toolkit.legacyUserProfileCustomizations.stylesheets in about:config in order to use modifications listed below.

Note: For Firefox <72 you also need a @namespace directive at the beginning of the file.

Note: the @namespace directive only has to appear once in that file.

@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");

See this discussion thread for details.

Hiding the Sidebar Header

In order to hide the sidebar header you need to append to the userChrome.css file the following code:

#sidebar-box[sidebarcommand^="containertabs"] #sidebar-header {
	display: none;
}
Before After
Before hiding After hiding

Hiding the Tab Bar

In order to hide the Tab Bar you need to append to the userChrome.css the following code:

@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");

#main-window:not([tabsintitlebar="true"]) #TabsToolbar {
    visibility: collapse !important;
}
/* for Firefox 72 and beyond */
/* credit to stapuft at https://github.com/piroor/treestyletab/issues/2207#issuecomment-478288590 */

#tabbrowser-tabs, #TabsToolbar {
  visibility: collapse !important;
}

Change Icon into Black from White

This userChrome.css rule will make the icon become black on Toolbar, Sidebar, and Pop up menu

Black Icon for white Template

#sidebar-box[sidebarcommand^="containertabs"] #sidebar-header #sidebar-icon,
#sidebarMenu-popup #button_containertabssidebar_maciekmm_net-sidebar-action .toolbarbutton-icon,
#nav-bar-customization-target #containertabssidebar_maciekmm_net-browser-action .toolbarbutton-icon {
  filter: invert(100%);
}

container-tabs-sidebar's People

Contributors

benyaminl avatar bl00dyg33k avatar dependabot[bot] avatar maciekmm avatar minigod avatar nkarampi avatar tkapias avatar vistaus avatar vladimiroff avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

container-tabs-sidebar's Issues

Performance issues

Benchmark, look for memory leaks and debug the cause of bad performance after a while.

  • messaging instead of periodical isOpen call
  • filtered listeners
  • unregister unused listeners
  • look for memory leaks
  • don't rerender whole tree when tab is added/reordered

Customizable shortcut?

It would be great if we could customize the shortcut for opening the sidebar. Maybe another item to put into #6?

Open closed tab option

The goal is to implement the feature "Undo closed tab" as an option in the tab and container context menu.
I think that a global 'undo closed tab' is enough, no need to remember which tab was closed last in every container. Therefore (I think) the best place to add the logic is https://github.com/maciekmm/container-tabs-sidebar/blob/master/src/sidebar/native_context_menu.js

API: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/sessions/getRecentlyClosed
adding a permission to manifest.json might be needed.

Auto-assign tabs to containers

First off, really great work! And I'm especially happy that there is active development. I used PowerTabs before, but this one is more appealing. However... ๐Ÿ˜„

PowerTabs had the ability to auto-assign tabs based their domain. A similar functionality would be great! From my point of view, regexes on the title would be even better.

Add README

  • How to install
  • How to debug
  • How to remove sidebar header
  • How to remove tabs list

Vue rewrite

Rewriting the addon to use Vue.js would shrink the codebase massively, improve performance and stability.

Add settings page

  • collapse trees on tab change
  • custom CSS
  • show tabs from all windows
  • only show tabs from the currently focused container in tab bar
  • theming support
  • merged containers prefix (interop with temporary containers addon)
  • customizable shortcut
  • configurable text ellipsis

Dragging a tab to a different container in a different window reopens the tab in the source window

When dragging a tab to a container in another window, if the tab is dropped just below the container label, so that the insertion hint line appears, the tab goes to that position in the target window.

If the tab is dropped on the container label though, the behavior is unexpected: the tab is assigned to that container, but stays in the original window. i think there just needs to be a check added to this drop handler that does the window switching.

Reordering is buggy

Sometimes when reordering tab it doesn't land where it's supposed to.
Also the border-bottom glitches if moved to quickly.

Drag container labels between windows

It's already possible to drag tabs to containers in other windows. It would be great if a container could be dragged to another window. If there are already tabs in that container in the dest window, they would be merged. See also #40

Possibly also dropping on a different container label within the window would move tabs to the drop target container, although that may surprise users.

Option to not wrap tab titles

I'd like to be able to set tab titles to ellipsize instead of overflow. I can do this by hacking the CSS and temporarily loading a local copy of the extension, but if you're planning on adding an options page, that would be a preferable solution. I changed the style of .container-tab-title to include:

white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;

And this looks like what I want.

If you don't have your own plans to add an options page, would you accept a PR? I see other people have asked for things like color themes so it may be useful.

Don't re-expand minimized tab groups on switching tabs

  • open some tabs in one container
  • open other tabs in another container
  • on the container group title of the one container, click the arrow that points down. The arrow points up and the group of tabs in the container is minimized.
  • click on a tab in the other container. The one, minimized container expands again and reveals all the tabs in it. This will happen for any other additional minimized containers with open tabs, also.

I would rather in not expand all collapsed (minimized) containers. If this isn't programmatically possible, I would rather not be able to minimize containers at all--it's a useless feature if something as simple as switching tabs defeats it.

Tabs switching in view-order

It would be nice to be able to choose to switch tabs (with Ctrl+Tab) in order in which they're visible, not in the order they were opened in.

Retain zoom level between opening sidebars

Is it possible to anyhow retain the zoom level or at least get what the zoom level is from the sidebar?
The tabs api doesn't apply to it I'm afraid.

We might go a path of adding a zoom setting or CSS inject.

Focus on tab in the same container after closing current tab

Right now when I close the tab, a "random" tab gets focused next ("random" if you judge by looking at sidebar alone).

What would be really cool is to be able to focus a tab in the same container if possible.

I would suggest this algorithm:

  • If tab just above the currently closed one is in the same container, focus it
  • Otherwise, if tab just below the currently closed one is in the same container, focus it
  • Otherwise, if there is tab above, focus it
  • Otherwise, focus tab below

Configurable tab groups

I'd like to be able to disable, add, or remove the tab groups. (By default they appear as: Default, Personal, Work, Banking, Shopping)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.