Skip to content

docs(@vben/docs): update settings doc #6128

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 7, 2025

Conversation

wyc001122
Copy link
Contributor

@wyc001122 wyc001122 commented May 7, 2025

Description

  1. 偏好设置 下的 框架默认配置 按照packages/@core/preferences/src/config.ts 更新,英文文档也同步更新
  2. 另外 Environment Configuration Description 补充.env.production

Type of change

Please delete options that are not relevant.

  • This change requires a documentation update

Checklist

ℹ️ Check all checkboxes - this will indicate that you have done everything in accordance with the rules in CONTRIBUTING.

  • If you introduce new functionality, document it. You can run documentation with pnpm run docs:dev command.
  • Run the tests with pnpm test.
  • Changes in changelog are generated from PR name. Please, make sure that it explains your changes in an understandable manner. Please, prefix changeset messages with feat:, fix:, perf:, docs:, or chore:.
  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Summary by CodeRabbit

  • Documentation

    • Updated settings documentation with new and modified default preferences, including detailed descriptions of new options and default values.
    • Added a warning about clearing cache after changing preferences for changes to take effect.
    • Included an example for production environment variable configuration.
  • New Features

    • Documented new settings options for header, sidebar, tabbar, and copyright preferences.
  • Style

    • Clarified and reorganized documentation text for improved readability.

@wyc001122 wyc001122 requested review from anncwb, vince292007, mynetfan, jinmao88 and a team as code owners May 7, 2025 04:00
Copy link

changeset-bot bot commented May 7, 2025

⚠️ No Changeset found

Latest commit: 5ed2c19

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

coderabbitai bot commented May 7, 2025

Walkthrough

The documentation for application settings was updated to reflect changes in default preferences and interface definitions. New properties were added to various preference sections, some default values were modified, and a warning about cache clearing was included. Interface definitions were extended to support the new and updated preference properties.

Changes

File(s) Change Summary
docs/src/en/guide/essentials/settings.md Expanded documentation on environment variable configuration, added a .env.production example, updated default preferences with new properties and changed defaults, revised interface definitions to match, and emphasized cache clearing after preference changes.
docs/src/guide/essentials/settings.md Updated default preferences and interface documentation to reflect new properties, changed defaults, and clarified structure; no properties were removed, only added or modified.

Poem

In the warren of settings, new options appear,
With toggles and buttons, the choices are clear.
A tweak to the sidebar, a tabbar anew,
Cache-clearing reminders for all bunnies too!
Hopping through docs, with preferences in tow,
The garden of features continues to grow.
🐇✨


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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (2)
docs/src/en/guide/essentials/settings.md (2)

168-168: Nitpick: Improve warning phrasing
Consider splitting the sentence for clarity. For example:
“Please clear the cache after changing the configuration. Otherwise, it may not take effect.”


295-295: Nitpick: Widget property ordering
The refresh entry has moved ahead of sidebarToggle—consider grouping all widget flags consistently or adding a comment about the intended order.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bf70539 and 5ed2c19.

📒 Files selected for processing (2)
  • docs/src/en/guide/essentials/settings.md (14 hunks)
  • docs/src/guide/essentials/settings.md (10 hunks)
🧰 Additional context used
🪛 LanguageTool
docs/src/en/guide/essentials/settings.md

[typographical] ~564-~564: The word “otherwise” is an adverb that can’t be used like a conjunction, and therefore needs to be separated from the sentence.
Context: ...ease clear the cache after changing the configuration, otherwise it may not take effect. :::

(THUS_SENTENCE)

⏰ Context from checks skipped due to timeout of 90000ms (7)
  • GitHub Check: Lint (ubuntu-latest)
  • GitHub Check: Lint (windows-latest)
  • GitHub Check: Test (windows-latest)
  • GitHub Check: Analyze (javascript-typescript)
  • GitHub Check: Check (windows-latest)
  • GitHub Check: post-update (ubuntu-latest)
  • GitHub Check: post-update (windows-latest)
