Closed Dombo closed 1 year ago
@Dombo Thanks for submitting this PR. I actually want to preserve the refresh as a reset of the whole app as I think it would be a more generic use case of this application where an event would finish the lucky draw in a short period of time (usually within couple of hours). Is there any reason you think that preserving name list in local storage would be useful?
@icelam I suspect some people (me for example) might want to use this to draw a name from the same list across seperate sessions/uses. Without having to keep adding a list from some other place they track it like a note or soemthing
Do you have a suggested way forward for this PR?
Understand the use case you describe. However, I am more keen on preserving the original behaviour for the following reasons:
For what is expected to be saved into local storage, it would be quite different base on the use case. While most of the users of this application will have lucky draw sessions that end in a short period of time, I agree there will be some use cases where people would want their names list preserved. Currently, I can think of three scenarios:
For cases where users want to initialise multiple rounds of lucky draws with the same list of event audience, then preserving the initial name list would be useful. However, if there is a case where a single round of lucky draw is spread across an entire event, or if an application needs to be closed due to an event rundown or technical issues, local storage would be more useful for preserving an interim state instead of just storing the initial list, in which removed names would also be removed from local storage.
For privacy considerations where someone is using an equipment provided by the event venue (i.e., a public computer), they might not prefer to have names preserved in local storage by default. If we have to introduce the local storage feature, I believe there should be extra functionality or settings for people to opt-out of local storage and also clear stored values whenever they want to.
I truly appreciate the effort you've put into this PR. However, in consideration of both generality with regards to features being introduced and to preserve the user experience, I currently wouldn't prefer to complicate this application with extra settings in order to suit the needs of different users.
If you think that local storage feature is needed for your specific use case, then you are more than welcome to host your own version of this application as long as you provide attribution in any reasonable manner. This application should be pretty easy to host under GitHub Pages for free. Or if you have any ideas which you want to further discuss, welcome to further comment on this PR.
I appreciate your detailed reasoning in the reply comment, I'll opt to fork this and take it in my own direction. It's just for personal use anyhow but I'll be sure to attribute it and follow any licence.
Description
This introduces local storage capability so that the list of names persists between refreshes and browser/open close.
How has this been tested?
Locally during development, exercised by the linter.
Types of changes
feat
fix
refactor
test
Remarks
Was pretty easy to contribute (: