redrabbit / git.limo

A Git source code management tool powered by Elixir with easy installation & high extensibility.
https://git.limo
MIT License
497 stars 42 forks source link

Refactor React <BranchSelect/> component. #19

Closed redrabbit closed 6 years ago

redrabbit commented 6 years ago

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 via react_component/3.

redrabbit commented 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 %>