Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save all tabs from all windows #19

Open
pquerner opened this issue Jan 1, 2017 · 7 comments
Open

Save all tabs from all windows #19

pquerner opened this issue Jan 1, 2017 · 7 comments

Comments

@pquerner
Copy link

pquerner commented Jan 1, 2017

See title.

@hharnisc
Copy link
Owner

hharnisc commented Jan 1, 2017

Hey @pquerner curious what you'd expect to see when opening up a tab group that was saved from multiple windows.

  • All of the tabs opening in one window (merged)
  • open up multiple windows (preserving window/tab configuration)

@pquerner
Copy link
Author

pquerner commented Jan 1, 2017

Hello @hharnisc

If you look at the Chrome extension "Session Buddy" you'll see that it saves the tabs within the used windows.

So you may have different Windows of Google Chrome with specific Tabs open (ie. one is for music, one is for work related stuff etc.)

If you then click to save / sync the tabs, it'll just not only sync the tabs from this current Window you clicked the extensions icon from, but all the other Windows tabs, too.

@hharnisc
Copy link
Owner

hharnisc commented Jan 1, 2017

Got it! I took a look a the chrome tabs api and it looks like we can get the window id for each tab. So this is certainly possible.

https://developer.chrome.com/extensions/tabs#type-Tab

Thinking a bit about the underlying tab data structure. The current one is too simple, looks sort of like this:

[
  {
    "name": "My Tab Group",
    "tabs": [
      "https://google.com",
      "https://test.com",
    ]
  }
]

There's not really a way to know which tabs belong to which window. I think if I modify it like this it would make it possible to add the ability to save tab <-> window mappings (and also solve pinned tabs from #13)

[
  {
    "name": "My Tab Group",
    "windows": [
      {
        "tabs": [
          {
            "pinned": false,
            "url": "https://google.com"
          }
        ]
      }, {
        "tabs": [
          {
            "pinned": true,
            "url": "https://test.com"
          }
        ]
      }
    ]
  }
]

@pquerner
Copy link
Author

pquerner commented Jan 1, 2017

Might be a little tricky even further.
https://developer.chrome.com/extensions/storage#property-sync
Seems like theres only so much you can sync/store in your "cloud".

@arkon
Copy link
Contributor

arkon commented Jan 4, 2017

Perhaps it could default to storing it locally (the unlimitedStorage permission would help), with cloud syncing being opt-in with a note saying that it's limited to 1KB?

Otherwise, you could also look into a less verbose data storage method like protobufs, or some third-party cloud storage.

@hharnisc
Copy link
Owner

hharnisc commented Jan 4, 2017

Curious @arkon, have you experienced the 1KB limit? I wonder how many tab groups that is, and if (more likely when) this has happened yet.

@arkon
Copy link
Contributor

arkon commented Jan 4, 2017

@hharnisc I haven't been using Tabbie that much, so I certainly haven't been anywhere close to hitting the 1KB limit. Frankly, 1KB seems like a pretty big amount for JSON, but even if it is a concern, there are definitely ways to design the data set such that it takes up less room.

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

No branches or pull requests

3 participants