AndyObtiva / glimmer-dsl-libui

Glimmer DSL for LibUI - Prerequisite-Free Ruby Desktop Development Cross-Platform Native GUI Library - The Quickest Way From Zero To GUI - If You Liked Shoes, You'll Love Glimmer! - No need to pre-install any prerequisites. Just install the gem and have platform-independent GUI that just works on Mac, Windows, and Linux.
MIT License
497 stars 15 forks source link

[Interactive documentation for glimmer-widgets] For instance, if a user wants to see an explanation for "stretchy false" #27

Closed rubyFeedback closed 2 years ago

rubyFeedback commented 2 years ago

Hey there Andy,

I am slowly working through the glimmer-dsl-libui examples.

I see elements such as:

stretchy false

I can experiment and change it to:

stretchy true

So I can find out what it does. No problem.

But!

I think it would be nice if glimmer-widgets may allow for some debug-related information aka "what does "stretchy false" do.

Then if a user selects on this, an explanation is shown in glimmer.

Perhaps a separate widget that allows users to select text, and then a button to trigger the "ask glimmer what does this", e. g. allowing an interactive use too.

So kind of like a semi-debugger that tells people what this or that does.

One may reason that the documentation mentions this, but I think it may still be better to be able to e. g. select text, and then just ask glimmer "what is this doing", so a bit focusing on the interactive stuff. And to make this available within glimmer, so that people can explore "glimmer in glimmer" or "glimmer via glimmer". Not sure if this makes any sense to you, but it is just an example. This could then also be linked in with the videos you provide, but that's a separate suggestion. The focus here is more on getting interactive help, within glimmer, about glimmer-related code. Finding out what stretchy did was easy after I changed it between false/true, but other things seem to be a bit more complicated.

AndyObtiva commented 2 years ago

The value proposition of this is not worth my time as it is simple enough to learn all the properties by changing code and experimenting. In fact, that is often expected and enjoyable by good disciplined software engineers. That's how I learned LibUI for example. Glimmer DSL for LibUI is even easier to learn, so I won't spend time on a feature like this.

However, if you'd like to work on building a Glimmer DSL for LibUI editor that gives programmers interactive feedback when typing the values of certain properties (like stretchy), then knock yourself out! You could even build on top of the newly added code_area custom control if you like (turning it into a writable custom control, not just read-only like it currently is).