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

Multiple tab behaviour #182

Open
Cu3PO42 opened this issue Jan 22, 2018 · 5 comments
Open

Multiple tab behaviour #182

Cu3PO42 opened this issue Jan 22, 2018 · 5 comments

Comments

@Cu3PO42
Copy link
Owner

Cu3PO42 commented Jan 22, 2018

Since the app currently treats its local state as a single source of truth, multiple open tabs will lead to unexpected behaviour. For example if you add a new formatting option in one tab, close it, then close another already open tab that option would be overwritten.

To deal with this, one could

  1. Not allow multiple open tabs: If you already have an open tab, opening a new tab would tell you to go there instead
  2. Implement some kind of configuration reconciliation: Try to merge the changes made by multiple tabs. The expected behaviour here needs further specification. What should happen if two tabs change the same formatting options?
  3. Lock the setting on all but the first open tab, so no conflicts can arise.

Please reply with the option you would prefer and why. Feel free to offer different solutions as well.

@robdy
Copy link

robdy commented Jan 23, 2018

If it's really needed I'd suggest "refresh" button for cases when you changed formating on one tab and want to use it on another one. Not sure about others but I never used more than one instance so it can just pull the data once app is loaded and never check again (for me).

@Cu3PO42
Copy link
Owner Author

Cu3PO42 commented Jan 23, 2018

I’m not sure this really solves the problem of potentially unexpected behavior, i.e. loosing options if you close the tabs in the wrong order. I’m trying to account for the unaware user here.

@robdy
Copy link

robdy commented Jan 23, 2018

Hmm, for such cases maybe go with 'keep both but rename the newest' approach? Or let open multiple tabs but don't let open 'fragile' settings on more than one. So I can view results on all tabs but will receive error message if I try to change settings on more than one tab.

@Cu3PO42
Copy link
Owner Author

Cu3PO42 commented Jan 23, 2018

Locking the settings on all but the first open tab might be a viable option. Alternatively I could always sync all changes between tabs but I'm not sure that's an engineering effort I want to undertake for a relatively small feature.

Although some issues still remain. Right now the state of filters and such is stored and overwriting might still apply to those, but that is probably not as bad.

@Cu3PO42
Copy link
Owner Author

Cu3PO42 commented Jan 27, 2018

Actually I've found what should be a relatively simple way to sync the settings between tabs in real time, so that is probably what I'm going to do.

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

2 participants