Commit Graph

33 Commits

Author SHA1 Message Date
Kartik K. Agaram 1a3ddf4f41 Merge driver.love 2023-12-17 00:57:43 -08:00
Kartik K. Agaram f038fa1bcc merge bugfix 2023-12-17 00:55:37 -08:00
Kartik K. Agaram 99035b22f9 only add padding to the node being moved
This keeps the surface more stable as we move things around.
2023-12-13 08:23:20 -08:00
Kartik K. Agaram b7b45ff969 nudge colliding definitions aside when moving
Implementation copied from:
  https://akkartik.itch.io/carousel/devlog/649349/handling-cascading-collisions
2023-12-12 19:57:00 -08:00
Kartik K. Agaram 45c32104a8 Merge driver.love 2023-10-25 21:03:14 -07:00
Kartik K. Agaram 8c73b2f783 Merge luaML.love 2023-10-25 20:05:59 -07:00
Kartik K. Agaram 98111686c2 space 2023-10-25 09:29:25 -07:00
Kartik K. Agaram 72698c4204 Merge driver.love 2023-10-22 20:04:41 -07:00
Kartik K. Agaram f112dfea3d Merge luaML.love 2023-10-22 20:02:56 -07:00
Kartik K. Agaram 831bd0eb91 some debug prints
I'm noticing a bug where I click on a node sometimes and the cursor
doesn't appear. It's in driver.love, but I can't exclude it might be in
this fork as well. Might as well spread debug prints everywhere I might
catch this.
2023-10-22 11:42:09 -07:00
Kartik K. Agaram cba7183a09 prints for major events 2023-10-22 11:41:34 -07:00
Kartik K. Agaram d5e4443a64 Merge driver.love 2023-10-21 10:21:38 -07:00
Kartik K. Agaram f0b679644d clean up 2023-10-17 22:15:24 -07:00
Kartik K. Agaram 7da38acc0e Merge driver.love 2023-10-17 12:11:35 -07:00
Kartik K. Agaram 07e16036ff merge bugfix 2023-10-16 23:52:33 -07:00
Kartik K. Agaram c215a3ed28 Merge driver.love 2023-09-09 21:58:09 -07:00
Kartik K. Agaram 72baaf54fc bugfix: hide manifest nav after any mouse click
Either we clicked on a button or we clicked somewhere else.
2023-09-09 21:52:50 -07:00
Kartik K. Agaram 20ebde6b81 bugfix: mouse clicks on manifest navigator
I'd somehow gotten so used to using the keyboard I forgot I'd supported
the mouse. At least extremely initially.

I think there might still be one bug I haven't been able to reproduce:
sometimes clicking on the nav ends up going to edit.mouse_release with a
nil State. Which means Cursor_node.editor is nil somehow.

Thanks Myte for reporting this bug.
2023-09-09 21:44:50 -07:00
Kartik K. Agaram 97171d0569 couple of renames 2023-06-22 23:49:49 -07:00
Kartik K. Agaram 2697d5eb7f reply starting to work
I can't seem to break it, though I'm sleepy and don't have a good grasp
of the big picture.
2023-06-22 23:43:03 -07:00
Kartik K. Agaram 6a465257af reply button adds a reply
Still lots broken:
  - can't add more than one comment (not updating parent.replies)
  - not updating metadata on disk
2023-06-22 19:35:13 -07:00
Kartik K. Agaram b0ca118a7a mock-up of reply buttons
Doesn't do anything yet, just changes color.
2023-06-22 18:17:01 -07:00
Kartik K. Agaram 2a32a1468b bugfix: panning with mouse in file picker 2023-06-22 08:14:00 -07:00
Kartik K. Agaram 4dbd3b9864 ok, now mouse handlers have a decent story 2023-06-21 22:55:31 -07:00
Kartik K. Agaram 4735a138da click on file picker to open thread
There's one remaining issue: the DOM is changing between mouse press and
mouse release, which is confusing the select handler.

Options:
  * some sort of hacky thing to ignore the first mouse release
  * put the file picker handlers on mouse release rather than mouse
    press

There's some precedent for the latter option even if it might get
confusing in the presence of drag operations. But that seems confusing
either way. Just be consistent.
2023-06-21 22:48:47 -07:00
Kartik K. Agaram c8cd9bb6b6 start rendering file picker on the surface as well
This will make things more consistent in the long term, but I realize
one major cost: our button abstraction doesn't work well with luaML and
compute_layout. So we need something to replace it.
2023-06-21 22:28:56 -07:00
Kartik K. Agaram 37d5358290 start rendering the initialized thread
This required a little more restructuring of Global_state. It's not flat
now, it's hierarchical again, but in a different way.

after commit 3d89b8eb9d:
  post
    \- reply A
        \- reply B
    \- reply C

after commit f9f7dab9b7:
  post
  reply A
  reply B
  reply C

after this commit:
  row
    \- col
        \- indent 0
        \- post
    \- col
        \- indent 1
        \- reply A
    \- col
        \- indent 2
        \- reply B
    \- col
        \- indent 1
        \- reply C

The indents are just invisible rectangles of different widths with 0
height.

One change I had to make was to initialize_editor. Neither luaML and
driver load lines from disk, but that's arguably the common scenario to
support.
2023-06-20 20:10:10 -07:00
Kartik K. Agaram f9f7dab9b7 restructure Global_state
Instead of a tree of items, we now have a flat list. Each item knows its
depth. This structure is closer to what luaML's compute_layout needs.

For any future hierarchical functionality, each item still knows its
parent and replies as ids inside the metadata field.

Next step: redo A for this app. compute_layout should stay fairly
timeless across forks of luaML.

Pace layers for apps built on the box model:
  A
  B
  ...
  F (I think of on.draw as F)

A runs least frequently, F runs on every frame.

In this app, the plan is:
  * initialize_thread will load items inside Global_state
  * A will convert items into a relatively stable box model of rows,
    columns and text editors in Surface, using compute_layout as a
    helper.
  * B will recompute some aspects of Surface as the viewport moves.

Anything that changes the height of any box needs to rerun A. Anything
that moves the viewport reruns B.
2023-06-20 17:13:01 -07:00
Kartik K. Agaram fd5ca6f3f8 load in-memory data for a thread
Nothing displayed yet. I need to convert threads to Surface nodes.
2023-06-18 20:10:20 -07:00
Kartik K. Agaram 3917fa9d94 get rid of animation and editor movement
Editors also have some padding within their borders.
2023-06-18 13:04:18 -07:00
Kartik K. Agaram c3de51769c backport a few more changes from driver.love
None of these should affect behavior.
2023-04-22 22:29:22 -07:00
Kartik K. Agaram 2d5abe140b make order of files consistent with upstream
Luckily I only had a chance to mess this up in one fork.

And I don't need to actually make any changes because my definitions are
order-independent.
2023-04-22 18:50:18 -07:00
Kartik K. Agaram b138f1ff9b Merge template-live-editor 2023-04-16 11:30:56 -07:00