🔇 Additional comments (17)
docs/src/en/guide/essentials/settings.md (8)

63-84: Added production environment variables block
Well done extending the docs with a dedicated .env.production example. This mirrors the development block and covers key flags (VITE_COMPRESS, VITE_PWA, etc.).


218-218: Approve new settingShow default property
Adding settingShow: true to control visibility in the settings panel is a valuable enhancement. Confirm the type declaration in your core config matches.


221-221: Default footer visibility updated
Switching footer.enable to false better reflects the lean default. Verify the same change exists in the framework defaults.


227-227: Documented new header menuAlign property
Good addition of menuAlign: 'start'. Please make sure the core type (LayoutHeaderMenuAlignType) and default are in sync.


249-257: Reviewed sidebar default configuration updates
The additions (collapsedButton, fixedButton), adjustment of extraCollapse, and resize of width to 224 improve UX. Ensure these defaults are reflected in the source config.


261-271: Reviewed tabbar default configuration updates
New properties (maxCount, middleClickToClose, wheelable) and updated height enhance customization. Confirm your code’s defaults match the docs.


281-281: Updated theme semiDarkSidebar default
Switching semiDarkSidebar to false aligns with the new design direction. Verify this change in the core theme defaults.


199-199:

✅ Verification successful

Verify default loginExpiredMode matches code
The default has been changed to 'page'. Please ensure this aligns with the actual default in packages/@core/preferences/src/config.ts.

Run:


🏁 Script executed:

rg -n "loginExpiredMode" packages/@core/preferences/src/config.ts

Length of output: 98


Default loginExpiredMode Verified

The default value of loginExpiredMode is confirmed to be 'page' in packages/@core/preferences/src/config.ts (line 22). The documentation is already accurate—no changes needed.

docs/src/guide/essentials/settings.md (9)

61-82: 新增生产环境 .env.production 配置示例
文档中新增了生产环境的环境变量示例,涵盖了压缩、PWA、路由模式等配置,请与项目根目录下的 .env.production 保持一致。


167-167: 清缓存提示
“更改配置后请清空缓存,否则可能不生效” 提示清晰,用户友好。


198-198: 登录过期模式默认值更新
loginExpiredMode 默认值改为 page,请确认 packages/@core/preferences/src/config.ts 中同步更新。


217-217: 新增 settingShow 属性
添加 settingShow: true,用于控制设置面板中版权项显示。请检查类型声明是否一致。


220-220: 底栏默认不可见
footer.enable 默认为 false,与英文版一致。请确认核心配置中也做了同样修改。


226-226: 顶栏菜单对齐属性
新增 menuAlign: 'start',请与核心配置的默认值保持一致。


248-255: 侧边栏默认配置更新
新增 collapsedButtonfixedButton,调整 extraCollapsewidth224,请确认源配置文件中的默认设置。


260-269: 标签栏默认配置更新
新增 maxCountmiddleClickToClosewheelable,并将 height 更新为 38。请核对代码中对应值。


280-280: 主题半深色侧边栏默认值更新
semiDarkSidebar 默认为 false,请核实核心主题默认配置。

@jinmao88 jinmao88 merged commit 84ef207 into vbenjs:main May 7, 2025
14 checks passed
@wyc001122 wyc001122 deleted the docs/update-settings-md branch May 7, 2025 04:07
mynetfan pushed a commit that referenced this pull request May 19, 2025
baohaojie123 added a commit to baohaojie123/vue-vben-admin that referenced this pull request Jun 4, 2025
* 'main' of https://github.com/baohaojie123/vue-vben-admin:
  fix: refresh command of tabbar issue, fixed: vbenjs#6162 (vbenjs#6169)
  feat: support to refresh the tab page by route name (vbenjs#6153)
  fix: delete useless code (vbenjs#6143)
  docs(@vben/docs): update settings doc (vbenjs#6128)
  fix: tsconfig moduleResolution (vbenjs#6122)
@github-actions github-actions bot locked and limited conversation to collaborators Jun 7, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants