Open rmpowell77 opened 4 years ago
Maybe not in models
(Show model), as we don't need to save currentlyEditingSheet
in the show file we are saving. This should be similar to fourStepGrid
, where it is kept in the global state, but not something that we need to save. https://github.com/calband/calchart-redesign/blob/master/src/store/index.ts#L13
This would be a good issue to actually build out the UI for this as well in the Left Menu. Maybe something simple for now like a number input that controls what StuntSheet is currently being shown.
With CalChart v3 we found that saving the sheet you were editing was really helpful; if you save, quit, then re-open, you would always start at sheet 1. So the sheet that you are currently editing is actually part of the show editing state that should probably be saved.
Imagine if you were editing a super big document with 100s of pages... if you closed the document and then had to start at the beginning that would be really painful. Saving where you were last editing is a very nice feature, so I would contend that the page currently being edited is part of the show.
Yeah, that's true that it'd be very helpful to be save that sort of stuff... Were there other things related to viewing the Show that was saved as well? Maybe some of the undo state?
I'm thinking about making a new model for viewing related data we need to save like currentlyEditingSheet
and others. What do you think?
After thinking about this some more, I think we should do the following:
currentlyEditingSheet
and other viewing related settings in the saved file.I am thinking about the following use case for a STUNT member:
currentlyEditingSheet
is 1).And for a regular bandsmen:
If we follow through with this, it changes the scope of the issue.
That sounds like a great plan! The idea being per person edit information gets stored in HTML LocalStorage, and the show itself goes somewhere else.
I think maybe there are two types of local storage: Per Show and All Shows.
All Show editing are the things that need to persist across editing several shows. Some people may not want to have 2 step spacing on for their type of editing, so that becomes a All Shows setting, that just gets applied in general to all the show editing. Field color would fall into this.
The per show local storage would include things like what page you're editing, what points are selected).
So we should have this setting be part of a local storage, and have that persist across opening and closing of shows
:+1: For now, let's just keep currentlyEditingSheet
in the state, and then let's deal with saving the per show and all show settings to local storage in a different issue.
One more thing about currently editing sheet; because different shows have different states, and people could be editing several shows at once, we actually need a per-sheet local storage. Maybe a table indexed by show?
And perhaps because each show could have the same title (default, if you just use the basic one), maybe we need a UUID scheme for each show so they are in fact unique -- don't rely on "title" as being the unique key.
Oh interesting. I was just thinking of only maintaining state of whatever show was last being worked on. This sounds like a good suggestion. Maybe we can split this up into 2 issues?
Also, when the time comes, it’ll be interesting to see if we can properly open two different tabs, each with a different show. Will have to test in the future.
I think we're going to need a
currentlyEditingSheet
property on the Show model. This will allow us to know what sheet the grapher is currently on so we can have the grapher show that sheet.