189
Views
4
Comments
How can I make an element have options to show / hide like the Popup?
Application Type
Mobile, Reactive
Service Studio Version
11.54.13 (Build 62526)

Hey guys,

How can I configure a block to toggle it's visibility in Service Studio similar to the option the Popup has (see image attached)?

All I get is "Show all placeholders" or "Hide placeholders" but it doesn't hide the block visually in service studio.


popup_show_hide.png
2018-10-29 08-31-03
João Marques
 
MVP

Hi Mário,


It's not possible.

The block preview renders what is on the block and what is in the True branch of an If.

A tip many times applied when you have scripts or things of that nature, is to have an If branch set to False, with the widget / code to render / run in the false branch, and an image or text, just for preview purposes in the True branch.


Kind Regards,
João

2021-09-06 15-09-53
Dorine Boudry
 
MVP

Hi @Mario Andrade and @João Marques ,

it is not possible to do the exact same, but with a bit of imagination, you can create something kind of similar, see my comment on this idea.

And while you are there, give the idea an upvote.

You'll have to play around a bit to get it how you like, and it won't be perfect.  The trick I use to not make the placeholder very obvious in expanded state, is add a very small container into it as example content, it is almost not visible on the canvas, but of course you still see it in the tree view.

see attached oml demonstrating both options as explained in that idea.

Dorine

QDR_CollapsibleBlock.oml
2021-09-06 15-09-53
Dorine Boudry
 
MVP

little tweak : 

add style of height 0 px to the placeholder and to the container in the true branch makes it even prettier.

see attached revised oml

QDR_CollapsibleBlock.oml
2021-09-06 15-09-53
Dorine Boudry
 
MVP

and for those that want to see what's in the box before they open it : some screenprints

  • on the left, part of the content is collapsible
  • on the right the full content is collapsible, and you have extra visual element("MyBlock") in service studio that is not there in the running application (as you also have that little square for popups).

collapsed in SS

expanded in SS

runtime


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.