ynput / ayon-frontend

Codebase of AYON server web interface
Apache License 2.0
17 stars 14 forks source link

Use DEV mode to look for addons in dev bundle to show tab #726

Open kalisp opened 2 months ago

kalisp commented 2 months ago

Story

As a developer I would like to test let say Kitsu addon which should have frontend tab. I download Kitsu addon and add it to my dev bundle as I dont want to mess with production bundle. Right now I won't be seeing Kitsu tab in frontend as it is required to have Kitsu in production bundle.

Problems

It would make more sense of what I am seeing with testing new addons.

Proposal

We have Development toggle which could direct if production or dev bundle should be used

I think this comment from community is occurrence of this issue https://discord.com/channels/517362899170230292/563751989075378201/1273181650586697738

martastain commented 2 months ago

This is not a straightforward task. The front-end part is relatively easy:

@Innders is it possible to access the current dev mode value here in the RTK query? The worst case scenario would be to move this logic to the navbar:

image

The main problem are settings (as usual). Even if we show the addon frontend, the backend (custom endpoints) will still use production settings. Each addon exposing custom endpoints would need to handle requests statelessly and load dev settings based on CurrentUser dependency. Otherwise, I assume that could work for Graph addon for example, but it will break addons such as Kitsu, SiteSync etc.