akkartik pushed to main at akkartik/view.love

1 month ago

akkartik pushed to main at akkartik/text.love

1 month ago

akkartik pushed to main at akkartik/lines.love

1 month ago

akkartik pushed to main at akkartik/view.love

2 months ago

akkartik pushed to main at akkartik/text.love

2 months ago

akkartik pushed to main at akkartik/lines.love

2 months ago

akkartik pushed to main at akkartik/lines.love

  • a7e2125b99 ensure tapping on editor brings up soft keyboard

2 months ago

akkartik pushed to main at akkartik/view.love

  • 9d1bea2941 Merge text.love
  • 6b33c9e223 Merge lines.love
  • 4e9298dda1 bugfix in cursor positioning scenario: - create a long wrapping line - tap past end of first screen line Before this commit the cursor would be positioned not quite at the end of the screen line but one character before. In effect there was no way to position cursor at end of a wrapping line. I'm not sure how this bug has lasted so long. It was introduced in commit 8d3adfa36 back in June 2022, which was itself billed as a bugfix for "clicking past end of screen line". But when I go back to it this bug exists even back then. How did I miss it?! I wrote a test back then -- and the test was wrong, has always been wrong.
  • View comparison for these 3 commits »

2 months ago

akkartik pushed to main at akkartik/text.love

  • 6b33c9e223 Merge lines.love
  • 4e9298dda1 bugfix in cursor positioning scenario: - create a long wrapping line - tap past end of first screen line Before this commit the cursor would be positioned not quite at the end of the screen line but one character before. In effect there was no way to position cursor at end of a wrapping line. I'm not sure how this bug has lasted so long. It was introduced in commit 8d3adfa36 back in June 2022, which was itself billed as a bugfix for "clicking past end of screen line". But when I go back to it this bug exists even back then. How did I miss it?! I wrote a test back then -- and the test was wrong, has always been wrong.
  • View comparison for these 2 commits »

2 months ago

akkartik pushed to main at akkartik/lines.love

  • 4e9298dda1 bugfix in cursor positioning scenario: - create a long wrapping line - tap past end of first screen line Before this commit the cursor would be positioned not quite at the end of the screen line but one character before. In effect there was no way to position cursor at end of a wrapping line. I'm not sure how this bug has lasted so long. It was introduced in commit 8d3adfa36 back in June 2022, which was itself billed as a bugfix for "clicking past end of screen line". But when I go back to it this bug exists even back then. How did I miss it?! I wrote a test back then -- and the test was wrong, has always been wrong.
  • aab9e50acb bugfix in cursor positioning scenario: - create a long wrapping line - tap past end of first screen line Before this commit the cursor would be positioned not quite at the end of the screen line but one character before. In effect there was no way to position cursor at end of a wrapping line. I'm not sure how this bug has lasted so long. It was introduced in commit 8d3adfa36 back in June 2022, which was itself billed as a bugfix for "clicking past end of screen line". But when I go back to it this bug exists even back then. How did I miss it?! I wrote a test back then -- and the test was wrong, has always been wrong.
  • View comparison for these 2 commits »

2 months ago

akkartik pushed to main at akkartik/lines.love

  • aab9e50acb bugfix in cursor positioning scenario: - create a long wrapping line - tap past end of first screen line Before this commit the cursor would be positioned not quite at the end of the screen line but one character before. In effect there was no way to position cursor at end of a wrapping line. I'm not sure how this bug has lasted so long. It was introduced in commit 8d3adfa36 back in June 2022, which was itself billed as a bugfix for "clicking past end of screen line". But when I go back to it this bug exists even back then. How did I miss it?! I wrote a test back then -- and the test was wrong, has always been wrong.

2 months ago

akkartik pushed to main at akkartik/view.love

2 months ago

akkartik pushed to main at akkartik/text.love

2 months ago

akkartik pushed to main at akkartik/lines.love

2 months ago

akkartik pushed to main at akkartik/lines.love

2 months ago

akkartik pushed to main at akkartik/lines.love

2 months ago

akkartik pushed to main at akkartik/view.love

  • dedb843535 Merge text.love
  • 348852ee2b Merge lines.love
  • 95d88a8298 use editor state font for width calculations
  • 4121613fc6 don't save settings on error in source editor
  • 5d4fd4aa93 fix still more issues with the previous scenario - source editor always expects relative paths - refresh mocked data There's still one issue after this: the font size saved in the config file is the one we use in tests. More broadly, Editor_state is completely wrong. Ideally I'd just not save any settings for the source editor if the tests fail.
  • View comparison for these 6 commits »

3 months ago

akkartik pushed to main at akkartik/text.love

  • 348852ee2b Merge lines.love
  • 95d88a8298 use editor state font for width calculations
  • 4121613fc6 don't save settings on error in source editor
  • 5d4fd4aa93 fix still more issues with the previous scenario - source editor always expects relative paths - refresh mocked data There's still one issue after this: the font size saved in the config file is the one we use in tests. More broadly, Editor_state is completely wrong. Ideally I'd just not save any settings for the source editor if the tests fail.
  • 57fb2d4b57 clean up test mocks before aborting Scenario: modify a test to fail in the source editor delete any settings in the 'config' file in the save dir start lines.love press C-e to switch to source editor Before this commit, this scenario led to the following events: the C-e keypress invokes App.run_tests_and_initialize() the failing test results in a call to error() the call to error() is trapped by the xpcall around the event handler in love.run handle_error runs Current_app is 'source', so love.event.quit() is triggered love.quit() is invoked source.settings() is invoked App.screen.position() is invoked, which calls the test mock Since App.screen.move was never invoked, App.screen.position() returns nil The 'config' file is written without values for source.x and source.y As a result, future runs fail to open. This is likely a corner case only I will ever run into, since I'm careful to never commit failing unit tests. Still, I spent some time trying to figure out the best place to fix this. Options: * don't write config if Error_message is set but we do want config written in this scenario: * we hit an error, source editor opens * we spend some time debugging and don't immediately fix the issue * we quit, with some new files opened in various places * hardcode source.settings() to call love.window.getPosition() rather than App.screen.position(). drawback: weird special case * clean up test mocks before aborting this seems like something we always want I'm not very sure of my choice. This bug doesn't leave me feeling very great about my whole app. Arguably everything I've done is bullshit hacks piled on hacks. Perhaps the issue is: - naked error() in LÖVE apps never invokes love.quit(), but - an unhandled error within my handle_error invokes love.quit() (via love.event.quit) Perhaps LÖVE should provide a way to abort without invoking the quit handler. There's literally no other way in LÖVE to request a quit.
  • View comparison for these 5 commits »

3 months ago

akkartik pushed to main at akkartik/lines.love

  • 95d88a8298 use editor state font for width calculations
  • 4121613fc6 don't save settings on error in source editor
  • 5d4fd4aa93 fix still more issues with the previous scenario - source editor always expects relative paths - refresh mocked data There's still one issue after this: the font size saved in the config file is the one we use in tests. More broadly, Editor_state is completely wrong. Ideally I'd just not save any settings for the source editor if the tests fail.
  • 57fb2d4b57 clean up test mocks before aborting Scenario: modify a test to fail in the source editor delete any settings in the 'config' file in the save dir start lines.love press C-e to switch to source editor Before this commit, this scenario led to the following events: the C-e keypress invokes App.run_tests_and_initialize() the failing test results in a call to error() the call to error() is trapped by the xpcall around the event handler in love.run handle_error runs Current_app is 'source', so love.event.quit() is triggered love.quit() is invoked source.settings() is invoked App.screen.position() is invoked, which calls the test mock Since App.screen.move was never invoked, App.screen.position() returns nil The 'config' file is written without values for source.x and source.y As a result, future runs fail to open. This is likely a corner case only I will ever run into, since I'm careful to never commit failing unit tests. Still, I spent some time trying to figure out the best place to fix this. Options: * don't write config if Error_message is set but we do want config written in this scenario: * we hit an error, source editor opens * we spend some time debugging and don't immediately fix the issue * we quit, with some new files opened in various places * hardcode source.settings() to call love.window.getPosition() rather than App.screen.position(). drawback: weird special case * clean up test mocks before aborting this seems like something we always want I'm not very sure of my choice. This bug doesn't leave me feeling very great about my whole app. Arguably everything I've done is bullshit hacks piled on hacks. Perhaps the issue is: - naked error() in LÖVE apps never invokes love.quit(), but - an unhandled error within my handle_error invokes love.quit() (via love.event.quit) Perhaps LÖVE should provide a way to abort without invoking the quit handler. There's literally no other way in LÖVE to request a quit.
  • View comparison for these 4 commits »

3 months ago

akkartik pushed to main at akkartik/view.love

3 months ago