-
-
Notifications
You must be signed in to change notification settings - Fork 13
Code views and editable programs #208
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Will look at this on Monday I think! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request introduces enhancements for code viewing and interactive program editing by updating text drawing options, improving keyboard event filtering, and adding support for loading edited program code.
- Added anchor and font parameters for text drawing in shapes.
- Implemented loading of edited program code and updated keyboard event handling.
- Improved code view functionality with enhanced text viewport and cursor calculations.
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
virtual-programs/shapes.folk | Added "anchor" and "font" options for drawing text. |
virtual-programs/programs.folk | Added logic to load and handle edited program code from disk. |
virtual-programs/print-blank.folk | Introduced new logic for printing blank pages via keyboard events. |
virtual-programs/points-at.folk | Modified outline color logic and added extra handling for outline updates. |
virtual-programs/keyboard.folk | Updated key event retraction logic with an additional condition. |
virtual-programs/editor.folk | Adjusted editor detection logic based on claim conditions. |
virtual-programs/code-view.folk | Overhauled code view handling including text viewport and cursor management. |
main.tcl | Minor adjustments for backward compatibility. |
Comments suppressed due to low confidence (1)
virtual-programs/keyboard.folk:139
- Since newKeyState is set equal to keyState on line 134, the condition '$keyState != $newKeyState' will always be false. Please verify if this additional check is necessary or if it needs to compare against a different value.
if {$now - $timestamp > 5000 || $keyState != $newKeyState} {
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should definitely have page-editing support built in, but I don't know if I like this hard separation (and duplication of logic) between code-view and editor. code-view also seems like it's an editor!
@cwervo do you have thoughts on this?
virtual-programs/code-view.folk
Outdated
@@ -0,0 +1,269 @@ | |||
# helper functions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this works well for me, but is there a reason it's basically a completely separate editor to the existing editor?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Three reasons:
- The existing editor always owns a program. I couldn't figure out how to get it to attach to an external program without some major logic changes.
- The existing editor's code window is tiny on a 1080p projector. I wanted to have an external code window to 1. have larger programs and 2. have multiplexing with a single keyboard.
- I was initially going to reuse a lot of the editor's functions, but the current editor tracks the cursor by an x+y pair, and that made the logic unnecessarily complex. I opted to track the cursor by its character position instead.
Clarify commands that are needed to run to set user sufficient user permissions. Make the user by default run the command to set user permissions
This code has diverged too much from One blocker is that code views in |
No description provided.