stash icon indicating copy to clipboard operation
stash copied to clipboard

[Feature] UI Plugin API Improvements

Open QxxxGit opened this issue 1 year ago • 10 comments

Per WP's suggestion, this is an issue for plugin developers to request improvements to the UI plugin API. This single issue would be used to keep requests in one place.

My current requests (completed):

  • [x] Date picker support
  • [x] Country dropdown select (display countries with flags)
  • [x] Tag dropdown select (includes tag previews and pill badges)

Edit: Updated for cleanliness and to mark as completed.

QxxxGit avatar Jan 27 '24 22:01 QxxxGit

We need functionality to move and create elements to all parts of all pages so that those who work on making themes and scripts can fulfill their creative ideas.

ralle947 avatar Feb 06 '24 07:02 ralle947

  • A way for plugins to provide custom mutations and subscriptions that can be executed and subscribed to by the UI. I currently work around this using tasks but I have to hide the ones that require arguments from the tasks page and I also need to poll the logs to be able to receive any output and have the UI act on it.

  • A "multiple" plugin config setting property in addition to the "description" and "type" setting properties. A multiple value of true would indicate that the setting is a list of values rather than a single value. I currently work around this by allowing for comma-separated strings for multiple values, but it would be nice if the UI showed a list input for these kinds of settings.

  • ~~A "visible" plugin config setting property to control whether a setting is shown in the UI. This can currently be worked around by hiding the element through the UI script.~~ Nevermind, this is already supported

  • Additional plugin config setting types like date, country, tag, studio, performer, tag, etc. that would use those specialized input components OR allow config settings to be hooked so the UI plugin can replace the text inputs with the specialized input components.

7dJx1qP avatar Feb 13 '24 22:02 7dJx1qP

Another request: Scene page as a patched component, with access to some of the current components on that page. I think the essentials I would need are the video player and... maybe the queue? I think if I had those I'd have a good amount to work with. Extra tooling like the tab/pane functionality could be useful, but lower priority.

QxxxGit avatar Mar 04 '24 22:03 QxxxGit

Text blocks as a type to allow for users to create more complex configurations for things like pathParser without needing to edit the plugin code manually which should hopefully be on the way out with a built-in installer.

Ceequester avatar Apr 17 '24 02:04 Ceequester

Can I get a confirmation: when I register a route, that route can only be viewed when navigating from an existing one. I cannot view the page by visiting localhost:9999/plugin/test-route on its own. Doing that or refreshing the page throws a 404.

QxxxGit avatar Apr 20 '24 11:04 QxxxGit

Thanks for adding the PerformerDetailsPanel components, they're working nicely. Could I request the PerformerCard and TagCard components as well, if that's okay?

Thanks

Valkyr-JS avatar Jun 16 '24 12:06 Valkyr-JS

Also, for some reason play_history and last_played_at are not available on a plugin GQL query. Here's a snapshot of my console log if it helps.

Hopefully this is the best place to raise this - apologies if not.

image

Valkyr-JS avatar Jun 16 '24 13:06 Valkyr-JS

Sorry to keep asking for stuff! It would also be useful to have a defaultSettings option in the plugin yaml so that we can set defaults there. This would be similar to the defaultArgs option in plugin Hook configuration.

Currently, default values are 0, false, or "" as the settings are undefined. There are cases where it would be better to have different values as default, however.

Thanks

Valkyr-JS avatar Jun 20 '24 17:06 Valkyr-JS

Would it be possible to add the hooks to more components like the Scene detail tabs. I would like to add a few features to the File info tab content component.

blackx69 avatar Jul 08 '24 12:07 blackx69

Integration of library features into core PluginAPI

csUiLib

  • raw /graphql interface with APIKey and base path
    • While the typed interface is nice, it is obviously lacking features and direct translations
  • syncronous access to plugin settings
    • currently the best way is to async access through pluginApi or by stealing it with forbiddenConfig
  • wait for key elements function
  • path + element listener
    • subpage and page change listeners

7dJx

  • gql listener
  • pretty logger
  • mutation observer
  • stashbox(es) interface

feederbox826 avatar Aug 18 '24 20:08 feederbox826