Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

As a user, when I try to create a repo when using the /token command and I don't fill in the project fields I get an error #384

Open
12 tasks
texastoast opened this issue Mar 27, 2024 · 1 comment

Comments

@texastoast
Copy link
Contributor

texastoast commented Mar 27, 2024

Description

When using the /token command to add a repo, if your repo isn't listed you need to click the create repo button. When you do this, there are 3 fields:

  • Projects, which is marked as optional
  • Project name, also marked as optional
  • Repo name, required

If you leave both "optional" fields blank, you receive an error:

[error] GenServer #PID<0.677.0> terminating
** (ArgumentError) errors were found at the given arguments:

  * 1st argument: not a binary

    :erlang.binary_to_integer(nil)
    (slax 0.0.1) lib/slax_web/websockets/token.ex:80: SlaxWeb.Token.handle_payload/1
  ...

Filling in either of these optional fields allows the repo to be added. If you leave the Projects field blank and fill in the Project name field, that name appears in the "Projects" selector on future attempts.

It appears that this is an either/or option: either select an existing project or create a new project. However it is not clear from the UI that this is the case and it is also not clear what these project fields are referring to or how they are used.

Screenshot on 2024-03-27 at 11-52-09

Scenario: select existing project

  • Given I'm a user using the /token command to add a repo to Slax
  • When I select Create Repo in the Token Modal
  • Then I have the option to select an existing Project
  • And in the configuration modal I can select an existing Project from the Projects drop down
  • And I can enter the name of the repo where the Project exists
  • And once I submit I can select the added Repo in the Token Modal from the Repo drop down

Scenario: create new project

  • Given I'm a user using the /token command to add a repo to Slax
  • When I select Create Repo in the Token Modal
  • Then I have the option to create a new Project
  • And in the configuration modal I can enter a new Project name
  • And I can enter the name of the repo where the Project exists
  • And once I submit I can select the added Repo in the Token modal from the Repo drop down
@texastoast
Copy link
Contributor Author

The optional tags are added by Slack, not part of the specified config. It implies both fields are optional, when it is actually an either/or situation. Probably need to rethink this UI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant