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

Sync addon data #54

Open
4 of 7 tasks
mbnuqw opened this issue May 10, 2019 · 12 comments
Open
4 of 7 tasks

Sync addon data #54

mbnuqw opened this issue May 10, 2019 · 12 comments

Comments

@mbnuqw
Copy link
Owner

mbnuqw commented May 10, 2019

Use browser.storage.sync api to sync sidebery data between machines.
Storage quotas for sync data
Force a manual sync

  • Settings (v4.5.0)
  • Context menus (v4.6.0)
  • Styles (4.6.0)
  • Keybindings (5.0.0b19)
  • Containers (config data)
  • Panels (config data)
  • Tabs
mbnuqw added a commit that referenced this issue Feb 7, 2020
mbnuqw added a commit that referenced this issue Feb 19, 2020
@mbnuqw mbnuqw changed the title Sync addon settings Sync addon data Jun 3, 2020
@cluxter
Copy link

cluxter commented Aug 19, 2020

Is there a way tabs could also be synchronized?

The idea being: once settings/context menus/styles/containers/panels can all be synchronized, we are one step away from having a whole session synchronization feature.

That would be absolutely amazing because we could basically just go from one machine to another and always get the same interface and the same tabs session. Which means a lot of time saved when you switch from your work machine to your personal machine every day.

@vzuev-ha
Copy link

I also vote for open tabs sync (as an option)! That would be a killer feature!

Though it needed to decide what to do when you sync two or three machines with many tabs open. I think it would be better to create another "Default(MyWorkPC)" panel with all the contents from, say, work computer. Merging tabs is not a good idea.

@OJFord
Copy link

OJFord commented Dec 24, 2020

Tabs is mentioned in #180.

Personally I'm not so fussed about that since I think it just introduces more questions and problems and is confusing to have the same tab in multiple places but with 'page state' only on one device (e.g. a half filled-in form, or checkout cookies).

I would be really keen for container/panels to be kept in sync though - it's a pain for new (or reset) devices currently.

@cluxter
Copy link

cluxter commented Dec 24, 2020

There are several needs among all the users. Some people would like to share all their tabs across all their devices, some others would like no synchronization at all across their devices, and some others would like to synchronize some groups, tabs or containers.

Right now only people who don't want to synchronize anything are happy. We could make the rest of them happy too if we had an option like this:

  • don't sync the tabs/groups/containers across my devices
  • sync all the tabs/groups/containers across my devices
  • sync all the tabs/groups/containers across my devices, excluding those in blacklist
  • don't sync the tabs/groups/containers across my devices, except those in whitelist.

Then, for each tab/group/container, we would have the possibility to right-click on it and add/remove it to/from whitelist/blacklist.

Since this option could be configured on each device, we would have the possibility to sync anything exactly as we want it. It would make anybody happy.

@spenserw
Copy link

spenserw commented Jan 25, 2021

Hey all. I absolutely love the Sideberry addon, and I use it everyday. Thanks for all the work that has gone into it! However, I think some kind of syncing feature is 100% necessary.

What @cluxter is saying seems to make a lot of sense, but it isn't particularly intuitive. I worry it's a bit convoluted for your average user. Also, I think the concerns voiced by @OJFord and @vzuev-ha are particularly relevant if this was the route being pursued.

A happy medium between no syncing of any tab state and a comprehensive sync feature would be the option to sync Snapshots. This would satisfy the needs of most (one could opt-in to the sync or not) while also giving fine grained control as described in the comment above, the only downside being one has to manually apply the Snapshot when switching computers.

I could see this having two forms:

  1. The user simply sets an option to sync all snapshots. This is an easy route to go, however I'm not sure about people's usage habits regarding Snapshots; if it's common practice to make a lot of backups, this would obviously not be a good option.
  2. A user sets an option to sync individual Snapshots, perhaps with the option to enable syncing of Snapshots by default.

The latter seems the most sensible and conservative implementation strategy to me. I'd be happy to take a stab at this feature, skimming the code it seems as if this would be a fairly straightforward change. I would love to get @mbnuqw 's thoughts.

@kevinhaas
Copy link

I hope this gets implemented, but please focus on fixing issues like #442 first.

@wsalopek
Copy link

wsalopek commented Feb 8, 2022

+1 for syncing. Absolutely...for some people, it's crucial and would make them look elsewhere for another tab organizing add-on that syncs.

mbnuqw added a commit that referenced this issue May 18, 2022
@VaasRamsay
Copy link

Any rough plans for the remaining items in the list?

@mbnuqw
Copy link
Owner Author

mbnuqw commented Sep 28, 2022

@VaasRamsay, there are no exact dates, probably after v5 release. The main constraint to further work here is the fact that I should handle the cases of exceeding Firefox sync limits, probably with some trade-offs (e.g. skipping custom icons in panel config and handling somehow other big chunks of data, like include/exclude URL rules), so this will take some time.

