Feature request

Hi Chris,

Small feature requests:

Right now I can’t select stimulus groups with the keyboard in the Variables window. I expect to be able to use the down arrow to select a group/heading and then press the right arrow to expand and left arrow to close.

It would be nice to add descriptions or doc strings to variables and have those display in the variables window too.
How about MWEL like this?
var complicatedVariable = 0 (desc=‘set this to 1 for very complicated behavior’)

Any thoughts?

Also I just noticed that the ‘persistent’ spelling of the variable attribute doesn’t seem to induce persistence. Is that expected?

thanks,
Mark

Hi Mark,

Right now I can’t select stimulus groups with the keyboard in the Variables window. I expect to be able to use the down arrow to select a group/heading and then press the right arrow to expand and left arrow to close.

OK, I will try to make that possible.

It would be nice to add descriptions or doc strings to variables and have those display in the variables window too.

That’s a good idea. Maybe it could work using tooltips, i.e. you hover the cursor over the variable name, and the description appears in a box.

Also I just noticed that the ‘persistent’ spelling of the variable attribute doesn’t seem to induce persistence. Is that expected?

Yes, that is an ongoing embarrassment. I swear I’ll fix it eventually!

Cheers,
Chris

Sounds great on the keyboard shortcuts and the tooltip idea.

I had a distincy memory that both spellings used to work at some point, but obviously that was wrong. But I don’t mind spelling it with an “a” now that I know.

Mark

Hi Chris,

To give you a flavor of the kind of docs I plan to have for our variables, see attached. Some are fairly long. Tooltips are still fine with me as long as they accomodate this.

Mark

Attachment: PastedGraphic-3.png (1.16 MB)

Hi Mark,

Right now I can’t select stimulus groups with the keyboard in the Variables window. I expect to be able to use the down arrow to select a group/heading and then press the right arrow to expand and left arrow to close.

I’ve modified the variables window to work as you expect. The change will be in Monday’s nightly build.

Cheers,
Chris

Paul asked me about the below feature so I’m cc’ing him into this discussion:

@histed As of the current nightly build, variable descriptions are now supported. They work just as we discussed. In your experiment file:

var my_var = 2 (desc = 'This is the description for my_var')

Then, in MWClient’s variables window, if you hover over the name “my_var”, a tooltip will pop up with the provided description. (Here’s another example.)

Both regular and selection variables can have descriptions. The full name of the parameter is description, but “desc” is accepted as an alias.

Also, I added some general machinery to support parameter aliases, which means you’re now free to spell persistent correctly. “persistant” (ugh) is still accepted as an alias. I also added another alias, “saved”, which seems more intuitive and is probably what the parameter should have been named in the first place.

Cheers,
Chris

Very cool all around, aliases and descriptions- thank you!!
Mark

Hi Mark,

We just tried this, and we are not getting a tooltip to pop up.

The example I referenced still works for me, same as before. Note that the variables window needs to be the active window (i.e. the three dots/buttons in the upper left should be red, yellow, and green, not all gray), and you have to hover over the name of the variable (not its value). If those conditions apply, and you still don’t see a tooltip after a second or two, can you send me the experiment you’re running?

Also, Chris, what do you think about adding a third “description” column in the variables window?

We could do that, although I think tooltips are less intrusive (and also don’t require the window to be any wider).

Cheers,
Chris

Nina:

Fantastic thank you for the clarification! I think it just was slow to pop up - it takes about 3 seconds of hovering.

Great! Thanks for letting me know.

Mark:

I’d vote for adding a documentation column to the window, maybe one that is normally mostly hidden, so the window doesn’t have to be any wider. but I guess I could be convinced it’s not needed.

I think it’d be fine to add a hidden-by-default third column. I’ll put it on my to-do list.

Cheers,
Chris

Agree! Thanks