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

Check for a pattern in a slash command autocomplete #14738

Open
iomodo opened this issue Jun 3, 2020 · 4 comments
Open

Check for a pattern in a slash command autocomplete #14738

iomodo opened this issue Jun 3, 2020 · 4 comments
Assignees
Labels
Area/Toolkit Plugins and integrations framework Difficulty/2:Medium Medium ticket Good First Issue Suitable for first-time contributors Hacktoberfest Help Wanted Community help wanted Tech/Go Server

Comments

@iomodo
Copy link
Contributor

iomodo commented Jun 3, 2020

model.AutocompleteArgTypeText type argument has a pattern field with a regex in it. Right now this field is not used. Change the code to return autocomplete suggestions only if pattern matches the user input. Changes should be done only on a server.


If you're interested please comment here and come join our "Contributors" community channel on our daily build server, where you can discuss questions with community members and the Mattermost core team. For technical advice or questions, please join our "Developers" community channel.

New contributors please see our Developer's Guide.

JIRA: https://mattermost.atlassian.net/browse/MM-25528

@iomodo iomodo added Difficulty/2:Medium Medium ticket Tech/Go Server Up For Grabs Good First Issue Suitable for first-time contributors Help Wanted Community help wanted Area/Toolkit Plugins and integrations framework labels Jun 3, 2020
@rvillablanca
Copy link
Contributor

Will work on this :)

@rvillablanca
Copy link
Contributor

rvillablanca commented Jun 8, 2020

Hi @iomodo, I have a doubt. If the argument has a pattern and the input match that pattern, then what is the expected suggestion? For example if the pattern was \d{3,6} and the input was 123, then which would be the expected suggestion?
My concern is the pattern would be any kind of regexp, it could be something like option1|option2, on|off, etc. or could be anything ?

@iomodo
Copy link
Contributor Author

iomodo commented Jun 8, 2020

Hey @rvillablanca, if the pattern was \d{3,6} and the input was 123 expected suggestion will be 123. If the input was for example blabla there would be no suggestion. Pattern field is just for filtering if the input pattern is correct or not and it could be any standard regexp.

@DHaussermann
Copy link

@iomodo would you be able to provide test steps or guidance for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area/Toolkit Plugins and integrations framework Difficulty/2:Medium Medium ticket Good First Issue Suitable for first-time contributors Hacktoberfest Help Wanted Community help wanted Tech/Go Server
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants