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

Create new content for Apps Structure topic #1111

Merged
merged 36 commits into from
Oct 12, 2022
Merged
Show file tree
Hide file tree
Changes from 31 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
500675b
Update Apps Structure Manifest topic; Update styles to not break word…
neflyte Sep 1, 2022
0a95690
Merge branch 'master' into nef-apps-structure-content
neflyte Sep 8, 2022
bd8a61f
Update existing content in Apps Structure topic; Fix missing CSS styl…
neflyte Sep 8, 2022
39d7798
Add support for Compass Icons; Move FontAwesome files from fonts dire…
neflyte Sep 9, 2022
e8d9a37
Add image to Apps Structure topic homepage which illustrates call han…
neflyte Sep 13, 2022
8345f5a
More improvements to App Calls topic
neflyte Sep 13, 2022
7396d4e
Remove unimplemented or unsupported struct fields; Improve context ex…
neflyte Sep 13, 2022
4303bd7
Pull compass icons assets once and commit instead of pulling with eac…
neflyte Sep 14, 2022
8bdbe49
Start updating Bindings sub topic
neflyte Sep 14, 2022
20235b1
Merge branch 'master' into nef-apps-structure-content
neflyte Sep 19, 2022
1f94ade
Further updates to Bindings, call, and call metadata topics; Update C…
neflyte Sep 19, 2022
979e9eb
Finish up changes to Bindings topic; Use star icon as the symbol to d…
neflyte Sep 19, 2022
c666a25
Improve support for collapsable blocks using existing Bootstrap compo…
neflyte Sep 20, 2022
6bf29cb
Add content in Static assets topic
neflyte Sep 20, 2022
b1e4de2
Merge branch 'master' into nef-apps-structure-content
neflyte Sep 28, 2022
09bde34
Merge branch 'master' into nef-apps-structure-content
cwarnermm Sep 30, 2022
c5e6636
Apply suggestions from code review
neflyte Oct 3, 2022
451fc02
Apply suggestions from code review
neflyte Oct 3, 2022
66cba00
Merge master into this branch
neflyte Oct 3, 2022
a252e8e
Merge branch 'master' into nef-apps-structure-content
neflyte Oct 3, 2022
06802d0
Changes based on PR feedback
neflyte Oct 3, 2022
c0699b6
Apply suggestions from code review
neflyte Oct 3, 2022
4cd95c4
Update site/content/integrate/apps/functionality/_index.md
neflyte Oct 3, 2022
c623e4e
Merge branch 'master' into nef-apps-structure-content
neflyte Oct 4, 2022
143b9d1
Merge branch 'master' into nef-apps-structure-content
neflyte Oct 4, 2022
7dfbc4d
Merge branch 'master' into nef-apps-structure-content
azigler Oct 4, 2022
7379871
Modify collapse, compass-icon, newtabref, and note shortcodes to use …
neflyte Oct 5, 2022
535a8c9
Merge master into this branch
neflyte Oct 5, 2022
f234136
Merge master into this branch to pick up #1109
neflyte Oct 6, 2022
2bbde8a
Merge branch 'master' into nef-apps-structure-content
neflyte Oct 6, 2022
d98013e
Merge branch 'master' into nef-apps-structure-content
cwarnermm Oct 7, 2022
789243f
Update description of Bindings
neflyte Oct 11, 2022
7d26f2c
Apply suggestions from code review
neflyte Oct 11, 2022
3c4cbaa
Apply suggestions from code review
neflyte Oct 11, 2022
eae738e
Apply changes from PR reviews
neflyte Oct 11, 2022
16faa92
Merge branch 'master' into nef-apps-structure-content
neflyte Oct 12, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,10 @@ run:
build:
rm -rf ./dist
hugo -s site --verbose --destination ../dist/html --printUnusedTemplates --printPathWarnings --gc

.PHONY: compass-icons
compass-icons:
mkdir -p site/static/css
mkdir -p site/static/font
curl --no-progress-meter -o site/static/css/compass-icons.css https://mattermost.github.io/compass-icons/css/compass-icons.css
curl --no-progress-meter -o "site/static/font/compass-icons.#1" "https://mattermost.github.io/compass-icons/font/compass-icons.{eot,woff2,woff,ttf,svg}"
7 changes: 7 additions & 0 deletions site/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ pygmentsStyle = "manni"
email = ""
ghrepo = "https://github.com/mattermost/mattermost-developer-documentation/"

# Parameters controlling collapsable blocks
[params.collapse]
collapsedIcon = "icon-chevron-right" # Icon to show when the block is collapsed
expandedIcon = "icon-chevron-down" # Icon to show when the block is expanded
collapseShowClass = "show" # CSS class to add when expanding the block
toggleClass = "collapseToggle" # CSS class to control icon attributes (e.g. size)

[params.mailinglist]
enable = false

Expand Down
14 changes: 12 additions & 2 deletions site/content/integrate/apps/functionality/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@ title: Functionality
description: Apps API functionality
weight: 60
---
In addition to the {{<newtabref title="Mattermost REST APIs" href="https://api.mattermost.com">}}, the Apps framework provides additional functionality:
neflyte marked this conversation as resolved.
Show resolved Hide resolved

### Coming soon!
In the future this section will explore additional functionality that Apps provide. For example, event subscriptions.
- [KV Store]({{< ref "kv-store" >}}) - a simple key-value store for App-specific data.

- [OAuth2 Store]({{< ref "mattermost-api#apps-api" >}}) - store, expand, and retrieve user and App OAuth2 configuration data.

- [Calling other Apps]({{< ref "mattermost-api#apps-api" >}}) - use the Call API to invoke other Apps (experimental).
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure if we should advertise this if it's experimental cc @levb

Copy link
Contributor Author

@neflyte neflyte Oct 6, 2022

Choose a reason for hiding this comment

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

@levb @mickmister How would anyone know if a feature of the Apps framework is "experimental" other than what's in the code or existing docs? Can we refrain from including any experimental stuff in framework releases so this isn't an issue? There's no issue with having experimental stuff in a branch.

Copy link
Member

Choose a reason for hiding this comment

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

This potentially could change with the OAuth 2.0 scopes work coming. @mickmister - We're going to move forward and merge this PR. This content can be updated iteratively as needed if you continue to be concerned.


- [Subscriptions]({{< ref "subscriptions" >}}) learn how to subscribe to notifications about Mattermost events. For example: have your App notified whenever a message is posted in a channel that mentions your @bot account.

- [External webhooks]({{< ref "external-webhooks" >}}) learn how to subscribe to webhooks from third-party systems.

See [Authenticating with Mattermost]({{< ref "/integrate/apps/authentication/app-to-mattermost" >}}) to learn how to authenticate to all these services.
52 changes: 6 additions & 46 deletions site/content/integrate/apps/structure/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,54 +9,14 @@ aliases:

Apps consist of three kinds of assets:

- [manifest.json]({{< ref "manifest" >}}) file
1. A [manifest]({{< ref "manifest" >}}), which contains App details such as name, version, requested permissions, and deployment methods.

- [Call]({{< ref "call" >}}) handlers, starting with `/bindings` (see
[Bindings]({{< ref "bindings" >}})) and `/on_install` (see
[Manifest]({{< ref "manifest" >}})). Call handlers are typically source files
in a programming language like JavaScript, Python, or Go.
2. [Call]({{< ref "call" >}}) handlers, which are functions that handle incoming requests from the Mattermost server.

- Static assets, currently solely icon files
3. [Static assets]({{<ref "static-assets">}}), such as images.

## Interactivity: Bindings and forms
To interact with users, an App must [bind]({{< ref "bindings" >}}) a call handler to a [location]({{<ref "manifest#locations">}}) in the Mattermost user interface. These locations may be slash commands, toolbar and menu items, or embedded in posts.

- To interact with users an App must [bind]({{< ref "bindings" >}}) a call to a
location in the Mattermost user interface. These locations may be
`/`-commands, toolbar and menu items, and embedded in posts.
![image](apps-calls_bindings_locations_v2.svg)

- A [binding]({{< ref "bindings" >}}) may display a [Form]({{< ref
"interactivity" >}}), or it may invoke a `Call` that will return a `Form`.
Forms allow to gather fields with limited dynamic behavior
(dynamically-populated selects, form refresh on field changes). A Form invokes
a `Call` when it is submitted. A `/`-command is just another way of filling
out a `Form` and submitting it.

## Use Mattermost APIs

Apps can use all general [Mattermost REST API]({{< ref "mattermost-api" >}})s,
as well as special services that are provided to the apps.

See [Authenticating with Mattermost]({{< ref "app-to-mattermost" >}}) for how
to authenticate to all these services.

App services:

- [KV Store]({{< ref "mattermost-api#apps-api" >}}) - store and retrive app-specific data.

- [OAuth2 Store]({{< ref "mattermost-api#apps-api" >}}) - store, expand, and retrieve user and
app OAuth2 configuration data.

- [Calling other Apps]({{< ref "mattermost-api#apps-api" >}}) - use the `Call` API to invoke
other apps (experimental).

## Other

- [Subscriptions]({{< ref "subscriptions" >}}) covers how to subscribe to
notifications abdout Mattermost events. Examples of a subscription include having your App notified whenever a message is posted in a channel that mentions your @bot account.

- [External webhooks]({{< ref "/integrate/apps/functionality/external-webhooks" >}}) covers subscribing to
webhooks from third-party systems.

- [Lifecycle]({{< ref "lifecycle" >}}) covers lifecycle callback API, i. e.
`on_install`. This is useful for calling your app when it is first installed, or the user is attempting to uninstall it and gives you a chance to initialize or clean up data (such as from the KV store) before uninstalling your app.

A [Binding]({{< ref "bindings" >}}) may display a [Form]({{< ref "interactivity" >}}), or it may invoke a call that will return a form. Forms allow the user to input information with limited dynamic behavior, such as dynamically-populated pick lists, or form refreshes on field changes.
neflyte marked this conversation as resolved.
Show resolved Hide resolved
Loading