GIRA / PhysicalBits

A web-based programming environment for educational robotics that supports live coding and autonomy using a hybrid blocks/text programming language.
https://gira.github.io/PhysicalBits/
MIT License
18 stars 5 forks source link

Display all text in uppercase (for very young users) #15

Closed kristiank closed 4 years ago

kristiank commented 4 years ago

Young users who are able to read only in uppercase alphabet would really benefit of an interface setting option to display all text as uppercased.

This feature could be solved either by toggling the following CSS rule and repainting the blocks

* { text-transform: uppercase; }

or alternatively by adding a translation in all upper case. I would prefer the first solution, what do you think?

kristiank commented 4 years ago

I made a first attempt to demonstrate this functionality in #16.

kristiank commented 4 years ago

What is your opinion of this functionality? I changed the style to use small caps instead of uppercase, I think it helps young readers more in the direction to learn read mixed size script.

It would be nice to save the value of this setting in the UI object (to be available to the 'restoreFromLocalStorage` function), but I am unsure where to put it there. Also, saving the selected language would be good to put in the UI object. Should I open a new Issue for saving these settings in the UI object?

RichoM commented 4 years ago

I like this! I was very skeptical when I first read about this idea but now that I've seen it in action I think it looks really nice.

One thing I would probably change is the code panel. The syntax is case sensitive so the generated code wouldn't work in all caps. It doesn't matter much right now because the code is currently read-only and it's never compiled (the blocks generate the AST directly) but the plan is to allow users to both build their programs using blocks (like we do now) and also write them using code (and generate the blocks automatically). An alternative would be to make the syntax case-insensitive but I fear that might be more complicated than necessary (and also I never really liked those types of languages). What do you think?

RichoM commented 4 years ago

It would be nice to save the value of this setting in the UI object (to be available to the 'restoreFromLocalStorage` function), but I am unsure where to put it there. Also, saving the selected language would be good to put in the UI object. Should I open a new Issue for saving these settings in the UI object?

I'm not sure what you mean.

kristiank commented 4 years ago

[...] the plan is to allow users to both build their programs using blocks (like we do now) and also write them using code (and generate the blocks automatically).

This is so close to my dreams come true!

One thing I would probably change is the code panel. The syntax is case sensitive so the generated code wouldn't work in all caps. It doesn't matter much right now because [...]

I agree with you. There's some good technical parts here still -- try copying the code from the panel and paste it somewhere else. To my understanding it should not be pasted as all caps due to the nature of CSS manipulating the looks of the text but not the content. The content should still be in correct casing (but of course this might vary between systems).

Now thinking about the audience of this feature, I'm not sure for how long time they would (or should) be using this feature. Don't get me wrong, I very much symphatize with the idea that all-caps-aged kids would be changing also the textual representation of the code and get feedback from the blocks changing accordingly. But also here the small-caps would still actually hint visually to the user where there is a big/uppercase letter and where a small/lowercase letter.

[...] I never really liked those types of languages [...]

Neither did I. Especially languages with case-insensitive variables. As far as syntax is concerned, I wouldn't mind a case-insensitive syntax if the language would have no structural keywords in it ;-)

kristiank commented 4 years ago

I still haven't come up with a good menu / sub-menu structure where to put the tickbox for enabling/disabling this function. I will try to think of something this weekend.

kristiank commented 4 years ago

Would it be a solution to have the all-caps mode option under the Interface options window? Currently the Interface window consists of only the "Panes:" section, could we add a "Text:" section below it with a tickbox "show all text as upper case"?

kristiank commented 4 years ago

I published a first try on this in #24, I'm very open for comments.

RichoM commented 4 years ago

I like it.