Skip to content

Document file upload element for interactive dialogs#1509

Open
sbishel wants to merge 5 commits into
masterfrom
interactive-dialog-files
Open

Document file upload element for interactive dialogs#1509
sbishel wants to merge 5 commits into
masterfrom
interactive-dialog-files

Conversation

@sbishel

@sbishel sbishel commented Jun 8, 2026

Copy link
Copy Markdown
Member

Summary

Documents the new file element type for interactive dialogs

Adds to integrate/plugins/interactive-dialogs:

  • file added to the supported element-type list.
  • A "File elements" section with single- and multiple-upload (allow_multiple)
    examples and the full field table (display_name, name, type, optional,
    help_text, default, placeholder, allow_multiple).
  • File upload limits (max 10 file IDs per submission, per-user ownership
    validation, automatic deduplication).
  • How uploaded file IDs are returned in the top-level file_ids array, with
    guidance to treat file_ids as the authoritative source.
  • file_ids added to the dialog submission payload example.

Related

Product PR:

Ticket Link

Fixes https://mattermost.atlassian.net/browse/MM-66109

@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown

Newest code from mattermost has been published to preview environment for Git SHA 9c5dfe4

@coderabbitai

coderabbitai Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 6ff388e7-1b0c-4f61-b789-72dce781ab4f

📥 Commits

Reviewing files that changed from the base of the PR and between 9c5dfe4 and 835f1de.

📒 Files selected for processing (1)
  • site/content/integrate/plugins/interactive-dialogs/_index.md

📝 Walkthrough

Walkthrough

Adds documentation for a new file interactive-dialog element, including single/multiple upload examples, supported element fields and validation rules, and an updated dialog submission payload example with a top-level file_ids array.

Changes

File element support documentation

Layer / File(s) Summary
File element documentation and schema updates
site/content/integrate/plugins/interactive-dialogs/_index.md
The file element type is added to the elements overview list. A "File elements" section documents single and multiple file upload controls, supported fields (allow_multiple, default, placeholder, help_text, optional), submission constraints and validation semantics, and updates the dialog submission payload example to include a top-level file_ids array alongside submission.

🎯 2 (Simple) | ⏱️ ~8 minutes

Suggested labels: 1: Dev Review

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately and concisely describes the main change: documenting a new file upload element for interactive dialogs.
Description check ✅ Passed The description is well-detailed and directly related to the changeset, covering the new file element type, field properties, upload limits, and payload updates.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch interactive-dialog-files

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
site/content/integrate/plugins/interactive-dialogs/_index.md (1)

625-627: ⚡ Quick win

Add a minimum server version note for file elements.

Most newer element capabilities in this doc are version-gated; adding the server-version floor here would prevent rollout confusion for self-hosted deployments.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@site/content/integrate/plugins/interactive-dialogs/_index.md` around lines
625 - 627, Add a minimum server-version note for the "File elements" section:
update the "### File elements" block (and the accompanying `file` element
example) to include a short server-version floor notice indicating the minimum
self-hosted server release that supports `file` elements, placed directly under
the heading (or immediately above the example) so readers see the version
requirement before the example usage.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@site/content/integrate/plugins/interactive-dialogs/_index.md`:
- Around line 671-672: The docs now state a top-level file_ids in dialog
submissions but the OpenAPI schema for POST /api/v4/actions/dialogs/submit in
site/static/mattermost-openapi-v4.yaml doesn't include it; update the OpenAPI
operation schema to add a top-level file_ids array (type: array, items: string
or file ID schema) to match the published payload contract, ensuring the
request/response examples and any related components reflect this field, or
alternatively mark the docs as "integration webhook-only" in the markdown and
add a clear x-note in the OpenAPI entry to prevent codegen/SDK consumers from
assuming file_ids is part of the official API contract.

---

Nitpick comments:
In `@site/content/integrate/plugins/interactive-dialogs/_index.md`:
- Around line 625-627: Add a minimum server-version note for the "File elements"
section: update the "### File elements" block (and the accompanying `file`
element example) to include a short server-version floor notice indicating the
minimum self-hosted server release that supports `file` elements, placed
directly under the heading (or immediately above the example) so readers see the
version requirement before the example usage.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a7f2b2fe-2732-4c9d-b9a6-c609503cea7f

📥 Commits

Reviewing files that changed from the base of the PR and between 1ce44f1 and 9c5dfe4.

📒 Files selected for processing (1)
  • site/content/integrate/plugins/interactive-dialogs/_index.md

Comment thread site/content/integrate/plugins/interactive-dialogs/_index.md
@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown

Newest code from mattermost has been published to preview environment for Git SHA 835f1de

@sbishel sbishel requested a review from wiggin77 June 12, 2026 16:16
@github-actions

Copy link
Copy Markdown

Newest code from mattermost has been published to preview environment for Git SHA afd2222

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant