Display labels in the HTML panel

Hello, Labels are very useful for finding your way around the Overview panel.
It might be a good idea to display them as a comment in the HTML panel independently of the ‘Export labels’ option.
This would make the HTML source code much easier to read in BS.

Thank you for the suggestion! I see how this could be useful. My only reservation is that showing additional HTML in the HTML preview would lead to users asking why it is missing when exporting. So we will have to think of a way to show the labels but without presenting them as HTML comments.

If others have feedback regarding this idea, we will be happy to learn about it.

I see Labels as being uniquely program-specific, not website-specific. They’re kind of like “personal notes” to make it easier to find things at a glance in the BSS Overview panel. I don’t see how having them show up in the HTML would be of any real benefit, even if they didn’t appear in the export.

But I don’t add comments to my HTML, so I may not represent most users.

1 Like

it can be usefull for something like regex to select things in cases like, but not limited to:

  • bss export scripts that runs node/php/go or whatever to handle the regex and post process the export,
  • client side rendering, that uses regex…

though I don’t recomend to use it for that intention…
if you want to use it for that intention however, using custom html attribute will be much easier and maintainable…
then run dom parser like domino(node), php-html-parser, or goquery…

  • nodeJS, if you want to publish npm package, I recommend domino over jsdom, jsdom sometimes messed with head tag content ONLY WHEN your package are installed via npm as dependency(local test using npm link ‘your-package’ will not show this error)…
  • php, you can also use built in PHP: DOM - Manual , but I don’t recommend it, the syntax and the how it saves curent document object is somewhat confusing…
  • go, I never used go for this approach, therefor I cannot give indepth comment on this…

Hello. Who can the most can the least. Exporting comments to published sites is not useful to me, but I understand that it can be used by others. Conversely, I like to check my HTML code before it is published. Comments would be markers to quickly check the code. Now, it is normal that opinions can be different. Each has its own way of working.

@JCWEB @muhammadhakimjazuli

The way I see it, if you want comments in your HTML, use the Comment component. That’s why it exists.

Labels are a development aid unique to the Bootstrap Studio software. HTML comments are a W3C recognized tag in HTML and general website development. I see no reason to “blur” one into the other. Each serves its specific purpose effectively.

1 Like

As it was already mentioned above, THERE IS ALREADY A COMMENTS COMPONENT. Top Left, scroll to the bottom to the Misc list and you will see Comments a handful of components down the list. Just drag it where you want a comment (works best in Overview panel) and add your comment. When you don’t need it anymore for a published site, delete it. It can’t get any simpler than that I don’t think :stuck_out_tongue:

I think adding labels to the HTML would be overkill as well. I find labels are best useful to navigate around the Overview panel and label what your components are so you can recognize what is what.

1 Like