@cluxter
Copy link

cluxter commented Oct 10, 2022

I never realized how ridiculously low these limits are. 100kb of total storage is not something we can use to store anything else than the basic parameters of the extension. That means we won't be able to store the icons indeed, but also the list of the tabs.

I was thinking about having a commit based system in order to sync the tabs, but that won't be possible because of these limits.
Even storing the list of the tabs is not possible. If we take an average URL length of the current GitHub page (44 characters) and the one from the Mozilla storage quotas for sync data (116 characters), we get an average of 80 characters. So based on this, we could store a maximum of 1280 URLS, without anything else. I had way more URLs than that in my Firefox instance on multiple occasions.

I see 3 options:

  1. we rely on the Firefox Sync account to save the open tabs as it already exists and Sidebery just opens all the tabs on the current machine which are marked as open in all the other machines. The problem is: how do we know when to close a tab on the other machines when we close a tab on the current machine? I don't even know if Sidebery can get access to the list of the open tabs on the other machines. If this is a possibility, then we could store a timestamp for each machine which would indicate the last time each machine got synced with the Firefox Sync storage and find a way to use this in order to open/close the tabs on each machine.
  2. we store the open tabs in Favorites with one folder per machine, and we find a way to deal with it to keep the tabs synced between the machines. We could store a timestamp in the extension storage for each machine which would indicate the last time this machine synced itself with the Firefox Sync storage. This is a little bit hacky but there is apparently no quota on the Favorites. This is the way that some other extensions use. Maybe we can even store some data like icons as URLs this way.
  3. we create a custom server dedicated to Sidebery on which we can have way higher limits and Sidebery users must create an account on this server in order to sync all there data. This option is the best in terms of feature but what a pain in the ass in terms of user experience and especially for the Sidebery developer(s). Maintaining a server with all the security and performance requirements is not something easy and it's time consuming.

I see option 3 as the nuclear option. We should use this as a last resort.
Depending on what's possible or not, we can probably go with option 1 or 2.

Some people would probably be very interested in having this feature as a standalone one, ie. without using Sidebery. This is why I'm thinking about creating a dedicated extension for it, but that would be probably limited to the URLs since I doubt that an extension can access to the data of another one. Integrating this feature in Sidebery would allow us to save all the structures of the panels/tabs/icons/etc. of Sidebery. I see a need for both.

Also, in order to be really useful, this feature should be accessible on mobile units and I don't think Sidebery can be installed on mobile units right now.

@mbnuqw Any thoughts on all this?

@jathek
Copy link

jathek commented Oct 10, 2022

  1. we create a custom server dedicated to Sidebery on which we can have way higher limits and Sidebery users must create an account on this server in order to sync all there data. This option is the best in terms of feature but what a pain in the ass in terms of user experience and especially for the Sidebery developer(s). Maintaining a server with all the security and performance requirements is not something easy and it's time consuming.

Alternatively, Sidebery could do what Tampermonkey does and offer integration and storage on a user's Google Drive or Dropbox or OneDrive. That way no custom server needs to be created or maintained.

@mbnuqw mbnuqw mentioned this issue Oct 25, 2022
@micimize
Copy link

micimize commented Sep 3, 2023

Thoughts on some options here (synced tabs piggyback, external sync, bookmarks feature expansion):

  1. To the idea of piggy backing FF Synced Tabs: about:sync shows that a per-device list of tab urls is available (though without container info). I can't tell if this data is accessible to other extensions, but if it is, some cleverness with a tree of indices per-device could sync the tree info fairly cheaply:
    image

    Even if this works, it feels like it could be a little awkward and brittle, and not really interact with the other features well.
    Another option here is to just have automatically-generated panels for other devices that only show what isn't open on the current device – I feel like this is the primary thing I want from Synced Tabs.

  2. Make external sync based on snapshots more ergonomic for the sync use-case. Right now, snapshots act like (fairly accessible) backups but don't have much "merge into current session" functionality from what I can tell

  3. Have a flag to auto-update bookmarked panels. This one I like the most ATM:

    1. The "restore from bookmarks" feature is already nicely kind of idempotent

      Edit: it's actually still very clunky

    2. It seems the easiest to prototype at this stage:
      1. "save to bookmarks" @ configured interval IFF changed(panel)
      2. Track last-update-from-device like @cluxter mentioned
      3. Option to auto-restore & close unbookmarked tabs on restore (with notice)
    3. It is highly granular and opt-in per-panel
    4. It works to some degree on mobile without sidebery (just bookmark a page)
    5. Container and other info could just be shoved in the name if necessary (i.e. My Bookmark [container=foo])f

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

10 participants