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

Add autocomplete suggestions #40

Merged
merged 5 commits into from Jun 24, 2020
Merged

Add autocomplete suggestions #40

merged 5 commits into from Jun 24, 2020

Conversation

iomodo
Copy link
Contributor

@iomodo iomodo commented May 26, 2020

Summary

This PR will add slash command autocomplete suggestions.

@iomodo iomodo requested a review from jfrerich as a code owner May 26, 2020 15:36
@codecov-commenter
Copy link

codecov-commenter commented May 26, 2020

Codecov Report

Merging #40 into master will decrease coverage by 2.60%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #40      +/-   ##
==========================================
- Coverage   21.03%   18.42%   -2.61%     
==========================================
  Files           6        6              
  Lines         233      266      +33     
==========================================
  Hits           49       49              
- Misses        173      206      +33     
  Partials       11       11              
Impacted Files Coverage Δ
server/command.go 0.00% <0.00%> (ø)
server/main.go 0.00% <ø> (ø)
server/plugin.go 36.84% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d280498...4ef1a03. Read the comment docs.

@iomodo iomodo requested a review from levb May 26, 2020 15:37
@iomodo iomodo added the 2: Dev Review Requires review by a core committer label May 26, 2020
Copy link
Contributor

@jfrerich jfrerich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@iomodo, this is awesome and I can't wait to add it to other plugins! I have a one change request (up for discussion)

Hint: "(optional)",
Item: "next-week",
}})
queue.AddTextArgument("Creates a post for user with the given message for the next meeting date.", "message", "")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
queue.AddTextArgument("Creates a post for user with the given message for the next meeting date.", "message", "")
queue.AddTextArgument("Message for the next meeting date.", "message", "")

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The text here is describing the meaning of the Message autocomplete option. I think it makes sense to somehow tell the user Message is not an autocomplete value, but an input needed from the user.

On the same point, I wonder if we could/should somehow designate the difference between an autocomplete value versus an input required from the user. As an example, next-week is an autocomplete value and Message requires free text from the user.
image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree. What we could do is differentiate using icons on the left side, or have different styles, but it is not yet part of the Server PR. I'll create the ticket for this.
I'd suggest using [message] for now.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That'd be perfect. Thanks!

@hanzei hanzei added the 3: QA Review Requires review by a QA tester label May 27, 2020
@hanzei hanzei added this to Submitted in Integrations Team via automation May 27, 2020
Copy link
Contributor

@hanzei hanzei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a backwards compatibly change? Does min_server_version need to get bumped?

@iomodo
Copy link
Contributor Author

iomodo commented May 27, 2020

@hanzei There will be no changes for older servers, new functionality will not work of course. No min_server_version bump is needed. We need a dependency bump to 5.24 though, to be able to compile the new autocomplete data.

@iomodo iomodo requested a review from jfrerich May 27, 2020 10:01
Copy link
Contributor

@jfrerich jfrerich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @iomodo! I'm stealing this as a reference for other plugins :)

@jfrerich jfrerich self-requested a review May 27, 2020 14:35
go.mod Outdated
@@ -4,8 +4,8 @@ go 1.12

require (
github.com/blang/semver v3.6.1+incompatible // indirect
github.com/mattermost/mattermost-server v1.4.1-0.20191016162522-6597fdb40134 // Mattermost Server 5.16.0
github.com/mattermost/mattermost-server/v5 v5.3.2-0.20200525190709-91f010b8b7e8
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why this version?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was the latest master, we will switch it to 5.24

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@levb levb removed the 3: QA Review Requires review by a QA tester label Jun 15, 2020
@levb levb requested a review from DHaussermann June 15, 2020 11:43
@hanzei hanzei added 3: QA Review Requires review by a QA tester and removed 2: Dev Review Requires review by a core committer labels Jun 16, 2020
@hanzei hanzei added this to the v0.1.0 milestone Jun 16, 2020
@DHaussermann
Copy link

DHaussermann commented Jun 17, 2020

I have tested all the auto-complete functionality

  • All commands work as expected (except schedule)
  • All argument name and descriptions look correct except schedule (see below)
  • Tested the updated plugins on server 5.23.1 to ensure it works as expected without auto complete

@iomodo one question here... The schedule command functionality has changed instead of Mon or Monday you have to use 1 Was this part of this PR or do you know anything about it? I can't see a separate PR for it. In my opinion this is less usable. Also in it's current state it's wrong as the description says it will accept 1-5 however, you can schedule meetings on Saturday and Sunday with 6 and 7

Copy link

@DHaussermann DHaussermann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and passed

  • Schedule is now working as expected
  • Confirmed setting works with use of auto complete
  • Regression tested that you can use partial such as fri
  • Regression tested that week days are case insensitive
    LGTM!
    Thanks @iomodo fir fixing this.

@DHaussermann DHaussermann added 4: Reviews Complete All reviewers have approved the pull request and removed 3: QA Review Requires review by a QA tester labels Jun 23, 2020
@jfrerich jfrerich merged commit aa1ac21 into master Jun 24, 2020
Integrations Team automation moved this from Submitted to Done Jun 24, 2020
@jfrerich jfrerich deleted the add-autocomplete branch June 24, 2020 04:02
@jwilander jwilander removed this from Done in Integrations Team Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4: Reviews Complete All reviewers have approved the pull request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants