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 windows/tabs issue #138

Open
xy2z opened this issue Oct 29, 2019 · 2 comments
Open

Multiple windows/tabs issue #138

xy2z opened this issue Oct 29, 2019 · 2 comments
Labels
discussion enhancement New feature or request help wanted Extra attention is needed

Comments

@xy2z
Copy link
Owner

xy2z commented Oct 29, 2019

The problem

Lets say a user has 2 windows open: window-A and window-B.

If the user changes note content in window-A, the change isn't registerd in window-B, unless the user refreshes the page in window-B.

So if the user changes the content of the same note in window-B, the change from window-A is gone.

The issue not just content, it can also be deleted notes, deleted notebooks, new notes, etc.

The Solutions

  1. Syncing all tabs. This probably requires sockets? I think this is a bigger task, and will save this for later (v2)
  2. Error when saving a note that has changed since page-load-time. This is probably the easiest, but also the most annoying for the user, since they are getting "errors" and have to copy the content and manually merge them.
  3. Only allow 1 tab open at a time. Altough I'm not sure how, but this seems like the best solution without going full socket. But maybe this needs sockets anyway? I'll have to research.

#1 is definitely the goal, since we need Collaboration anyway - see https://tiptap.scrumpy.io/collaboration

@xy2z xy2z added this to the v1.0 milestone Oct 29, 2019
@xy2z xy2z added discussion enhancement New feature or request hacktoberfest Hacktoberfest 2019 help wanted Extra attention is needed labels Oct 29, 2019
@xy2z
Copy link
Owner Author

xy2z commented Oct 29, 2019

To only allow 1 tab at a time we can use localStorage - see example here https://jsfiddle.net/sasivarunan/06dqb1rg/ (open with multiple tabs)

This won't work with other sessions/devices, but may be good enough until sockets are done..?

@xy2z xy2z removed the hacktoberfest Hacktoberfest 2019 label Nov 22, 2019
@xy2z
Copy link
Owner Author

xy2z commented Dec 1, 2019

As a "temporary" fix for version 1, I've implemented localStorage so only 1 tab can be open at a time.
This is not ideal for the reasons described above, but it's a fix until sockets/other is implemented.

@xy2z xy2z removed this from the v1.0 milestone Dec 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant