Product Feedback Forum
Help us make Sisense better by posting your product feedback here.
cancel
Showing results for 
Search instead for 
Did you mean: 

My team was adding scripts to widgets to add attributes to the embedded widget and noticed an opportunity to expand what metadata we can use in the scripts. Currently, we're using the widget description (`desc` field) to set a testid attribute, but by default that description is viewable in the embedded widget. 

I'd love the ability for designers to add key/value pairs to the Widget class metadata that are accessible in the widget script.

widget.on('domready', function(w) {
  const { oid, customMetadata } = w; // customMetadata is the new (optional) property on a Widget
  const testId = customMetadata['testId']; // a key/value pair added by designer
  const selectorString = `[widgetid='${oid}']`;
  const widgetElement = $(selectorString);
  widgetElement[0].setAttribute('testid', testId);
});

 

1 Comment
Status changed to: Needs Votes & Comments

Hello @smccartney09 ,

Thank you for sharing your idea and providing details. We will bring this to the product team and provide updates here as they are available.

We encourage people to continue to vote and comment. We use community interest as one of the ways we prioritize efforts, so every vote and comment can help turn a request into a reality.

Thank you again for sharing and being part of our community!