Open laurensvalk opened 11 months ago
Thanks for this suggestion! This has been on our todo list but hasn't made it into a release yet.
There are at least three ways to do it:
Personal opinions:
I'm not the biggest fan of this one because these notes would get lost in the generated code. Because they're disconnected, they also tend to get in the way. Or in the wrong place as the program grows and you forget to move the comments along.
I think I like this option as it solves most problems of 1. But maybe this would get too big/messy? Feel free to comment your thoughts everyone.
The downside of this one is that you can't see it in screenshots. And because they're mostly hidden, it's easy to forget to update them so they may quickly get outdated.
Also requested by:
Missing the possibility of adding comments on the block code side.
Originally posted by @BertLindeman in https://github.com/pybricks/support/discussions/1377
Also requested by:
Moin zusammen, gibt es eine Möglichkeit, eigene Blockprogramme zu dokumentieren, ähnlich wie das unter Python geht. Text neben oder über den Befehlen.
Originally posted by @msw-home in https://github.com/pybricks/support/discussions/1428
@laurensvalk I'd like to see your second option.
Add a special block in which you can type (multiple lines of) text.
Here is a working concept for consideration in a future release.
I'm not yet sure what the best place for this block will be on the toolbox. We might add a new utility
category for things like hub shutdown. Maybe there. Suggestions welcome!
I like the block like that, better than floating blobs of text. But on the form of the connector I assume it will not connect to the setup. I might want to add a comment there too, e.g. to explain why this motor is running counterclock.
Has this functionality been implemented yet? I'm new to Pybricks Block Code, and being able to comment 'sample' code would help me to refresh my knowledge after a period away.
Everyone, this functionality is now ready to try out in https://beta.pybricks.com/
What do you think? Should this be included in the final version?
Here's how it looks:
@MonongahelaCryptidCooperative I noticed in your screenshots, the font color look different. Is that the case for all your devices?
Everyone, this functionality is now ready to try out in https://beta.pybricks.com/
What do you think? Should this be included in the final version?
For sure. We can always nag later about layout and fonts / bold or not. 😉
The sooner the comment block is used the better. Very good that the comments are not floating.
Hallo,
für mich wäre das ausreichend, um etwas zu dokumentieren.
Es wäre schön, wenn der eingegebene Text automatisch mit übersetzt werden.
Generell fehlt mir in der Hilfe, eine ausführlichere Beschreibung der einzelnen Blockbefehle.
Ebenso würde ich ein paar mehr einfache Programme wie z.B., wie programmiert man eine Blinklichtanlage (Blinklicht Polizei) und so weiter, einstellen, in Blockprogrammierung.
Und immer dran denken, es sollen auch jüngere Kinder ab 8 Jahren inspiriert werden.
LG Manfred
Mehr Funktionshinweise für die Blockbefehle, wären nützlich
Tel: 0151 26091955
Mail: @.> @.
Von: laurensvalk @.> Gesendet: Thursday, 28 March 2024 16:12 An: pybricks/support @.> Cc: msw-home @.>; Mention @.> Betreff: Re: [pybricks/support] [Feature] Add ability to add comments (Issue #1349)
Everyone, this functionality is now ready to try out in https://beta.pybricks.com/
What do you think? Should this be included in the final version?
— Reply to this email directly, view it on GitHub https://github.com/pybricks/support/issues/1349#issuecomment-2025463244 , or unsubscribe https://github.com/notifications/unsubscribe-auth/BFFQBGWWAX2JHEPPXPLJMODY2QQJPAVCNFSM6AAAAABBAEQLC2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMRVGQ3DGMRUGQ . You are receiving this because you were mentioned. https://github.com/notifications/beacon/BFFQBGUJNNSREUJIHTU6PSLY2QQJPA5CNFSM6AAAAABBAEQLC2WGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTYXIO4Y.gif Message ID: @.***>
Immediately (or at the latest by yesterday - whichever is the soonest!)
Seriously, please include it ASAP - the ability to insert comments is one of the most important functions in any written coding language, as it enables the programmer to express the intention of the code, be it code snippets or the whole programme. It's not an add-on - it's VITAL!
On Thu, 28 Mar 2024 at 15:11, laurensvalk @.***> wrote:
Everyone, this functionality is now ready to try out in https://beta.pybricks.com/
What do you think? Should this be included in the final version?
— Reply to this email directly, view it on GitHub https://github.com/pybricks/support/issues/1349#issuecomment-2025463244, or unsubscribe https://github.com/notifications/unsubscribe-auth/AH5774RIVZNSBKG7J32E5Y3Y2QQJPAVCNFSM6AAAAABBAEQLC2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMRVGQ3DGMRUGQ . You are receiving this because you commented.Message ID: @.***>
Thanks! You can already try it in action and document your code at https://beta.pybricks.com/
We always try out new features there first, and merge them into the stable version at https://code.pybricks.com/ when all the enthusiasts participating in discussions like these:
So far, so good!
I really like the new updated comment feature, I think it is very important! I like this implementation better than the way lego does their comments. A future option to toggle the display of comments on/off would be nice (maybe under the settings/Appearance where the dark mode toggle is located). And/or an ability to collapse multi-line comments. In case the display is getting too cluttered with comments.
Not sure if this is a known issue: for some reason when I went directly to the beta.pybricks.com it would not show me the new "other" tab. I had to go to code.pybricks.com and use the toggle button to relaunch the beta to get it to show up.
The new comment function gave me another idea for a potential future feature. It would be cool if we could toggle any block on/off (like how in python you can comment any line out), maybe with a check box or something. This would not be a high priority feature, just something that would be nice to add eventually.
Thanks for all that you do! David
On Thu, Mar 28, 2024 at 12:18 PM laurensvalk @.***> wrote:
Thanks! You can already try it in action and document your code at https://beta.pybricks.com/
We always try out new features there first, and merge them into the stable version at https://code.pybricks.com/ when all the enthusiasts participating in discussions like these:
- are happy 😄
- don't experience any unexpected side effects 💥
So far, so good!
— Reply to this email directly, view it on GitHub https://github.com/pybricks/support/issues/1349#issuecomment-2025606150, or unsubscribe https://github.com/notifications/unsubscribe-auth/BDMH3XSJKZ565N3PSBPNOULY2QYELAVCNFSM6AAAAABBAEQLC2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMRVGYYDMMJVGA . You are receiving this because you were mentioned.Message ID: @.***>
Originally posted by @southlakefll in https://github.com/pybricks/support/discussions/1348