Skip to content

docs: fix template node interactive forms and add tag reference#786

Merged
RiskeyL merged 1 commit into
mainfrom
fix/template-form-rendering
May 22, 2026
Merged

docs: fix template node interactive forms and add tag reference#786
RiskeyL merged 1 commit into
mainfrom
fix/template-form-rendering

Conversation

@RiskeyL
Copy link
Copy Markdown
Contributor

@RiskeyL RiskeyL commented May 19, 2026

Summary

The Interactive Forms section on /en/use-dify/nodes/template had several factual errors flagged by the Support team. This PR corrects them, adds the reference content the section was missing, and syncs the zh and ja translations.

Fixes

  • Output Limits: 80,000 characters was wrong; corrected to 400,000 (the TEMPLATE_TRANSFORM_MAX_LENGTH default in api/configs/feature/__init__.py and graphon).
  • Form example: removed blank lines inside <form> that closed the HTML block during markdown parsing and prevented downstream tags from rendering as form fields. Replaced required (not enforced by the form component) with placeholder. The example was also expanded to demonstrate every supported input type.
  • Submit behavior text: restructured as a labeled list contrasting JSON and plain text output, with a concrete downstream example (Code node or Parameter Extractor calling JSON.parse).
  • Filters example: replaced strftime (not a built-in Jinja2 filter; raises TemplateAssertionError: No filter named 'strftime') with join.
  • Added a <Note> callout warning that blank lines between tags inside <form> break rendering.

Additions

  • ### Supported Tags table covering <form>, <label>, <input>, <textarea>, <button> with valid attributes, button variants, and sizes. Values verified against web/app/components/base/markdown-blocks/form.tsx.
  • ### Supported Input Types table covering text, password, email, number, date, datetime, time, checkbox, select, hidden, with the actual submitted output for each. The time row is documented honestly: the value is not formatted before submission, so it includes a full date prefix.
  • ### Quick-Reply Buttons section for standalone <button> with data-message and data-link, including a <Note> about unvalidated data-variant/data-size values for standalone buttons.

Translations

  • zh: title and body references renamed from 模板 to 模板转换 to match web/i18n/zh-Hans/workflow.json's blocks.template-transform: "模板转换".
  • zh and ja: Code references aligned with codebase i18n (代码执行节点 / コード実行ノード).
  • Natural-language content inside code blocks kept in English so the snippets stay portable across locales.
  • zh: translationese cleanup pass for naturalness.

Copilot AI review requested due to automatic review settings May 19, 2026 11:17
@dosubot dosubot Bot added size:L This PR changes 100-499 lines, ignoring generated files. documentation Improvements or additions to documentation labels May 19, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the Template node documentation to correct Interactive Forms inaccuracies, add missing reference tables (supported tags/input types), document quick-reply button behavior, and align translated (zh/ja) pages with the updated English content.

Changes:

  • Fixes the Jinja2 filters example (replaces non-existent strftime with join).
  • Rewrites the Interactive Forms section with clarified submit formats (data-format), an expanded form example, supported tags/input types tables, and quick-reply button documentation.
  • Corrects Template output limit documentation to 400,000 characters and syncs zh/ja translations accordingly.

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.

File Description
en/use-dify/nodes/template.mdx Corrects filter example, rewrites Interactive Forms docs with references/tables, adds quick-reply button docs, updates output limit.
zh/use-dify/nodes/template.mdx Syncs with the updated English content (Interactive Forms references, quick-reply buttons, output limit) and updates the page metadata/terminology.
ja/use-dify/nodes/template.mdx Syncs with the updated English content (Interactive Forms references, quick-reply buttons, output limit) and refreshes wording/formatting.
Comments suppressed due to low confidence (1)

en/use-dify/nodes/template.mdx:176

  • This line ends with trailing whitespace after the final period. Please trim it (and ideally run a whitespace-trimming formatter on the file).
Unlike form buttons, standalone buttons pass `data-variant` and `data-size` through to the underlying component without validation. An unrecognized value can leave the button rendered as plain text rather than a styled button. 

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread en/use-dify/nodes/template.mdx
@RiskeyL RiskeyL merged commit f74bc22 into main May 22, 2026
7 of 8 checks passed
@RiskeyL RiskeyL deleted the fix/template-form-rendering branch May 22, 2026 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants