Update documentation for interactive dialog#1498
Conversation
|
Newest code from mattermost has been published to preview environment for Git SHA 308dd54 |
📝 WalkthroughWalkthroughThis pull request updates the interactive dialogs developer documentation to replace fictional API parameters (is_multistep, refresh_on_select) with actual API implementation details, including corrected payload structures for dialog lookups, field refresh requests, and multi-step workflows with proper type fields and submission objects. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related issues
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment Tip You can validate your CodeRabbit configuration file in your editor.If your editor has YAML language server, you can enable auto-completion and validation by adding |
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
site/content/integrate/plugins/interactive-dialogs/_index.md (1)
131-131:⚠️ Potential issue | 🟡 MinorFix typo: "texareat" should be "textarea".
📝 Proposed fix
-| `type` | String | Set this value to `texareat` for a textarea element. | +| `type` | String | Set this value to `textarea` for a textarea element. |🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@site/content/integrate/plugins/interactive-dialogs/_index.md` at line 131, Replace the typo in the table row for the `type` field where the value is mistakenly written as `texareat`; change it to `textarea` so the description correctly reads "Set this value to `textarea` for a textarea element" (update the markdown table entry that references the `type` field).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@site/content/integrate/plugins/interactive-dialogs/_index.md`:
- Line 39: Replace the incorrect `source_url` parameter with the correct `url`
parameter everywhere in this document (the table row referencing `source_url`
and any examples/snippets that use `source_url`), update the description to
state that `url` is the endpoint used for dialog submission payloads and for
field refresh requests, and clarify that select elements must set
`refresh_on_select: true` (and that Mattermost sends a `dialog_field_refresh`
payload to the `url` endpoint) so examples and the parameter table match the
official Mattermost interactive dialogs API.
- Around line 219-238: Update the example and explanatory text for dynamic
select lookups so it matches Mattermost's actual POST to your data_source_url:
replace the incorrect SubmitDialogRequest-style payload (removing type, url,
callback_id, state and the nested submission/query/selected_field entries) with
the simpler payload that includes user_id, channel_id, team_id and the optional
term (the user's search input); explicitly call out that Mattermost sends only
those top-level fields for dynamic selects and clarify that other dialog fields
are not included in this lookup request.
---
Outside diff comments:
In `@site/content/integrate/plugins/interactive-dialogs/_index.md`:
- Line 131: Replace the typo in the table row for the `type` field where the
value is mistakenly written as `texareat`; change it to `textarea` so the
description correctly reads "Set this value to `textarea` for a textarea
element" (update the markdown table entry that references the `type` field).
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 9a89e6a7-ad6b-4d07-838e-500f072d46cb
📒 Files selected for processing (1)
site/content/integrate/plugins/interactive-dialogs/_index.md
CodeRabbit is looking at the old "interactive_dialog" api, not the latest AppsForm APIs.
calebroseland
left a comment
There was a problem hiding this comment.
LGTM. but one question in the dynamic field refresh section.
| 1. Set `refresh: true` on the **element** that should trigger refreshes when its value changes. | ||
| 2. Set `source_url` on the **dialog** to specify where refresh requests are sent. | ||
|
|
||
| When a user changes a select element that has `refresh: true`, Mattermost sends a request to the dialog's `source_url` via the `/api/v4/actions/dialogs/submit` endpoint. |
There was a problem hiding this comment.
Should this be lookup instead of submit?
| When a user changes a select element that has `refresh: true`, Mattermost sends a request to the dialog's `source_url` via the `/api/v4/actions/dialogs/submit` endpoint. | |
| When a user changes a select element that has `refresh: true`, Mattermost sends a request to the dialog's `source_url` via the `/api/v4/actions/dialogs/lookup` endpoint. |
There was a problem hiding this comment.
Thanks @calebroseland - "submit" is correct...though I did double check. The /api/v4/actions/dialogs/lookup endpoint is for dynamic select field lookups (when data_source: 'dynamic' and the user types to search for options)
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
/update-branch |
|
Error trying to update the PR. |
|
Newest code from mattermost has been published to preview environment for Git SHA d5a4945 |
Summary
Update the documentation for new interactive dialog features
Ticket Link
Fixes mattermost/mattermost#35586
Summary by CodeRabbit