Commit Graph

29 Commits

Author SHA1 Message Date
Kartik K. Agaram 4c454ec07b Merge carousel.love 2024-02-08 03:03:00 -08:00
Kartik K. Agaram 5b5d3de6d9 provide a place to set the font
Thanks Ryan Kessler for suggesting this accessibility improvement.
2024-02-06 14:56:53 -08:00
Kartik K. Agaram 6ab646a976 Merge carousel.love 2024-01-15 03:24:51 -08:00
Kartik K. Agaram a6f69931f3 Merge template-live-editor-mobile 2024-01-15 02:52:26 -08:00
Kartik K. Agaram dd7e6e395d switch to a single global output editor 2023-12-31 22:51:04 -08:00
Kartik K. Agaram 694a148043 run script on startup; new button to switch to source editor 2023-12-31 21:45:12 -08:00
Kartik K. Agaram f8b3910483 screens now run 2023-12-31 16:59:34 -08:00
Kartik K. Agaram d2ff7e8a72 get rid of example screens 2023-12-31 15:52:44 -08:00
Kartik K. Agaram 6f758f023f new fork: a personal dashboard for mobile devices 2023-12-31 15:48:24 -08:00
Kartik K. Agaram eba4d8e0bb replace some calls with my names 2023-12-18 11:51:58 -08:00
Kartik K. Agaram 1acc66b2c5 mount old location of screens if possible
This still won't work on iOS, but should degrade gracefully.
2023-12-18 07:58:18 -08:00
Kartik K. Agaram f9c2d7883f Merge template-live-editor-mobile
Lua Carousel now tested to load/save screens from/to save dir.
2023-12-18 07:53:47 -08:00
Kartik K. Agaram 50d8bd364b use the obvious name for the font global
I should perhaps namespace things somehow to keep from colliding with
other people's scripts, but I don't have a plan for that yet so I'm not
going to carve out a singl exception just for one case I ran into
myself. For now, it's a sharp edge that scripts might conflict with
internal Carousel variables. A single space of definitions has many
advantages, but also some disadvantages.
2023-12-14 19:05:08 -08:00
Kartik K. Agaram 9ce1f1660f handle scripts that change the font 2023-12-13 18:24:29 -08:00
Kartik K. Agaram f3965c61e8 save the list of open files across restart 2023-11-26 12:26:22 -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
Kartik K. Agaram 90319082f5 give example panes a name 2023-11-22 21:11:31 -08:00
Kartik K. Agaram 77eb05b50b pass remaining love handlers through
Now I have touchpressed and touchreleased working!

The stack of these handlers is quite deep at this point:
  car.* -> on.* -> App.* -> love.*

But I feel like I have a good rationale for each of these:
  love.* - OS
  App.* - testable
  on.* - live-editable
  car.* - the shell
2023-11-22 16:11:05 -08:00
Kartik K. Agaram cf286c5ebb preserve settings across restart 2023-11-21 12:11:26 -08:00
Kartik K. Agaram b92820fa9b subject people to a tutorial 2023-11-20 23:05:33 -08:00
Kartik K. Agaram 5a998feca7 implement carousel buttons for inserting/switching current pane 2023-11-19 13:37:41 -08:00
Kartik K. Agaram e38191fc4f aggregate global state inside a 'pane' object
We're soon going to start juggling multiple of these.
2023-11-19 13:15:06 -08:00
Kartik K. Agaram 809a980213 implement second, 'output' editor
Also its scrollbar.
2023-11-18 21:18:09 -08:00
Kartik K. Agaram ff14bfd4ce bugfix: stay within window boundaries
scenario: type a single long line wrapping past bottom of line

Before this commit we were overflowing the window.
Root cause: not understanding the precise semantics of edit.bottom.
Many of our apps want to print an extra line just so we can see the
letters peeking out from the bottom.
2023-11-18 03:56:10 -08:00
Kartik K. Agaram e03d3ea172 responsively increase/decrease font height
Only using hotkeys for now, which are only available on non-mobile
devices, and not very discoverable. But this is an accessibility
foundation.
2023-11-15 09:30:17 -08:00
Kartik K. Agaram d6abaaa582 resize handler 2023-11-15 07:37:36 -08:00
Kartik K. Agaram 28f1e113a4 start of the visual skeleton 2023-11-15 07:04:34 -08:00
Kartik K. Agaram 72210616c7 editor widget now takes a bottom margin
This seems easy! :crossed-fingers:
2023-11-15 06:14:07 -08:00
Kartik K. Agaram 01a8e0bb9f new fork: carousel shell 2023-11-15 06:06:56 -08:00