Skip to content

feat: Checkout branch

Paul Slaughter requested to merge ps-checkout-branch into main

Description

This MR implements [Feat] Checkout branch (#72 - closed).

Screenshots

First opened When "Create new branch" selected Searching Warning after selected
Screenshot_2023-02-13_at_12.23.47_AM Screenshot_2023-02-13_at_12.23.52_AM Screenshot_2023-02-13_at_12.22.56_AM Screenshot_2023-02-13_at_12.23.34_AM

20230213_checkout_branch_demo

How to test

Starting the Web IDE example app:

  1. Run yarn start:example locally and open localhost:8000
  2. Enter the GitLab URL, Project Path, and Git Ref
  3. Check the I have a non-production GitLab Token and enter a GitLab Token to authenticate with. This will allow you to make changes.

Checking out a branch:

  1. After the Web IDE has loaded, click the branch name in the bottom left
  2. Try searching for a branch, selecting a branch, or selecting "Create new branch"

Known UX Issues

  • The URL of the Web IDE tab is currently not updated when the user changes branches. This will have to be handled in a follow-up MR. (see #110)
  • The "Are you sure?" warning message always shows, even if the user has not made any changes. We'll have to handle improving this in a follow-up MR. (see #109 (closed))
  • If the user is not allowed to make changes to the repo, they can still change branches, but it will show the "You cannot make changes" warning again. This is something we can fix either here or in a follow-up MR. (see #111)

These issues depend a bit on reacting to state changes in the Web IDE. For iteration's sake, let's handle this refactoring of state management in a separate MR.

Edited by Paul Slaughter

Merge request reports