Closed Guillaume-Docquier closed 3 years ago
Hi, not sure what your initial thoughts are on this however I threw together a quick and very easy local storage example (https://github.com/SFPink/guillaume-docquier.github.io/commit/86cd58cc671952e53ea279cd9ee13fd4e3ddbf02).
It's a simple solution however it's not without it's drawbacks.
LocalStorage is what I had in mind for this use case. What drawback do you see with this solution?
Also, I encourage you to open a PR :)
The main drawback I had in mind was shareability i.e. If you wanted to share a configuration with someone else it would probably be better using query parameters.
That said there is the possibility of using both, where one could override the other.
I have created a PR. I avoided it initially as I wanted to know what you had in mind.
It's a good point for shareability, and as you said there are solutions If it turns out that sharing the crafting configuration by itself (versus sharing a crafting list + config) is a popular use case, we'll revisit the solution.
But for now I consider that it is most likely that people keep their crafting configuration for themselves and persisting it in localstorage makes it seamless to come back to it, rather than bookmarking a query string.
It would be nice if the crafting disciplines and belts were saved so that I do not have to input them every time I load the website.