Commit Graph

1832 Commits

Author SHA1 Message Date
Kartik K. Agaram 665e80f780 update list of forks 2024-03-23 09:11:11 -07:00
Kartik K. Agaram 5ea87b8599 stop using nativefs for file location
nativefs doesn't work on iOS since LÖVE v11.5, so I should stop using it
at least on forks for mobile devices.

I still use it in a couple of cases:
* on a file DELETE request from the driver
* when trying to write modifications from the driver to the original
  location
2024-03-23 09:01:41 -07:00
Kartik K. Agaram 29b8fc4142 Merge carousel.love 2024-03-22 18:36:55 -07:00
Kartik K. Agaram e848a890ef shield script from touch events when showing editor 2024-03-22 17:29:29 -07:00
Kartik K. Agaram 6c65b5dcdb unstash a stashed file
Current design choices:
* Unstashing doesn't delete the file. You have to bump down to the
  scratch screen for that.
* Can't unstash if the file already has local modifications. Decide
  whether to revert or stash them.
2024-03-17 15:22:53 -07:00
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 8508638582 new menu option: revert local changes 2024-03-17 12:12:31 -07:00
Kartik K. Agaram 9246567511 indicate local modifications in editor title bar 2024-03-17 12:01:49 -07:00
Kartik K. Agaram bd96e36304 Merge carousel.love 2024-03-17 11:58:28 -07:00
Kartik K. Agaram a7fb944976 use an available constant 2024-03-17 11:56:42 -07:00
Kartik K. Agaram 95f34d5b68 Merge carousel.love 2024-03-17 11:49:27 -07:00
Kartik K. Agaram 1f42711dde indicate unsaved changes 2024-03-17 11:01:25 -07:00
Kartik K. Agaram 6c596c0bcd hoist next_save to all saves
Now we can rely on its state even when we don't rely on autosave.
2024-03-17 10:54:26 -07:00
Kartik K. Agaram fff4dc198c explicitly state stance on autosave 2024-03-17 10:49:45 -07:00
Kartik K. Agaram 9fa94fd169 Merge carousel.love 2024-03-17 08:10:12 -07:00
Kartik K. Agaram ff27ad6ad4 swap copy and paste menu buttons
Scenario: every once in a while I try to paste on my phone (in the
overflow menu) and fat finger and tap 'clear' next to it instead.

I could try adding space between the buttons in the overflow menu, but
that creates cascading issues of how it should look. Swapping these two
buttons is a hacky way to ensure that buttons that mutate the buffer
are never side by side.
2024-03-17 08:04:13 -07:00
Kartik K. Agaram e0f0922c8f Merge carousel.love 2024-03-16 09:31:31 -07:00
Kartik K. Agaram c413f281cf add to list of forks 2024-03-16 09:30:18 -07:00
Kartik K. Agaram 180e582e58 standardize some copy between forks 2024-03-15 23:44:37 -07:00
Kartik K. Agaram 9dfd8fbf3e document gotchas on mobile 2024-03-15 23:03:50 -07:00
Kartik K. Agaram cd278f9a85 new fork: a template for carousel-based apps 2024-03-15 22:52:27 -07:00
Kartik K. Agaram fe06035b9d Merge carousel.love 2024-03-14 10:27:27 -07:00
Kartik K. Agaram bfc1f80b87 no, go back to drawing the menu after the editor
I originally made this change to keep the next/prev buttons from
overwriting the search bar. But now the dropdown menu up top gets
overwritten by the scrollbars! You can only see it if the window width
is just right, as happens on my phone.

I could fix this perfectly, but at the cost of some code complexity.
Just take that slight visual ugliness for now, it doesn't seem to impede
anything.
2024-03-14 10:19:27 -07:00
Kartik K. Agaram 5a217abf84 Merge carousel.love 2024-03-12 23:15:14 -07:00
Kartik K. Agaram 08f3b08f0e draw code editor after menu and output
scenario:
* run Carousel on a computer
* press ctrl+f

