Skip to content

Commit

Permalink
improvement(autocomplete): use a single svg, removed newline, and cha…
Browse files Browse the repository at this point in the history
…nged autocomplete description

addressing concerns in PR comments

re mattermost-community#72
  • Loading branch information
Matthew Zygowicz authored and Matthew Zygowicz committed Oct 9, 2020
1 parent 4919e32 commit 1e0cba7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 23 deletions.
17 changes: 0 additions & 17 deletions assets/icon-small.svg

This file was deleted.

2 changes: 1 addition & 1 deletion assets/icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 4 additions & 5 deletions server/command/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@ import (
"fmt"
"strings"

"github.com/pkg/errors"

"github.com/mattermost/mattermost-plugin-api/experimental/command"
"github.com/mattermost/mattermost-server/v5/model"
"github.com/pkg/errors"

"github.com/mattermost/mattermost-plugin-confluence/server/config"
"github.com/mattermost/mattermost-plugin-confluence/server/serializer"
Expand Down Expand Up @@ -79,7 +78,7 @@ var ConfluenceCommandHandler = Handler{
}

func GetCommand(pAPI PluginAPI) (*model.Command, error) {
iconData, err := command.GetIconData(pAPI, "assets/icon-small.svg")
iconData, err := command.GetIconData(pAPI, "assets/icon.svg")
if err != nil {
return nil, errors.Wrap(err, "failed to get icon data")
}
Expand All @@ -89,15 +88,15 @@ func GetCommand(pAPI PluginAPI) (*model.Command, error) {
DisplayName: "Confluence",
Description: "Integration with Confluence.",
AutoComplete: true,
AutoCompleteDesc: "Available commands: subscribe, list, unsubscribe \"<name>\", edit \"<name>\", install cloud/server, help.",
AutoCompleteDesc: "Available commands: subscribe, list, unsubscribe, edit, install, help.",
AutoCompleteHint: "[command]",
AutocompleteData: getAutoCompleteData(),
AutocompleteIconData: iconData,
}, nil
}

func getAutoCompleteData() *model.AutocompleteData {
confluence := model.NewAutocompleteData("confluence", "[command]", "Available commands: subscribe, list, unsubscribe \"<name>\", edit \"<name>\", install cloud/server, help")
confluence := model.NewAutocompleteData("confluence", "[command]", "Available commands: subscribe, list, unsubscribe, edit, install, help")

install := model.NewAutocompleteData("install", "", "Connect Mattermost to a Confluence instance")
installItems := []model.AutocompleteListItem{{
Expand Down

0 comments on commit 1e0cba7

Please sign in to comment.