Hide WAB widget icon?

3171
8
Jump to solution
09-01-2017 02:29 PM
DarrenWiens2
MVP Honored Contributor

I'm sure there is some simple config setting I'm missing, but how do I completely hide a WAB widget icon from the built app? I've tried things like: setting "visible": true in manifest.json (doesn't load widget at all), setting visible property false on widget via "this.appConfig.widgetOnScreen.widgets" (changes property to false, but widget is still visible).

In builder:

In app (don't want this icon):

I'm open to the notion that there is a more fundamental setting I'm missing, like how to specify the widget as "not on-screen" right from the onset. Any help appreciated!

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

OK, It looks like the only piece of info you are missing then is that off panel widgets have to be manually added to the main config.json for the app or they need to me manually added to the \client\stemapp\predefined-apps\default\config.json

View solution in original post

8 Replies
RobertScheitlin__GISP
MVP Emeritus

Darren,

   So you want to be able to use the widget but just not see it in an onscreen place holder?

0 Kudos
DarrenWiens2
MVP Honored Contributor

Yes, I need a widget that the map author configures in the builder, and then runs hidden in the background when the app is launched.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Darren,

   What you are wanting is a off panel widget then. Like the Scalebar widget, the custom LocalLayer widget or Anvil widget.

In-panel and off-panel widgets—Web AppBuilder for ArcGIS (Developer Edition) | ArcGIS for Developers 

DarrenWiens2
MVP Honored Contributor

My manifest.json indicates that this is on off-panel widget ("inPanel": false). Are there additional settings controlling whether this is on- or off-panel? If I change to "inPanel": true, then a panel opens when I activate the widget in the app.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

OK, It looks like the only piece of info you are missing then is that off panel widgets have to be manually added to the main config.json for the app or they need to me manually added to the \client\stemapp\predefined-apps\default\config.json

DarrenWiens2
MVP Honored Contributor

Thanks, Robert Scheitlin, GISP‌! I'll just post that this is as easy as adding the following to the widgets array in the main app config.json (not the widget config.json):

{
  "uri": "widgets/MyWidget/Widget"
},‍‍‍
Brian_Beyeler
New Contributor III

Hello, So you are able to let the widget startup when the app opens, run in the background as hidden, then use the tool as needed? Is that what you all are discussing or am I not following this thread? For example, I have feature service layers that I do not want to be turned on all of the time due to speed/performance issues. I would like to be able to edit those services with the smart editor as soon as I turn the layer on by just clicking on a feature instead of having to go to the smarteditor widget first or click on the 3 dots on the bottom right corner. The extra steps are confusing to some users. Any help would be appreciated! Thanks, Brian

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Brain,

   Yes an off panel widget is running at startup and does not have a button to launch it. It can have a UI or not. As far as you wanting to be able to edit a layer as soon as you make it visible and click on it. That could be possible with a bit of code work. 

0 Kudos