Closed benloh closed 1 year ago
In GitLab by @daveseah on Jun 25, 2022, 11:32
approved this merge request
In GitLab by @daveseah on Jun 25, 2022, 11:32
this appears to function
In GitLab by @daveseah on Jun 25, 2022, 11:32
mentioned in commit 59c88633d98f88a8a2a4f20341b797fa2a010195
Merges dev-bl/next-gui-codeeditor -> dev-next-gui-integration
Background
The Script Wizard GUI requires a lot of context to "intelligently" guide students as they enter gemscript commands. In an ideal world, Character
initScripts
and RoundinitScript
andendScripts
would also use a full Script Wizard GUI to guide students.However, building out that interface will be very time consuming, primarily because of
a) constructing the context for Character initScripts and Round scripts is not straightforward. Unlike Character scripts that are naturally contextualized by their parent blueprints, Character initScripts and Round scripts require a different level of scoping.
b) the Script Wizard GUI has a very big screen footprint, and it would be difficult to completely redo the interface to accommodate the large footprint in the time we have remaining.
The existing initScript editors are fairly limited: you can only add and edit certain properties with the UI, and more sophisticated gemscript calls are not supported at all by the UI. Moreover, with some significant infrastructure changes to the way keywords are implemented, the old UI elements are no longer tenable without a significant amount of rewrite. We really needed a solution that could supporting editing the full scripts in the UI.
Given the limited time we have remaining, we felt that we needed to develop a compromise placeholder solution.
Placeholder Solution
We anticipate that most users would set Character initScripts simply by adding a new character and dragging them into place. Any kind of actual initScript editing is rare, and primarily used in specialized blueprints, and therefore not commonly done by most novice students.
Similarly, we expect that most Round script editing would be done by experts. Novices may tweak a value here or there, but the heavy lifting is handled by experts.
Given that these scripts will primarily be edited by experts, we thought a simple text code editor would provide the most flexibility for both displaying the existing text, and enabling editing of any and all gemscript code.
This merge request introduces a revamped code editor in:
I. Script Wizard UI II. Character (Instance) initScript III. Round initScript and endScript
To Test
git fetch && git checkout dev-bl/next-gui-codeeditor
npm run build && npm run gem
http://localhost/app/login
http://localhost/app/main?project=Moths-Activity-Migration
NOTE: Due to some project file changes with in the
dev-next-*
branches, some older projects may not open properly.I. Script Wizard UI
The "Dev Wizard" UI prototype that used to run in a separate "GUI Wizard" application page has now been folded into the old ScriptEditor. The ScriptEditor default view is now the wizard view.
In addition, the Code view of the ScriptEditor has now been revamped to work seamlessly with the Wizard view. You can add gemscript to the Wizard view, click to the "Code" view to see the full gemscript, edit the script by hand, and then switch seamlessly back into the "Wizard" view to view your text changes.
II. Character (Instance) initScript
The old Character (Instance) Editor now supports the use of a code editor to define and update the character initScripts.
III. Round initScript and endScript
The Rounds editors now uses the same text editor for viewing and updating the
initScript
andendScript
s for rounds.The next simulation run should make use of the text changes.
The code editor may be difficult to work with for longer texts. You're probably better off copying and pasting the script into another editor.
Future
If there is time remaining, and if the research team decides that this is a high priority, we can revisit the possibility of hacking in some kind of property-oriented editor for Character initScripts.