-
Notifications
You must be signed in to change notification settings - Fork 6
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
Sequence Editor Auto-indent, Ground support #1425
Conversation
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.
If I just type "R", I'm only seeing "relative" as a suggestion. Once I type "RE", then I see the request suggestion. Is that intentional?
Yep, the user will almost always need to start a line with a time tag (C, R, E, A) so it should be showing up as the first thing when you type. |
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.
The /utilities/codemirror/custom-folder.ts
file is getting a little more complicated. Would it be possible to start adding some unit tests for this?
3aaffdc
to
32fa2ff
Compare
Unit test will be kinda hard as it is returning a fold range which will be hard to calculate on a treenode. |
I see. There's no way to manually create the tree given some test input code the way it's done in the editor? |
Added custom folding for ground_block, ground_event, request, load, activate, metadata, models You can now nest folding to collapse huge blocks of code
* Can now auto-complete request, activate, load, ground_event, and ground_blocks, * Improve some minor bugs with autocomplete giving wrong suggestions when the user is typing a comment
We can expand on this for conditional and loops in the future. We also need to probably expose this to the adaptation so missions can override this behavior.
7201da5
to
3c965bd
Compare
3c965bd
to
78f3951
Compare
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.
lgtm! thank you!
372d630
to
2b0313c
Compare
2b0313c
to
fbb48c8
Compare
LGTM, thanks @goetzrrGit . |
Great catch! Merge away! |
* Added custom folding Added custom folding for ground_block, ground_event, request, load, activate, metadata, models You can now nest folding to collapse huge blocks of code * Update auto-complete * Can now auto-complete request, activate, load, ground_event, and ground_blocks, * Improve some minor bugs with autocomplete giving wrong suggestions when the user is typing a comment * Add auto-indent capabilities to the editor. We can expand on this for conditional and loops in the future. We also need to probably expose this to the adaptation so missions can override this behavior. * add unit test for custom folding * Update Custom Folding
Closes #1409
Custom Folding:
Adds custom folding capabilities for commonly used code blocks (ground_block, ground_event, request, load, activate, metadata, models).
Enables nested folding for better code organization and readability.
Autocomplete:
Extends autocomplete functionality to include request, activate, load, ground_event, and ground_blocks.
Fixes minor bugs related to incorrect autocomplete suggestions.
Auto-Indent:
Implements basic auto-indent functionality for improved code formatting.
Future improvements may include support for conditionals and loops.
NOTE: We should expose this feature to the adaptation layer.
You can take this below sequence and play around with the folding