Label Field in Plugin UI

In Progress

Comments

6 comments

  • Avatar
    Tagir Gadelshin

    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


    0
    Comment actions Permalink
  • Avatar
    Austin Smith

    Hey Tagir, can you clarify -- in  your example, marking the field "enabled":false, at that point is the field still editable in the UI or not? 

    0
    Comment actions Permalink
  • Avatar
    Tagir Gadelshin

    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

    0
    Comment actions Permalink
  • Avatar
    Austin Smith

    Thanks Tagir, that ended up working pretty well for our purpose (disabling the field). We didn't realize that was possible. Appreciate the guidance.

    0
    Comment actions Permalink
  • Avatar
    Austin Smith

    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.
    0
    Comment actions Permalink
  • Avatar
    Tagir Gadelshin

    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

    0
    Comment actions Permalink

Please sign in to leave a comment.