Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
hirenko-v authored Sep 19, 2024
1 parent 65e7661 commit 88fd949
Showing 1 changed file with 35 additions and 31 deletions.
66 changes: 35 additions & 31 deletions cmd/msg/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func (MsgExecutor) Execute(_ context.Context, in executor.ExecuteInput) (executo
if len(commandParts) > 2 && commandParts[1] == "selects" {
switch commandParts[2] {
case "first":
// User selected the first option, now show both selects
// User selected the first option, now show both selects side by side
return showBothSelects(), nil
case "second":
// User selected the second option, respond accordingly
Expand Down Expand Up @@ -115,46 +115,50 @@ func showBothSelects() executor.ExecuteOutput {
},
Sections: []api.Section{
{
Selects: api.Selects{
ID: "select-id-1",
Items: []api.Select{
{
Name: "first",
Command: cmdPrefix("selects first"),
OptionGroups: []api.OptionGroup{
Columns: []api.Column{ // Use columns to layout dropdowns side by side

Check failure on line 118 in cmd/msg/main.go

View workflow job for this annotation

GitHub Actions / Release

unknown field Columns in struct literal of type struct{Style api.SectionStyle "json:\"style,omitempty\" yaml:\"style\""; api.Base "json:\",inline\" yaml:\"base\""; Buttons api.Buttons "json:\"buttons,omitempty\" yaml:\"buttons\""; MultiSelect api.MultiSelect "json:\"multiSelect,omitempty\" yaml:\"multiSelect\""; Selects api.Selects "json:\"selects,omitempty\" yaml:\"selects\""; PlaintextInputs api.LabelInputs "json:\"plaintextInputs,omitempty\" yaml:\"plaintextInputs\""; TextFields api.TextFields "json:\"textFields,omitempty\" yaml:\"textFields\""; BulletLists api.BulletLists "json:\"bulletLists,omitempty\" yaml:\"bulletLists\""; Context api.ContextItems "json:\"context,omitempty\" yaml:\"context\""}

Check failure on line 118 in cmd/msg/main.go

View workflow job for this annotation

GitHub Actions / Release

undefined: api.Column
{
Selects: api.Selects{
ID: "select-id-1",
Items: []api.Select{
{
Name: "Group 1",
Options: []api.OptionItem{
{Name: "BAR", Value: "BAR"},
{Name: "BAZ", Value: "BAZ"},
{Name: "XYZ", Value: "XYZ"},
Name: "first",
Command: cmdPrefix("selects first"),
OptionGroups: []api.OptionGroup{
{
Name: "Group 1",
Options: []api.OptionItem{
{Name: "BAR", Value: "BAR"},
{Name: "BAZ", Value: "BAZ"},
{Name: "XYZ", Value: "XYZ"},
},
},
},
},
},
},
},
},
},
{
Selects: api.Selects{
ID: "select-id-2",
Items: []api.Select{
{
Name: "second",
Command: cmdPrefix("selects second"),
OptionGroups: []api.OptionGroup{
{
Selects: api.Selects{
ID: "select-id-2",
Items: []api.Select{
{
Name: "Second Group",
Options: []api.OptionItem{
{Name: "Option A", Value: "Option A"},
{Name: "Option B", Value: "Option B"},
Name: "second",
Command: cmdPrefix("selects second"),
OptionGroups: []api.OptionGroup{
{
Name: "Second Group",
Options: []api.OptionItem{
{Name: "Option A", Value: "Option A"},
{Name: "Option B", Value: "Option B"},
},
},
},
InitialOption: &api.OptionItem{
Name: "Option A",
Value: "Option A",
},
},
},
InitialOption: &api.OptionItem{
Name: "Option A",
Value: "Option A",
},
},
},
},
Expand Down

0 comments on commit 88fd949

Please sign in to comment.