Question

How can you Show/Hide a widget permanently using Miro SDK?

  • 30 June 2021
  • 2 replies
  • 74 views

Hi everyone. 

I know that you can show/hide a widget for current user using clientVisible property as shown here . But what I want is to be able to hide/show a group of widgets for all users. 

For example, I have a group of images stacked together on top of each other. The images are grouped together in miro.

What I want to do is to be able to click on an image, so that the upper image gets hidden and lower image gets show and vice versa.

What I have been able to achieve so far is to hide/show “text groups” using Miro SDK and using metadata property to store the states.

FOR EXAMPLE: On first click, bottom text shows

On second click, bottom text hides, upper text shows

 

I am using custom plugin for this. I want to do this for images instead of text but I guess metadata on images is not working. Any updates? So far, it works fine on other widgets except image widgets which doesn’t throw any error but it gets stuck on updating.

let update = await miro.board.widgets.update(ids)


Any directions how can I toggle between stacked images using SELECTION_UPDATED event. 


2 replies

Userlevel 4
Badge

Hi @Hassan Kumail,

 

As of today, the Web-SDK doesn’t offer any way to sync events/actions across different users easily. This is something we are taking a look at. Metadata is one way of handling this when you don’t have a backend for your application. As you know, Metadata doesn’t work properly for the moment, the Engineering team is working on it. 

 

Sorry for the inconvenience

 

Hi @Hassan Kumail,

 

As of today, the Web-SDK doesn’t offer any way to sync events/actions across different users easily. This is something we are taking a look at. Metadata is one way of handling this when you don’t have a backend for your application. As you know, Metadata doesn’t work properly for the moment, the Engineering team is working on it. 

 

Sorry for the inconvenience

Thanks for replying!

Is there any other way to show/hide a widget temporarily without using metadata instead of completely deleting a widget?

Reply