Label Field in Plugin UI
AnsweredIt would be great if there was some sort of label field or non-editable text field available for use in plugin creation. We have a couple scenarios where we want to present the user with some information (ex: information returned from a web service, or information about whether compatible GPU was detected on the given server). It would be great to have a field type available to display this type of non-editable information.
Currently we are considering using plugin diagnostic messages to convey some of this information, but it is not exactly ideal -- more of a workaround.
-
Austin Smith
Unfortunately, there is no such option for now, but we will consider adding it, thanks for the idea!
As I understood, you want to have that kind of information on the plugin configuration page, am I right?
Actually, this can be achieved (as a workaround) by making a plugin side setting (kEnginePluginSideSetting), we have such spinbox as an example in stub analytics plugin
This will result in a plugin-defined setting that is not editable by the user (actually, it is editable from UI, that looks weird, but it doesn't actually change anything, afaik)
Also, you can make it disabled ("enabled": false), so the user is not able to change this
I understand that it is not a full solution, but at least smth we can offer for the time being
hope that helps -
Austin Smith
Unfortunately, I can't test it right now, but AFAIK, it should be disabled (non-editable and 30% opacity)
Like this:
Unless there is some bug, this is some new functionality and I haven’t seen this being used in external integrations so far -
Just fo follow up, this didn't work quite as expected in the end, as it turns out we are only able to automatically set the value of the disabled setting *once*. Meaning, if the value we are trying to display needs to be updated/changed, we don't have the ability to change it after we set it automatically that initial time (on first plugin load).
For this reason, we ended up implementing sort of a "trick" to work around this. Our plugin generates a manifest that describes the UI on-the-fly each time it runs. So we simply generate a new settings name for the setting in question on each start, which allows us to always control the default value of the setting. Every time the media server is restarted, the setting in question is assigned a brand new name. This lets us control the value displayed in the disabled setting.
The "trick" works fine, but we would certainly prefer if there were some native support for display-only fields, for which we could automatically update the value as needed. -
Austin Smith
yeah, thanks for the update!
sure, having some "State" fields in plugin GUI would be a great feature to have. We'll include it in the roadmap, but I'm not sure when we'll get to it, we have a long list of cool features in the queue -
Hi all,
There is one more "trick" possible, which does not require manifest re-generation.
Here is the thread with detailed explanation.
Hope that will be helpful.
Please sign in to leave a comment.
Comments
7 comments