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

[Feature] Make layout persistent #12

Open
robsontenorio opened this issue Mar 6, 2020 · 7 comments
Open

[Feature] Make layout persistent #12

robsontenorio opened this issue Mar 6, 2020 · 7 comments
Labels
good first issue Good for newcomers
Milestone

Comments

@robsontenorio
Copy link

Thanks for your time! Nice work!

Would be nice to have a persistent layout (diagram).

@mtolhuys
Copy link
Owner

mtolhuys commented Mar 6, 2020

Hi again @robsontenorio! :)

Thanks!

The diagram saving relies on the localStorage which gets lost when you open a incognito screen. You could use the export / import to restore it though.

Maybe in the future I could save the diagrams somewhere else so they'll go along with incognito or browser switching. I'll have to think of a implementation.

@ArtNous
Copy link

ArtNous commented Mar 6, 2020

I think you could use a database, or Redis to save the layout.

@mtolhuys
Copy link
Owner

mtolhuys commented Mar 6, 2020

@ArtNous Yeah, could definitely be an option. I went for localStorage to make it the least "intrusive" as it could be.

Thinking about it I'm actually leaning towards using backend caching.

Will be a heavy change since pretty much everything you do gets stored in it (dragging positions etc.)

@robsontenorio
Copy link
Author

robsontenorio commented Mar 6, 2020

You could keep all current logic using localStorage. But just send back to backend and save all changes on dedicated table.

In fact would be necessary to have a persitent mechanism, like a table.

EDIT: or maybe a simple file on proper location.

Captura de tela de 2020-03-06 19 36 07

@ArtNous
Copy link

ArtNous commented Mar 6, 2020

That's right, It would be a big change, but I think it is necessary, we're here to support and help.

@mtolhuys
Copy link
Owner

mtolhuys commented Mar 6, 2020

Thanks guys! All contributions will be fully credited of course. Just have to make a nice section for it in the README as I didn't thought this would happen so fast. :)

I'll take the suggestions with me.

@mtolhuys mtolhuys added this to the V1.0.0 milestone Mar 7, 2020
@mtolhuys mtolhuys added the good first issue Good for newcomers label Mar 8, 2020
@mtolhuys mtolhuys modified the milestones: V1.0.0, 0.10.0 Mar 9, 2020
@mtolhuys
Copy link
Owner

mtolhuys commented Mar 9, 2020

At the moment I'm working on a "hybrid" solution for this. I'm thinking of a save button in the right upper corner which will cache the localStorage. With that, if the localStorage is empty, it could fill it with it. This way we'll prevent a request bombardment. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants