Closed benloh closed 1 year ago
added 1 commit
added 1 commit
added 2 commits
added 1 commit
added 1 commit
added 5 commits
@jdanish I feel like we now have basic coverage of help. I think it's worth testing the heck out of this and for you or your team to modify the codex-*.yaml
files. As you do so, keep in mind each help element might have three pieces of information:
info
is the specific description/definition of the item -- it will always display if it's presentinput
is essentially the instructions for the item -- it will display if info
is not availablename
will display if both info
and input
are unavailableAs you edit the help text, it's VERY important that you test how it displays:
Because of the complexity of all the interactions there are going to be edge conditions (specific combinations of selections/scriptlines) that are probably going to be broken and difficult to find.
In GitLab by @jdanish on Aug 24, 2022, 15:48
added 1 commit
In GitLab by @jdanish on Aug 24, 2022, 19:31
added 1 commit
In GitLab by @jdanish on Aug 25, 2022, 11:25
added 1 commit
added 6 commits
Some major rewrites to simplify the help. Also, moved all the method help out of the codex and reading them directly from the validation tokens instead. In English, what this means is the help for prop methods and feature methods are defined in:
class-sm-boolean
class-sm-number
class-sm-string
feat-*
In the static Symbols
definition at the bottom of each file.
info
is a description of the methodinput
is instructions for the method
The system will show input
if it's there, otherwise it'll fall back to info
.Also, we've introduced a hack where feature props gsNames can be looked up as codex-type info. e.g. The Touches prop touchTypes
can have its own help. More on this with the full documentation.
added 4 commits
added 1 commit
added 1 commit
added 6 commits
added 1 commit
In GitLab by @jdanish on Sep 3, 2022, 07:26
@benloh I noticed you marked ifExpr as deprecated but I thought the intention was to leave it as an expert function until version 2.0 so that we can handle cases such as if agent.propx > agent.propy. Still a few of those that I'd hate to have to find workarounds for if wee don't have to?
Sorry, poor word choice. ifExpr
still works, and is still usable via the wizard. The change was to move it to the "Expert" keywords.
added 3 commits
@jdanish Well that took forever, but I think the merge request shows how complicated it is...feel free to start playing with the system. It's more comprehensive than the previous version. But it also means there's a LOT more testing needed for every possible combination. I'm sure there are still things slipping through the cracks.
My plans is to review this with Sri tomorrow. We may very well end up with another round of refactoring.
Also, I will get the if
branch merged into here (that will also be complicated).
added 17 commits
dev-next
@jdanish NOTE that the help text currently has some debugging info attached to it to help us figure out the source of the help (e.g. "GSTYPE.info"). The intent would be to remove these before accepting the merge request and/or turning them into DBG mode only reports.
marked this merge request as draft
In GitLab by @jdanish on Sep 3, 2022, 15:50
Awesome, thanks!!
BUG: ObjRefSelector seems to mysteriously add "LOAD" as blueprint choice.
BUG: Inserting a reference to a wrong agent (e.g. in "Fish" enter a reference to "Algae" in a featProp call) will cause Main sim to stop with error.
(Not strictly a help issue)
added 1 commit
added 2 commits
added 1 commit
marked the checklist item BUG: ObjRefSelector seems to mysteriously add "LOAD" as blueprint choice. as completed
BUG: popup label for "x" is one letter wide. Where did the min-width go?
Not able to reproduce anymore?
marked the checklist item BUG: Inserting a reference to a wrong agent (e.g. in "Fish" enter a reference to "Algae" in a featProp call) will cause Main sim to stop with error. as completed
marked the checklist item BUG: popup label for "x" is one letter wide. Where did the min-width go? as completed
added 1 commit
added 1 commit
added 1 commit
marked this merge request as ready
Merging. Major infrastructure is in place and most bugs addressed.
Remaining help content work will take place in new branches.
mentioned in commit 6730d547e055db4591062edd09da48c2fbfa7be5
Merges dev-bl/feature-help -> dev-next
Branch:
dev-bl/feature-help
Includes
if
!269This is a first pass implementation of the full help system for the GUI Wizard scripting. It's rather complex and will need to be refined. It includes:
Much of the help content is actually the same, and what is displayed at any particular spot is dependent on what information is available and not available. Sometimes one type of help will override another type of help (e.g. for a slot, the selected slow item help is displayed by priority, if it is not available, we display the general slot help).
Other Changes
The "Save Line" button is moved to the top of the Line Editor panel (right panel) so the buttons are more prominent, always approximately in the same place, sand do not scroll off the screen with longer choice lists.
IMPORTANT propTypes are now lowercased:
string
,number
,boolean
. You'll need to change anyaddProp
lines to reflect this.String
will not have help available, butstring
will. (This was actually a change from about a month ago, and should be done with conversions. I believe the compiler does deal with the case issue, but the help system does not).Testing
Fully QAing/Testing the Help system is a rather daunting task. Ideally, you would review:
Things to watch out for:
Review the big picture:
[for the wiki]
HELP AUTHORING
These are the Types of help fields that have been defined (not all are currently in use):
input
-- Actions that the user should take (instructions)info
-- General description of the item (keyword, feature, method, parameter)[These types have also been defined in the yaml file, but they are not currently being used. For simplicity's sake, we might leave them out.
hint
-- A short tooltip (not currently used)syntax
-- Specification of the type of data that should be entered (not currently used)glossary
-- Longer definition of a particular feature (not currently used)]
Where help appears:
NOTES:
<bp>.<prop>
, featCall<bp>.<feat>,
and featProp<bp>.<feat>.<prop>
) essentially duplicates the top level help with informational and instrucitonal help keyed off of the syntax, selected tokens, and available choices.Help Content Files
Most of the help text content are in files called
codex-*.yaml
:In addition, help for GVAR methods are defined in each GVAR method:
Most of the current help text is rough still and needs a refinement pass. The easiest way to find where the help text is defined is simply to search for the text.
In general, you can safely modify the
info:
andinput:
fields. Watch for quotes and encoding issues.Modifying any other parameters may break the indexing and require modifications across the system. So only do so with care.
Mapping GEMSCRIPT Symbols to Help Content
AKA "How do I figure out which help a particular symbol is using?"
Help is keyed off of two pieces of information that have been defined for each symbol:
gsName
andgsType
.gsName
-- syntax,input
instructionsgsType
-- informational,info
Where are
gsName
andgsType
defined? It depends on the symbol.Keywords
addProp
,featCall
gsType
Keyword args
addProp <prop name arg>
,prop <prop name objref>
prop.tsx
validate
method.shelper
methods inclass-symbol-interpreter
for the specific slot -- e,g,shelper.agentObjRef()
HELP.ForGSrg()
method. -- e,g,agentObjRef
codex-gsargs.yaml
-- e.g. 'prop:objref'gsName
, the second value is thegsType
These are the index values to help.gvar methods and method args (boolean, number, string)
setTo
,add
gsName
andgsType
for each arg in thestatic Symbols: TSymbolData
line at the end of each file.gsName
, the second is thegsType
. e.g. forsetMin
, gsName =min value
, gsType =number
Feature props
movementType
,costumeName
props
in thestatic Symbols: TSymbolData
line at the end of each feature file (e.g.feat-movmeent.ts
)codex-features.yaml
that explains what the property is.Feature prop method args (subtypes)
featProp AgentWidgets.text setTo 'Charlie'
,featProp Movement.movementType setTo <prop method arg>
props
in thestatic Symbols: TSymbolData
line at the end of each feature file (e.g.feat-movmeent.ts
)movementTypes
includwander
andstop
, or thatglow
is a time value in seconds.gsName
andgsType
definitions. For example,movementType
is really just a string gvar, but we want to be able to displaymovmeentType
specific help for students to help them know what they should enter. See Subtype Help below for instructions.Feature methods
featCall Touches.monitor
static Symbols: TSymbolData
line at the end of each feature file (e.g.feat-movmeent.ts
)gsName
andgsType
are automatically set to the method name.codex-features.yaml
Feature method args
e.g.
featCall Touches.monitor <target blueprint arg> <touch type arg>
Feature method args are specified in
static Symbols: TSymbolData
methods
section.The
gsName
andgsType
definitions map to args defined incodex-features.yaml
. For example for the Touchesmonitor
method, the two argstargetBlueprintName
andtouchType
are defined in theTouches
section ofcode-features.yaml
e.g. infeat-movement.ts
the definitions are......which maps to...
codex-features.yaml
. Look for sections labeled# <feature> method args
for examples.Conditions tests
when
keyword are defined incodex-conditions.yaml
.events
onEvent
keyword are define dincodex-events.yaml
Feature Prop Subtype Syntax Label Help
Feature props often require specific entries that are not obvious. The generic string/number/boolean help is not sufficient for helping students figure out what they need to enter.
For example, for
featProp movementType setTo 'wander'
the argument for the featprop needs to be a specific identifier string (e.g. 'wander', 'stop', 'jitter', etc.). In order to provide this help, we need to set multiple things.1. Set a custom subtype for the gvar method in the feature definition.
In the feature definition, change the generic GVAR symbol maping to a custom value.
For example, for movementType, we would:
a. Edit
feat-movement.ts
b. Change this:
...to this...
What we're doing here is replacing the standard string
setTo
methodgsName
:gsType
specification ofstring:string
with a custom subtypemovementTypeString:string
. Now when the help system tries to look up help for the argument, instead of using the standard string help, it'll try to find amovementTypeString
help.NOTE that we called it
movementTypeSTRING
to differentiate it from themovementType
property name.NOTE you have to do this for every method you want to replace. Though in general
setTo
is probably sufficient.2. Add a custom subtype to
codex-features.yaml
For every custom subtype you define, you need to add a corresponding entry in the
codex-features.yaml
file.Look for the
# prop args
section for each feature.IMPORTANT: The entry needs to come under the feature the subtype belongs to. e.g. if you add
movementType
underPhysics:
by accident, it will not be found.For example:
Help Authoring Incomplete Items
While most of the Help infrastructure is now in place, there are still some key places that need to be fleshed out.
feat-movement.ts
's `movementType' for an exmaple of how this is done.code-*.yaml
files.GSNAME.info
See also !261 & !265 for original Merge Request.