docs: add Snippets feature guide (self-host)#840
Open
RiskeyL wants to merge 2 commits into
Open
Conversation
Document the Snippets feature on the self-host tree in English, Chinese, and Japanese: creating snippets, the node and Input Variables differences from a standard workflow, the draft-and-publish model, adding a snippet to a workflow, and role-based permissions. Add the pages to docs.json. Community Edition ships first; the Cloud copy follows when Cloud reaches 1.16.
Workspace role names are no longer localized: the member UI renders role.name directly from RBAC/backend data, and the localized name keys were removed. Replace the stale zh/ja translation table with a note to use the English role names in all languages.
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new self-host user guide page documenting the Snippets feature (reusable node groups) and updates terminology guidance around workspace role names.
Changes:
- Add a Snippets feature guide under
self-host/use-dify/build/(en/zh/ja). - Update
writing-guides/glossary.mdto reflect that workspace role names are no longer localized in the UI. - Add Snippets to navigation (
docs.json).
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| en/self-host/use-dify/build/snippet.mdx | New English Snippets guide (create/edit/publish/insert/permissions). |
| zh/self-host/use-dify/build/snippet.mdx | New Chinese Snippets page (manual translation) with frontmatter issues to address. |
| ja/self-host/use-dify/build/snippet.mdx | New Japanese Snippets page (manual translation) with frontmatter issues to address. |
| writing-guides/glossary.md | Workspace role localization guidance updated; requires regenerating derived termbase output. |
| docs.json | Adds Snippets to nav; non-English nav entries should not be edited per repo guidelines. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+1
to
+3
| --- | ||
| title: Snippets | ||
| --- |
Comment on lines
+1
to
+3
| --- | ||
| title: スニペット | ||
| --- |
Comment on lines
+1603
to
1606
| "zh/self-host/use-dify/build/snippet", | ||
| "zh/self-host/use-dify/build/shortcut-key", | ||
| "zh/self-host/use-dify/build/version-control", | ||
| "zh/self-host/use-dify/build/workflow-collaboration", |
Comment on lines
+2596
to
2599
| "ja/self-host/use-dify/build/snippet", | ||
| "ja/self-host/use-dify/build/shortcut-key", | ||
| "ja/self-host/use-dify/build/version-control", | ||
| "ja/self-host/use-dify/build/workflow-collaboration", |
Comment on lines
+230
to
+232
| Role **names are not localized**. The member UI renders `role.name` raw from RBAC/backend data (`web/app/components/header/account-setting/members-page/member-row.tsx`); the `common.members.<role>` name keys were removed, leaving only the `common.members.<role>Tip` descriptions. Built-in roles display as English identifiers in every language, and custom RBAC roles show their own names. **In docs, use the English role names in all languages** (zh/ja included) to match the UI. | ||
|
|
||
| Built-in roles: Owner, Admin, Editor, Builder, Knowledge Admin (code: `datasetOperator`), Normal. The UI renders them lowercase (`owner`, `admin`, …); docs capitalize them for readability. |
Comment on lines
+1
to
+5
| --- | ||
| title: Snippets | ||
| --- | ||
|
|
||
| > 本文档由 AI 自动翻译。如有任何不准确之处,请参考 [英文原版](/en/self-host/use-dify/build/snippet)。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds documentation for Snippets: reusable groups of workflow nodes you can save, share across a workspace, and insert into other workflows.
Covers:
Scope
Self-host tree only, in English, Chinese, and Japanese. Community Edition ships first; the Cloud copy follows when Cloud reaches 1.16.
Behavior is verified against the merged feature in the
difycodebase (the forbidden-node set, the runtime virtual-start-node injection, and the RBAC permission model), not carried over from earlier drafts.Also included
A glossary fix: workspace role names are no longer localized. The member UI renders
role.nameraw and the localized name keys were removed, so the stale zh/ja role-name table becomes a note to use the English names in all languages. The guide's Permissions tables follow this.