app-stormkit-io icon indicating copy to clipboard operation
app-stormkit-io copied to clipboard

Autocomplete as replacement of branch textfield

Open ivanlori opened this issue 4 years ago • 4 comments

Current situation Screenshot 2020-09-17 at 08 27 39

we have a text field where the user can write the branch name.

The goal It could be helpful if that textfield was replaced by an autocomplete with all the branches published.

Why To improve the user experience.

ivanlori avatar Sep 17 '20 06:09 ivanlori

This can also be extended to the Deplow now modal. When user clicks on Deploy now, we show a text input. Instead of copy pasting the branch name, one could pick it directly from the list. Since there are multiple places where the selector can be used, I'm going to suggest to create this is as a standalone reusable component (like the src/components/EnvironmentSelector).

It'll probably need to have a wrapper component which accepts a provider property (one of github, gitlab, or bitbucket) and then internally it loads the relevant component based on the given provider. An example can be found here: src/pages/Apps/New/:provider/Provider.js.

Also as an idea, we can get inspired by GitLab's branch selector:

image

svedova avatar Sep 17 '20 06:09 svedova

It'll be useful to create this as a standalone component as now we also have a branch selector in the Deployments page to filter the deployments:

Screenshot 2020-12-28 at 13 08 18

svedova avatar Dec 28 '20 10:12 svedova

It'll be useful to create this as a standalone component as now we also have a branch selector in the Deployments page to filter the deployments:

Screenshot 2020-12-28 at 13 08 18

For the deployments page I don't think that we need an autocomplete text input because we know all the possibile branches available.

Something along the line of this: out

Waiting for some feedback before working on this.

filippofinke avatar May 02 '22 20:05 filippofinke

@filippofinke I'm guessing you took those branches from the environment object's branch field. If that's the case, I guess we still need the branch selector here because you could deploy a completely different branch with an environment's configuration.

For instance, your deploy config could look like this:

{
  "branch": "my-feature-branch",
  "env": "staging"
}

And the staging env could have release/staging as the default branch.

I would work iteratively on this anyways. Maybe something like:

  • [ ] Investigate if ~backend work is required
  • [ ] Create a generic AutoComplete component (maybe we can check if material ui already has one)
  • [ ] (Optional) Wrap the AutoComplete component with a higher level BranchAutoComplete component that fetches branch names from the provider and feeds the data to the AutoComplete component
  • [ ] Replace Branch inputs with the BranchAutoComplete components

Does this make sense?

svedova avatar May 03 '22 03:05 svedova