Giter Club home page Giter Club logo

cxw42 / tabfern Goto Github PK

View Code? Open in Web Editor NEW
166.0 16.0 27.0 10.54 MB

Google Chrome extension for saving and restoring sets of tabs, and for switching between windows and tabs from a vertical, grouped list.

Home Page: https://cxw42.github.io/TabFern/

License: Other

JavaScript 91.45% CSS 7.61% HTML 0.64% Shell 0.05% SCSS 0.25%
chrome-extension tab-management javascript-applications jstree research-tool chrome google-chrome google-chrome-extension web-browsing hacktoberfest

tabfern's Introduction

TabFern

Join the chat at https://gitter.im/TabFern/Lobby

Developing on TabFern

Update 2019-09-30 Please do not use any code from Stack Overflow โ€” see CONTRIBUTING.md for details.

What is TabFern?

screenshot

TabFern is a Google Chrome extension that:

  • Gives you a vertical list of all your open tabs
  • Groups your tabs by window
  • Saves sets of tabs so you can close them and resume later
  • Backs up and restores sets of tabs

Usage

  • Click the icon to open the TabFern view. The view will also open when you start Chrome.

  • When you open windows or tabs, or rearrange windows or tabs within a particular browser window, the tree will update.

  • To mark a window to be saved, you have two choices:

    1. Give the window a name using the pencil icon (image).
    2. Hit the middle icon showing a rectangle with a red dot (image). The window will close.
  • Folder icons are:

    • Open, unsaved: a monitor (image)
    • Open, saved: a monitor with a green dot (image).
    • Closed, saved (closed unsaved aren't in the tree): a white file folder.
  • Saved windows will be saved even if you close them manually. To remove them from the tree, hit the delete icon (red X, image).

  • Windows you do not expressly save will not be saved when you exit! I am open to discussion of better ways to handle this.

Limitations

  • There is only a two-level hierarchy --- tabs cannot be the children of other tabs in the tree.
  • You cannot open and close individual tabs --- you have to open and close the window as a whole (work is in progress --- see issue 35).
  • Where new windows open may not always be where Chrome would open a new window. Currently, the original size/position of the last-focused or last-closed window is generally where the new window will end up.
  • Lots of others I'm not going to list right now!

Thanks

Legal

Copyright (c) 2017--2019 Chris White and contributors. CC-BY-SA 3.0, or any later version. See LICENSE.md for details, which are controlling in case of any difference between that file and this section.

Contributors are listed in LICENSE.md.

Originally inspired by Tabs Outliner by Vladyslav Volovyk. However, TabFern is not derived from Tabs Outliner. TabFern is not affiliated in any way with Vladyslav or Tabs Outliner.

logo

tabfern's People

Contributors

abadzhevak8 avatar ahonn avatar bluikko avatar cxw42 avatar dependabot[bot] avatar devinrhode2 avatar gitter-badger avatar procyon-b avatar r4j4h avatar riotpharaoh avatar rwexmd 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tabfern's Issues

Right-click context menus

  • Add them
  • Decide what to put in them

@r4j4h, currently, in fcfa1e4, I get the "no shortcut driver" path. I then observe that shift+right click never unlatches. I added a console.log and it appears that the win.onkeyup here is never being called (perhaps the browser-provided context menu is eating it?).

  • Would it make sense to use addEventListener instead of the direct win.on* assignments?
  • Would you please check the non-driver path? Perhaps I am missing a component you have on your development machine. Which path do you get?
  • Would you please rebase on master when you have a chance?

Feature requests (perhaps a separate, later PR than the above?):

  • Would you be willing to add Shift+F10 as a hotkey to pop up the context menu, for the benefit of keyboard users?
  • Would you add keyboard nav of the context menu itself? Currently, the context menu does not take keyboard focus, so it cannot be navigated with arrow keys and Enter.

(Note to self: the options check is not fully implemented per this)

Open window on screen and with reasonable default size/position

  • When opening a window for the first time, given that the user hasn't saved size and position (since #5 hasn't been implemented yet), open using the default size and a reasonable default position. See this SO question.

  • (Edit moved to #141) Whenever opening a TabFern window, check the active monitors and make sure the new window is entirely (or at least partly) visible on screen!

Project startup items

Hi there! Thanks for starting this.

In my fork I have started adding a Right-click menu, with corresponding Option to toggle on and off, and in a separate, related branch I started added Keyboard Shortcuts, also with a toggle and ideally a keybind customization menu panel in the future.

I want to open a PR now, but I have some concerns I want to address so that I can clean things up appropriately for a proper PR.

  1. I used SASS. It's light, so I can totally clean up a MR that is SASS-less, but ideally we would want a build chain to convert them to CSS, and that means development dependencies. So I wanted to see how you felt build chains.

  2. New dependencies. In the Keyboard Shortcuts branch I brought in Keypress to help, but I also kept all the usage of the library into one "driver" class so it's fairly easily to incorporate a different solution. Possibly jQuery or mootools based since those are already there, or something else, if you have a preference?

User option to turn off H scrollbar

@r4j4h Would you be willing to look at this one? Add a user option to control whether the TabFern window has a horizontal scrollbar or not. Requested by Blank Makkara via user review 2017/09/07.

Also related to #31.

Build script

@r4j4h would you please take this one?

See also discussion in #1.

  • Add a webpack v2 build script that builds into /dist. Assume node/npm/webpack are installed.
  • Document toolchain-installation and building instructions, perhaps in /HACKING.md or some such.

For now, please do not minify, and please use non-minified libraries. I would like to introduce minification later, probably in v1.0 or v1.1.

After some more testing based in this, I am planning to manually update /webstore from /dist whenever I update the version on the Chrome Web Store. That way we won't have to manually skip-worktree new files in /dist, but the actual running source will still be available to browse online.

Add in-extension automatic, scheduled backup

  • Automatically store copies of the current save data on a schedule. Weekly/monthly, perhaps?
  • User option to disable the capture of backups
  • UI to delete specific backups, or all backups
  • UI to view and restore backups

Requested by a user via email 2017/10/25.
Requested by Mike Gordon via review 2019-01-27.

Save popup position even if it doesn't change size

onResize doesn't fire when the popup moves, so we don't save position unless the size also changes.

Possibility: use a setInterval callback to check if the position has changed every n seconds, and save if so.

Add ways to move a window to the top of the list, and to scroll there

  • Context-menu item to move a window to the top
    • setting to determine whether to scroll there?
  • Setting to move a closed window to the top when you reopen it
    • Note: this already exists for new windows, e.g., created with Ctl+N. The corresponding function could be provided for reopening saved, closed windows.

My tree is getting long enough that I think these might help.

Move tabs between windows via the TabFern window

Including moving closed tabs between windows. Requested by Blank Makkara via user review 2017/09/07.

I would also add the ability to create a new window - e.g., drag a tab's node out of the tree to create a new window to hold that tab (open window for open tabs; closed window for closed tabs).

"Close" options on hamburger menu

  • Close all saved windows
  • Close and save all windows
  • Close saved windows; delete unsaved windows

Handy for larger trees, to save scrolling if you just want to clear the decks and start fresh.

Probably a submenu with those options, rather than individual menu options.

Open/close tab-by-tab

Edit As of 2019-09-26, the former issue35 branch is now master!

Ability to open or close one tab at a time, rather than having to do the entire window at once. Requested by Blank Makkara via user review 2017/09/07.

Known issues

Bugs

  • The tests are hard to read and hard to modify. I need to write a better skeleton so that I can easily write tests expressing the semantics I want.
  • Given tabs open 1, closed 2, open 3, open 4, drop 4 before 3. It snaps to after 1 rather than staying where you dropped it.
  • When behaviour like that happens, and then you middle-click to open a new tab from a tab that is not the rightmost, the mapping of indices to windows is thrown off.
  • Moved to #280
  • Need to finish implementing collapse option from 25752b3 - Edit will not be implemented at this time- see 2deb068
  • Moved to #281
  • In a partially-open window, drag an open tab (in the browser window) from after a gap to before, and then back. Sometimes the tab's tree entry will skip a closed tab, then jump to after two open tabs, when moving from left to right back across the gap. Edit We now have well-defined behaviour for this case. The tab will stay on the same side of the gap until it has to jump.

Design questions

Long titles make the action buttons flicker

because the a.jstree-anchor and the div.tf-action-group are not children of the div.jstree-wholerow, so mouseenter and mouseleave trigger when the mouse moves on and off of the a text and the div icons.

Add a tea timer

Because I use one multiple times a day, and I have TabFern open the entire time I'm logged on. This is my current favorite.

Actually, I have been thinking about adding a hamburger menu at the bottom, since the transparent overlay in Tabs Outliner has tripped me up in the past. A menu would be a good place for a tea timer, since it wouldn't get in anyone else's way.

Add user option to save window size/position

I prefer not saving window size/position since I may use the same set of tabs for different tasks with different window layouts. However, another option is to save size/position. Add an option to do so, and sensible handling if the user enables and later disables the option. If the option is disabled, should previously-saved windows re-open in their saved locations anyway?

Suggested by Mayken in a comment to this SO question.

Configurable threshold - >n tabs, prompt before opening the window on click

One click on a window and all of its tabs open, which can be slow if you have lots of tabs in that window. Add a configuration option n so that if a window has more than n tabs, on click, it will ask "are you sure?" before opening. n=0 => no limit. Default to 31 because it's a nice round number :) .
Noted by Blank Makkara via user review 2017/09/07

Sometimes action-button clicks fall through to the node

After fixing #47 in bb4316c, sometimes, when focus is not on the TabFern window, a click on an action button will not register as on the button, but instead as on the node itself.

As far as I can tell, the node is being dehovered briefly during the focus change. That dehover causes the action buttons to disappear, which in turn causes the click to land on the div.jstree-wholerow, whence node selection.

Boldface the currently-focused tab

As a side note, don't un-highlight the currently-focused tab/window when focus hits the popup because you are clicking on another tree item.

Current active tab highlight (bold text) lost in outline after active tab drag-drop moved

The new functionality of moving tabs within a window by drag'n'drop works fine. But there's a small bug:
if currently active tab (highlighted in bold text) is moved by drag'n'drop, the bold text is lost and does not recover after focus is returned to the active window.

More precisely:
If focus is moved to TabFern window, the active tab highlight (bold text) is lost, which is understandable.
But after focus is returned from TabFern window to Chrome (back to the tab that was active before clicking at TabFern window), the active tab highlight does not return, only the active window is highlighted with bold text.

It recovers after some other tab is activated.

Add notes to tabs

You can already rename a window's tree entry to whatever you want. Add a similar function to permit adding text notes to the tree entries representing tabs.

Add a plugin API

  • Split the TabFern window and load a plugin's page in an iframe
  • Receive and respond to requests from other extensions for a two-way communication (e.g., #7)
  • Store and forward settings based on extension ID
  • Present plugin settings in the TabFern window
  • Give plugins an entry in the hamburger menu

(Reopened) Open windows are duplicated after Chrome restart

If Chrome is restarted due to an update (regardless of setting "Pages to open on startup" that is set to "Open the New Tab page"), Chrome helpfully re-opens the windows that were open before restart.

But TabFern then naturally creates duplicate windows for all the windows that were re-opened by Chrome.

Could it perhaps be possible to test if a window has exactly same tabs than already existing window in TabFern and then not create a new window with the same tabs as before?
I'm not sure if there's a way to test if Chrome was just restarted, but if there is then it might be even better to take that too into account when checking whether to re-use the old windows in TabFern instead of creating new ones.

Currently after Chrome restart the easiest option is to delete all windows that were open before the restart and rename the newly created windows back to the same names as the windows before restart.

Add functions to bulk-rearrange open tabs

  • Function to collect all open tabs from all open, unsaved windows into a single window. I discovered this when I just realized I have about 15 windows open, each with only one or two tabs.
  • Right-click menu function to sort open tabs within a given window

Keyboard shortcuts in the TabFern window

@r4j4h Following on from #8, which was merged in the course of the push to v0.1.
Besides the TODO item there, the other thing I would appreciate along with the code is a bit more documentation. At this point, the options and the default bindings don't look to me like they would tell a new user what the shortcuts were for. Thanks!

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.