Commit Graph

1676 Commits

Author SHA1 Message Date
Kartik K. Agaram 387dfe4f33 Merge driver.love 2023-06-21 22:20:42 -07:00
Kartik K. Agaram 29acb39e0c Merge luaML.love 2023-06-21 22:19:06 -07:00
Kartik K. Agaram b0e870b293 bugfix: node width shouldn't be scaled by zoom
Instead, we're scaling font size by zoom.
2023-06-21 22:15:14 -07:00
Kartik K. Agaram f9784faaf7 indent 2023-06-21 22:12:46 -07:00
Kartik K. Agaram abaa62b4ac . 2023-06-20 23:20:36 -07:00
Kartik K. Agaram 3a2b77b6c7 . 2023-06-20 23:18:25 -07:00
Kartik K. Agaram eae6fe2cb3 port Readme from previous iteration 2023-06-20 23:17:49 -07:00
Kartik K. Agaram ea0b96bf04 add some vertical space between comments 2023-06-20 22:39:45 -07:00
Kartik K. Agaram df1dc8c4b9 scroll back to top when switching files 2023-06-20 22:39:12 -07:00
Kartik K. Agaram e7063abc7c add border to each item in a thread 2023-06-20 22:38:49 -07:00
Kartik K. Agaram c37f204882 size font for file picker 2023-06-20 22:32:36 -07:00
Kartik K. Agaram 3f2174a546 Merge driver.love 2023-06-20 22:20:23 -07:00
Kartik K. Agaram e6ec2dc588 Merge luaML.love 2023-06-20 22:15:51 -07:00
Kartik K. Agaram 50449ba7c6 . 2023-06-20 22:10:14 -07:00
Kartik K. Agaram 8a95025036 borders around editor nodes 2023-06-20 21:58:15 -07:00
Kartik K. Agaram 45ab01f87c roll back one divergence with upstream
I have a new, better plan for border vs background.
2023-06-20 20:41:34 -07:00
Kartik K. Agaram 4e3e41e1c0 go back to file picker on ctrl+o 2023-06-20 20:37:46 -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 551e072926 Merge driver.love 2023-06-20 17:37:36 -07:00
Kartik K. Agaram a4827d54c1 Merge luaML.love 2023-06-20 17:36:20 -07:00
Kartik K. Agaram 5e5e598cab some helpers 2023-06-20 17:34:03 -07:00
Kartik K. Agaram a6b725e77a get rid of driver.love's node.key
I don't plan to support moving nodes around the surface in this fork.
2023-06-20 17:29:21 -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 3d89b8eb9d . 2023-06-20 16:50:25 -07:00
Kartik K. Agaram cc8ab6f574 bring back autosave
It was ripped out in driver.love in commit 813639c4db, but it's back one
generation later.
2023-06-20 16:49:48 -07:00
Kartik K. Agaram f4450c891d Merge driver.love 2023-06-19 10:32:56 -07:00
Kartik K. Agaram e479baf449 Merge luaML.love 2023-06-19 10:20:31 -07:00
Kartik K. Agaram 8a183b2214 Merge template-live-editor 2023-06-19 10:20:07 -07:00
Kartik K. Agaram 3fdd0d339c slightly easier to understand
A comment is now in a better place.

Inlining an unnecessary function boundary removes ambiguity between the
similar names load_all and load_files_so_far. It also shrinks call
stacks on error.
2023-06-19 10:14:42 -07:00
Kartik K. Agaram d486f94a4b bail early on errors
Returning errors can feel warm and fuzzy, but it does no good if the
caller doesn't actually check the return value.

Scenario:
  define a new function B
  call it when initializing global variable A
  everything works fine
  restart

Before this commit you get a weird error because we silently stopped
loading, and now lots of functions are missing.

After this commit you get a better error message.
2023-06-19 09:56:24 -07:00
Kartik K. Agaram 2f933e383d delete a dead variable 2023-06-19 09:46:25 -07:00
Kartik K. Agaram 642be6ee3a Merge luaML.love 2023-06-18 22:50:08 -07:00
Kartik K. Agaram 75477cfbe7 Merge template-live-editor 2023-06-18 22:49:16 -07:00
Kartik K. Agaram 7b5ede43e2 slightly standardize on app-specific stuff 2023-06-18 22:44:27 -07:00
Kartik K. Agaram 1ba7bc52c7 include client app name in window title 2023-06-18 22:43:27 -07:00
Kartik K. Agaram 3afcdbc8db support mouse wheel 2023-06-18 22:18:53 -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 28a937a2e7 get rid of more dead code 2023-06-18 19:18:02 -07:00
Kartik K. Agaram defb391a96 get rid of definitions (mostly) 2023-06-18 19:12:48 -07:00
Kartik K. Agaram a9751ef1e4 get rid of manifests 2023-06-18 19:08:29 -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 55be59d110 get rid of some code editor features
- line numbers
- syntax highlighting

Now it's clear that the border around editors is not ideal; we need some
padding.
2023-06-18 11:50:51 -07:00
Kartik K. Agaram 5b91bc288c new fork: pothi
Second attempt based on driver.love
2023-06-18 11:16:58 -07:00
Kartik K. Agaram b995a020aa Merge luaML.love 2023-06-17 10:56:06 -07:00
Kartik K. Agaram c1dd199201 Merge template-live-editor 2023-06-17 10:54:52 -07:00
Kartik K. Agaram 66baa11748 Merge text0 2023-06-17 10:54:11 -07:00
Kartik K. Agaram 8f5227a58a Merge text.love 2023-06-17 10:53:42 -07:00
Kartik K. Agaram f7382363c2 Merge lines.love 2023-06-17 10:47:43 -07:00
Kartik K. Agaram 9ce9725bd6 stop highlighting strings in code
It works right so rarely that it's a net negative. I'll bring it back
if I ever start tokenizing on non-whitespace.
2023-06-17 10:41:50 -07:00
Kartik K. Agaram 6602038fd7 keep surface bounds updated when zooming out
scenario:
  move a buffer way outside the initial boundary
  press C-g to zoom out

Before this commit, C-g always zoomed out to the bounds computed at the
start of the session.
2023-06-15 18:41:16 -07:00