Interactive Dialogs (https://docs.mattermost.com/developer/interactive-dialogs.html)) allow integrations to receive some form-styled input from users and have that input submitted back to the integration via a specified URL.
After the user has submitted the input a request is sent to the integrations which checks the provided values. It can send errors for specific elements that will be shown in the UI.
However, there is currently no support for a generic error message indicating to the user that they need to go back and check their inputs before the form will be submitted. This ticket is about adding support for the message to be displayed - just after the user tries(but fails) to click “Submit Test”.
This requires changes in the server, the web app and the mobile app.
A) For server side a new field Error
should be added to model.SubmitDialogResponse
. For more information about dialog submissions, see https://docs.mattermost.com/developer/interactive-dialogs.html#dialog-submission
B) For webapp, the error text should display left of the "Submit/Cancel" buttons.
C) For mobile, the error text should display above the first element of the dialog, with 20px of space from the dialog header and 20px of space from the first element of the dialog.
The user should be scrolled to a location where the error is visible.
--
If you have any questions or would like feedback, feel free to ask in the \
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.
@hanzei, I would like to work on this one. May I claim it?
Sure, please go ahead. Let me know, if you have any questions.
Thank you. Will do.
I mentioned this in a DM, just wanted to confirm here, I have two PRs in the works:
mattermost-mobile
docs
repoNice, thanks for this @pbitty :tada:
You're very welcome! The above PRs are in.
I just realized I could add test cases to the webapp e2e tests. Shall I do that?
@pbitty yes, please :)
@cpanato Will do. I am working on it. If the PR gets merged before I am done, I will submit another one adding the E2E tests.
@cpanato I have not yet had time to add the E2E tests in mattermost-webapp
. I should be able to get to it late next week. If you don't mind keeping this issue open, it will serve as a reminder for me.
@pbitty sure no problem. thanks for working on this 😄
Thank you very much for this awesome and great contribution @pbitty :tada: