Skip to content

docs: clarify plugin view sidebar titles - #11623

Merged
Soulter merged 3 commits into
AstrBotDevs:masterfrom
Dmt3tianOVO:fix/11608-plugin-view-titles
Dec 3, 2026
Merged

Soulter merged 3 commits into
AstrBotDevs:masterfrom
Dmt3tianOVO:fix/11608-plugin-view-titles

Conversation

@Dmt3tianOVO

@Dmt3tianOVO Dmt3tianOVO commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

The plugin onboarding and publishing guides do not document views[].title in metadata.yaml. The standalone page guide shows the field in an example but does not explain why the WebUI sidebar displays the directory name when no title is available.

Closes #11608.

Modifications

  • Add a views example to the Chinese and English publishing guides and link to the standalone page guide from both onboarding guides.

  • Explain that views[].name matches the view directory and that the sidebar uses a translated view title, then views[].title, then the directory name. Document display_name as the name of the plugin itself.

  • Update both Bridge guides to describe the locale lookup order and link to the sidebar title fallback.

  • This is not a breaking change.

Verification

  • VitePress production build passed (pnpm run docs:build in docs).
  • Checked eight links and their target anchors in the generated Chinese and English onboarding, publishing, standalone page, and Bridge guides.
  • node --test dashboard/tests/pluginViewLabels.test.mjs passed all three tests.
  • git diff --check passed.

Checklist

  • Updated the affected Chinese and English WebUI documentation. The screenshots and navigation are unchanged.
  • No new dependencies.
  • The changes are limited to Markdown documentation.

Summary by Sourcery

Clarify plugin view titles and sidebar label behavior throughout the English and Chinese plugin documentation.

Documentation:

  • Document plugin view directory names, sidebar title fallback behavior, and the distinction between view titles and the plugin's display name in the English and Chinese guides.
  • Add views examples and links to the standalone page guide in both plugin publishing guides.
  • Clarify translated view-title locale lookup order and link to the sidebar fallback guidance in both Bridge guides.

@sourcery-ai

sourcery-ai Bot commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

Linked issues

Checked at commit 1d1d897

#11608 [Feature] metadata 文档里没有 views 字段,按规范示例写元数据的插件,WebUI 入口名会静默变成目录名 · 1 of 2 met

# Requirement Status Notes
1 Document views and views[].title in the onboarding, marketplace metadata, and standalone page guides. 🟡 Partly met The publishing guide now includes a views example, and the standalone page guide explains the declaration, but the supplied diff does not update an onboarding guide.
2 Explain that without a translated or metadata title, the sidebar uses the view directory name. ✅ Met The English and Chinese standalone page guides document the fallback order and give a directory-name example.

sourcery-ai[bot]
sourcery-ai Bot previously approved these changes Dec 3, 2026

@sourcery-ai sourcery-ai 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.

Hey - I've reviewed your changes and they look great!

Sourcery assessment

Approved.


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

Removed instructions for setting sidebar entry name in metadata.yaml.

@sourcery-ai sourcery-ai 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.

New gaps against the linked issues

Comment thread docs/en/dev/star/plugin-new.md Outdated
> [!WARNING]
> Please make sure to modify this file, as AstrBot relies on the `metadata.yaml` file to recognize plugin metadata.

If your plugin provides a standalone WebUI page, set its sidebar label with `title` in the `views` list in `metadata.yaml`. See [Standalone plugin page](./guides/plugin-views/plugin-page.md#register-the-page).

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.

🟡 Medium · Chinese onboarding link

The change adds onboarding guidance in English, but the Chinese onboarding guide still only says to update metadata.yaml. Add the corresponding instruction or link there so authors following that guide can find how to set the view title.

Prompt for AI agents
In `docs/en/dev/star/plugin-new.md` at line 46:

**Chinese onboarding link**

The change adds onboarding guidance in English, but the Chinese onboarding guide still only says to update `metadata.yaml`. Add the corresponding instruction or link there so authors following that guide can find how to set the view title.

From #11608:

Document how to set a standalone view's sidebar title in the onboarding, marketplace, and standalone-page guides.

@sourcery-ai
sourcery-ai Bot dismissed their stale review December 3, 2026 13:08

Sourcery withdrew this approval because the latest commits introduced blocking findings.

@Soulter
Soulter merged commit 29fb5ce into AstrBotDevs:master Dec 3, 2026
1 check passed

@sourcery-ai sourcery-ai 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.

Sourcery assessment

Approved.

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.

[Feature] metadata 文档里没有 views 字段,按规范示例写元数据的插件,WebUI 入口名会静默变成目录名

2 participants