Commit Graph

11 Commits

Author SHA1 Message Date
Kartik K. Agaram ab11782662 add numeric suffix to stashed files 2024-03-17 15:02:45 -07:00
Kartik K. Agaram bd82e5ecbb load stashed files
I'm scaling down my ambitions. Stashed files can't have notes attached.
I think that encourages a higher scale of development on such apps than
is currently justified, given you're liable to lose all your work if you
upgrade LÖVE.

New plan: just name stashed files with a numeric suffix.

The remaining open question is now around unstash. Should unstash copy
or move?
2024-03-17 14:38:42 -07:00
Kartik K. Agaram fc75f62d17 start implementing stashed files
We can create them and see them on the file dialogs, but not yet load
them back.

I want stashed files to remember the original filename. I think that
implies the ability to add a note to them. But I don't yet know how to
represent the note on disk.

And this creates cascading questions, like should editing a stash file
continue to modify it or create a new version? How to create a new
version? Should unstash copy or move?
2024-03-17 13:54:20 -07:00
Kartik K. Agaram ec7f0bbe6e indicate local modifications in load/save dialog 2024-03-17 12:37:21 -07:00
Kartik K. Agaram a6f69931f3 Merge template-live-editor-mobile 2024-01-15 02:52:26 -08:00
Kartik K. Agaram 07b4fce750 ok/cancel buttons in file dialog 2023-11-26 10:21:42 -08:00
Kartik K. Agaram dc4cf14d28 make it look more like a dialog 2023-11-26 09:21:09 -08:00
Kartik K. Agaram b517a75eb9 filter file list based on input 2023-11-26 09:14:55 -08:00
Kartik K. Agaram daf75130d4 bugfix: skipping files near right margin 2023-11-26 09:04:42 -08:00
Kartik K. Agaram 1b898d4a2e type out a filename to load/save 2023-11-26 08:52:34 -08:00
Kartik K. Agaram 83ebcaa5c4 first draft of load/save buttons
Some considerations in the design so far:
* Desired flows:
  * start typing into a new pane, then save to a filename
  * load from a filename, then continue typing/running
  * save as a second file

* Should we autosave? I think not yet, because my editor's undo/redo
  functionality is not accessible yet on mobile. Android devices can't
  press 'ctrl', and the hotkeys aren't very discoverable.

  (I considered menu options for 'undo' and 'redo', but they won't be
  very ergonomic because my undo/redo functionality is primitive and
  doesn't support grouping similar operations. Now you're stuck tapping
  '>>', then 'undo' and losing one character. Then the menu closes and
  you have to do it all over again.)

  Another knock against autosave on mobile: autosave on quit is
  unreliable. At least on my Android devices, LÖVE doesn't trigger
  love.quit when you swipe away an app. iOS of course has no such notion
  in the first place.

* Menu buttons take up space, and I'm loath to expend 2 more buttons.
  However, I don't see a good alternative:

  * We can't use a single button to bind a filename to a pane until we
    get autosave.

  * Save on run? It doesn't save a button, but maybe we can keep 'save'
    up top because we'll want to keep hitting it in the absence of
    autosave. However, I don't want to lose data just because I started
    typing out a long program that never got to a runnable point.

* I'd like to keep 'save' always up. But newcomers might have more
  trouble finding things if load and save are separated from each other.
  Seems like the sort of thing Mike complained about before the current
  button organization.

==> conclusion: no autosave, 2 buttons, load and save

* I want to follow MiniIDE and only save to a single directory (no
  subdirectories, even). Simplifies the file dialog.

* Where should this directory live? Source base risks growing really
  large and unwieldy over time as we share files between lots of LÖVE
  apps. At least, Mike has that problem. Save dir is utterly
  inaccessible to other apps -- including later versions of this one.
  Once you delete one version of an app (say before installing a new
  version) the only way to find your files is to wade through lots of
  cryptic directories inside source dir. And you'd need a new LÖVE app
  to do that.

==> conclusion: save to a fixed subdir of source base dir. That way only
Lua Carousel will save there, but different versions share a common
space.

* Should examples be savable? If yes, we could have conflicts. If no,
  it feels like a gotcha when someone starts editing an example.

==> conclusion: allow examples to be saved, but that creates a new copy
of them on restart. It'll be weird that the order changes, but seems
like the best option.

* Where to show the current filename? I don't want to further reduce
  space for buttons. A smaller font seems necessary here to squeeze the
  filename into an interstitial of the UI.

Still to do: providing a non-existing file to load/save. I plan a
command palette UI for filtering or selecting a new file.
2023-11-25 23:40:28 -08:00