flipt icon indicating copy to clipboard operation
flipt copied to clipboard

[FLI-808] Allow switching branches/refs in UI

Open markphelps opened this issue 5 months ago • 2 comments

Problem

In v1.36 we introduced the ability to evaluate different git references (branches) if using our git backends (guide here).

Also in 1.36 we added the ability to show the current configured branch in the UI (#2672)

It would be great if we could now allow switching between branches in the UI by combing these features.

Ideal Solution

  • Allow the branch in the UI to change to a dropdown on click, allowing the user to pick between the various known references that Flipt knows of
  • Selecting a new reference should reload the UI with all state for the selected ref
  • Since this is using the git backend, it will only need to work for readonly, no writes

297527234-07fce275-fd26-435b-9d3a-3c48d1d1ce58

Search

  • [X] I searched for other open and closed issues before opening this

Additional Context

I started a WIP branch to see how this would work

I think we will need to do the following:

/cc @GeorgeMac for confirmation/clarification

From SyncLinear.com | FLI-808

markphelps avatar Jan 27 '24 17:01 markphelps

You could also try to apply ref param in customFetchFn https://github.com/flipt-io/flipt/blob/39f6def6493fb76a38b0ebb59bdfd68a0360915b/ui/src/utils/redux-rtk.ts#L9-L18

erka avatar Jan 27 '24 18:01 erka

That is pretty spot on, the only change is that it is the full string “reference” instead of “ref”.

GeorgeMac avatar Jan 28 '24 09:01 GeorgeMac