Closed redrabbit closed 6 years ago
There is already a WIP <BranchSelect />
component. It needs some refactoring but the functionality is already there.
Here's how passing props to the component should look like:
<%= react_component "BranchSelect", repository_id: relay_id(@repo), default_oid: @spec.oid %>
Basically, we want something like the GitHub reference selection widget. We won't pass the full list of available branches/tags, instead use Relay to fetch available refs once use clicks on the component.
<BranchSelect />
should receive a GraphQL Node ID pointing to the current repository and the current reference OID. Both props can be passed directly to the component viareact_component/3
.