🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    [UIFLOW] Add a comment block.

    Features Wish List
    3
    3
    1.4k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      aprusek
      last edited by

      Sorry if I missed something but I beleive comments are missing from UIFlow.

      While looking at visual code it is possible to determine what functions are being called but not the intent of the programmer.
      Also when used as a teaching tool encouraging comments encourages documentation.
      The alternative is to use th "Execute code:" block or document externally.

      0_1709752126077_9229e8fe-5fd4-42e7-ae4a-d142f7868018-image.png [UIFLOW] Add acomment block.

      1 Reply Last reply Reply Quote 3
      • ajb2k3A
        ajb2k3
        last edited by

        I have mentioned it several times but people don't like to search so well done for discovering it for yourself and sharing.

        UIFlow, so easy an adult can learn it!
        If I don't know it, be patient!
        I've ether not learned it or am too drunk to remember it!
        Author of the WIP UIFlow Handbook!
        M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

        1 Reply Last reply Reply Quote 1
        • dissyD
          dissy
          last edited by

          The official way to add comments only adds them to UIFlow (they are not exported into the python code)
          You can right-click any block and select "Add comment", which enables a question mark icon on the block. Clicking that icon lets you add a comment in a bubble.
          (I use those comments to describe why I did something specifically in UIflow/blockly.)

          The unofficial way is the code block you show. Those comments DO get exported into the python code.
          (I use those comments for things like describing variables usage and (re)configuration, stuff people would still need to know when using the micropython code directly.)

          It would however be wonderful to have one official "Comment block" block that could be set to work either way, and set to start expanded or collapsed, etc.
          I think it would be wise to retain "Insert into python code" or not as an option, as each type has advantages in different circumstances.

          1 Reply Last reply Reply Quote 2
          • First post
            Last post