Before this commit, the search dialog that came up was occluded by the
output editor's scrollbar.
2024-03-12 23:08:07 -07:00
Kartik K. Agaram 31668ef53a Merge carousel.love 2024-03-10 22:34:33 -07:00
Kartik K. Agaram b710439890 Merge template-live-editor-mobile 2024-03-10 22:32:25 -07:00
Kartik K. Agaram 7fab028c1e Merge template-live-editor 2024-03-10 22:28:20 -07:00
Kartik K. Agaram 8d3bfa6ba0 stop recommending the terminal
Freewheeling apps have been stable for many months now.
2024-03-10 22:25:28 -07:00
Kartik K. Agaram ffb6a2919d Merge carousel.love 2024-03-10 21:47:46 -07:00
Kartik K. Agaram 960380b880 Merge template-live-editor-mobile 2024-03-10 21:46:51 -07:00
Kartik K. Agaram 5de5cdaf11 Merge template-live-editor 2024-03-10 21:41:58 -07:00
Kartik K. Agaram 01efe059a3 Merge text0 2024-03-10 21:41:24 -07:00
Kartik K. Agaram b281b3ddf4 Merge text.love 2024-03-10 21:40:10 -07:00
Kartik K. Agaram 732ae69382 Merge lines.love 2024-03-10 21:36:01 -07:00
Kartik K. Agaram 093da1e7f8 add a mirror and reorg mirrors 2024-03-10 20:15:46 -07:00
Kartik K. Agaram e04ea8590b Merge carousel.love 2024-02-25 00:26:08 -08:00
Kartik K. Agaram c7a81906cc slightly shrink the clickable area for a button
The reason is tooltips for buttons that lie along the left or bottom
edge of the app window. Since adding tooltips I noticed that the tooltip
on the 'next' button (which lies all down the right margin of the
window) would continue to be visible after the mouse moves off the
window. It turns out that LÖVE doesn't disable the mouse position
somehow after it goes off screen. It just remains at 0 or width-1 or
height-1.

Why was I not seeing the same issue with the 'previous' button? Kinda by
happy accident. The checks in button.lua were comparing using < and >,
not <= or >=. And the x coordinate when the mouse goes off window is 0.

So the quick solution is to remove one px of clickable area from the
bottom and right. It doesn't seem too hacky; the icon switches to
resizing the window anyway when you're _right_ at the border.

I'm also focusing now on the fact that pixel values in LÖVE go from 0 to
width-1 in spite of Lua's 1-based indexing in most places.
2024-02-23 15:23:28 -08:00
Kartik K. Agaram 3293f3e139 some keyboard shortcuts on non-mobile devices
Hopefully this is easy to remember from left to right:
- run is F1
- stop is F2
- hide/show is F3
- save is F4
- load is F5

There are also tooltips to introduce these shortcuts to newcomers.

Most of the shortcuts are only enabled when code is visible. In keeping
with existing conventions for mouse events, we leave most event handlers
for the script when code is hidden. The only exception is 'F3' to show
code. So if you want to use a shortcut 'k' when code is hidden, you have
to instead use 'F3 k F3'.

This is all tentative and open to change. But I'll probably grow more
reluctant to change the shortcuts in a few weeks or months.
2024-02-22 18:27:39 -08:00
Kartik K. Agaram 7232de5b2e missed a call 2024-02-21 13:10:26 -08:00
Kartik K. Agaram 84b9169337 extract functions for computing editor dimensions
Thanks Ryan for the suggestion.
2024-02-21 12:58:38 -08:00
Kartik K. Agaram 56268f09a4 add keyboard shortcuts for common operations 2024-02-21 06:45:37 -08:00
Kartik K. Agaram 2e0bb5611d Merge carousel.love 2024-02-18 21:12:41 -08:00
Kartik K. Agaram e81d371d87 support a resize handler 2024-02-18 21:11:30 -08:00
Kartik K. Agaram 60b74760da Merge carousel.love 2024-02-16 21:35:54 -08:00
Kartik K. Agaram 17ef130938 Merge template-live-editor-mobile 2024-02-16 21:35:26 -08:00
Kartik K. Agaram 8bbb0dfef1 Merge template-live-editor 2024-02-16 21:34:15 -08:00