Testing UI changes from a pull request

Prerequisites

  • depending on when the PR was created or last updated, you will need to be running a stash server with matching graphql schema. Usually a recent develop build will suffice. It’s possible and usually fairly safe to do it with a mismatching server version, but you may get server errors, depending on how much the graphql schema has changed between your server version and the version in the PR.
  • you will need a Github account to download the UI zip artifact from the pull request

Downloading the UI zip artifact

  1. On the desired pull request, cllck on the Checks tab.
    image
  2. On the left side of the screen, click on the Build item. Lint is usually selected by default.
  3. In the Artifacts section, click on the stash-ui.zip link to download the UI zip file.

Running stash with a custom UI

  1. Ensure stash is stopped
  2. Unzip the stash-ui.zip into its own folder. Ideally this should be a folder in the config folder in stash, so you can use a relative path when configuring, but this is not necessary.

:warning: Note: Due to a bug in the packaging process, the zip file currently contains a second zip file that must be extracted.

  1. Edit your stash config.yml to add the following entry:
ui_location: <custom_ui_path>

I typically unzip the UI into the custom_ui folder of my stash config folder, so my config.yml file looks like this:

ui_location: custom_ui
  1. Restart stash.

You may need to hard refresh the stash webpage to get the updated UI. If it still doesn’t update, try disabling the cache in the Network tab of your browser DevTools.

Returning to stock UI

Simply remove the ui_location entry in the config.yml file and restart stash.

Updating the custom UI

  1. Stop stash
  2. Remove all UI files from the folder containing the custom UI files.
  3. Unzip the new UI files and restart stash.
2 Likes