-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Conversation
@larkox just to confirm - This will create a code dependancy with mattermost/mattermost-plugin-apps#276 We would need to co-ordinate this release with an Apps plugin release. Or Should Apps |
Old apps (and 0.7.0) won't work with this changes. What it is worth trying is that no crashes nor strange artifacts are seen in any 0.7.0 deployment. We might have to test the same about 0.8.0 in "older servers", or bump the minimum required server version. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome work @larkox! LGTM, just a few suggestions not directly related to the purpose of the PR
components/post_view/embedded_bindings/embedded_binding/embedded_binding.tsx
Show resolved
Hide resolved
components/suggestion/command_provider/app_command_parser/app_command_parser.ts
Outdated
Show resolved
Hide resolved
actions/apps.ts
Outdated
window.open(res.navigate_to_url); | ||
return {data: res}; | ||
} | ||
browserHistory.push(res.navigate_to_url.slice(getSiteURL().length)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if the url is s relative path? I'm also concerned about using a site URL with a subpath cc @DHaussermann
browserHistory.push(res.navigate_to_url.slice(getSiteURL().length)); | |
let navigateURL = res.navigate_to_url; | |
if (navigateURL.startsWith(getSiteURL())) { | |
navigateURL = navigateURL.slice(getSiteURL().length); | |
} | |
browserHistory.push(navigateURL); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mickmister @hanzei I've been thinking about this, is there a reason to even allow relative URLs here? Even if we want to allow them as apps return values, we can normalize in the server, and consider them valid here. Also need to check the mobile handling.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even if we want to allow them as apps return values, we can normalize in the server, and consider them valid here
@levb Makes sense to me
Tested and passed
|
@amyblais just a heads up that these changes are needed for the March 30 Cloud release and for v6.6 @mickmister can you please make a cherry-pick PR for the cloud branch? |
/cherry-pick cloud |
Cherry pick is scheduled. |
* WIP - need to restore Binding.Call * Address missing pieces * Re-add the submit field on calls and improve tests * Update i18n * apps API changes fixup * apps API changes fixup mattermost#2: form/modal * Address feedback * Address feedback * Fix lint * Fix missing error->text change * fix openAppsModal references * lint, types, and i18n * lint * missing method * update snapshots * Fixed handleBindingClick, was double-wrapping .data * fixed embedded button binding * various fixes * fix lookups for command parser * sync app command parser * types * fix tests * change control flow for cleaning bindings * re-expand bindings when post is updated * getDerivedStateFromProps to avoid lint rule * avoid `this` usage in static function * fix other spot with same issue Co-authored-by: Lev Brouk <lev@mattermost.com> Co-authored-by: Michael Kochell <6913320+mickmister@users.noreply.github.com> Co-authored-by: Mattermod <mattermod@users.noreply.github.com> (cherry picked from commit 25f31f5)
* WIP - need to restore Binding.Call * Address missing pieces * Re-add the submit field on calls and improve tests * Update i18n * apps API changes fixup * apps API changes fixup #2: form/modal * Address feedback * Address feedback * Fix lint * Fix missing error->text change * fix openAppsModal references * lint, types, and i18n * lint * missing method * update snapshots * Fixed handleBindingClick, was double-wrapping .data * fixed embedded button binding * various fixes * fix lookups for command parser * sync app command parser * types * fix tests * change control flow for cleaning bindings * re-expand bindings when post is updated * getDerivedStateFromProps to avoid lint rule * avoid `this` usage in static function * fix other spot with same issue Co-authored-by: Lev Brouk <lev@mattermost.com> Co-authored-by: Michael Kochell <6913320+mickmister@users.noreply.github.com> Co-authored-by: Mattermod <mattermod@users.noreply.github.com> (cherry picked from commit 25f31f5) Co-authored-by: Daniel Espino García <larkox@gmail.com> Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
* Port mattermost/mattermost-webapp#9263 to mobile * Fix forms props from commands and missing error->text change * lint * various fixes * fix lookups for command parser * update app command parser * fixes * fixes with embedded forms * lint and types * remove bindings.expanded fix for cleaning bindings on render * lint * re-expand bindings on post update Co-authored-by: Michael Kochell <6913320+mickmister@users.noreply.github.com>
@mickmister - Given that this is a breaking change and that all Apps will need to be updated to work properly, what do we need to communicate in order for others to be successful with this change? Are changes to our app developer documentation needed? |
@cwarnermm Yes we are due for doc updates for the Apps framework. I've created a ticket for us to triage next week. Thank you! |
* WIP - need to restore Binding.Call * Address missing pieces * Re-add the submit field on calls and improve tests * Update i18n * apps API changes fixup * apps API changes fixup mattermost#2: form/modal * Address feedback * Address feedback * Fix lint * Fix missing error->text change * fix openAppsModal references * lint, types, and i18n * lint * missing method * update snapshots * Fixed handleBindingClick, was double-wrapping .data * fixed embedded button binding * various fixes * fix lookups for command parser * sync app command parser * types * fix tests * change control flow for cleaning bindings * re-expand bindings when post is updated * getDerivedStateFromProps to avoid lint rule * avoid `this` usage in static function * fix other spot with same issue Co-authored-by: Lev Brouk <lev@mattermost.com> Co-authored-by: Michael Kochell <6913320+mickmister@users.noreply.github.com> Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
@mickmister - Has the apps framework documentation been updated to address the changes introduced in this PR? |
@cwarnermm Yes, this is being factored in to @neflyte's efforts |
Summary
Add separate calls for each function on Apps (submit, form source, form submit and lookup). Also updated the filtering with the new logic.
This PR also piggybacks the renaming of markdow and error to text, and filtering out "white space labels" (to avoid no text labels on post options and channel header).
Notes for testing: This is a breaking change. All Apps will need to be updated to work properly. The test app will be updated to fit the new approach.
Ticket Link
https://mattermost.atlassian.net/browse/MM-39092
https://mattermost.atlassian.net/browse/MM-39096
https://mattermost.atlassian.net/browse/MM-31121
https://mattermost.atlassian.net/browse/MM-33532
Related Pull Requests
Apps Plugin: mattermost/mattermost-plugin-apps#296
Mobile: mattermost/mattermost-mobile#5877
Test App: TBD
Release Note