Skip to content

feat: additional-settings #6225

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 2 commits into from
May 19, 2025
Merged

Conversation

wyc001122
Copy link
Contributor

@wyc001122 wyc001122 commented May 19, 2025

Description

cloes #5973

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • 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

  • New Features
    • Expanded layout customization options, including settings for content width, padding (top, bottom, left, right), and stacking order.
    • Added configurable height settings for header and footer.
    • Enhanced sidebar customization with new width and collapse options.
  • Documentation
    • Updated settings documentation to reflect new layout and dimension preferences.

Copy link

changeset-bot bot commented May 19, 2025

⚠️ No Changeset found

Latest commit: f7ca613

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 19, 2025

Walkthrough

The changes introduce new layout-related properties to application preferences, including detailed content padding, compact width, z-index, and additional sidebar, header, and footer dimension properties. These properties are added to the default configuration, type definitions, and are exposed as bindings in the main layout component, enhancing UI layout configurability.

Changes

File(s) Change Summary
docs/src/en/guide/essentials/settings.md, docs/src/guide/essentials/settings.md Documentation updated to describe new layout-related preference properties and their TypeScript interface definitions.
packages/@core/preferences/src/config.ts The defaultPreferences object extended with new numeric properties for content layout, paddings, z-index, and sidebar/header/footer dimensions.
packages/@core/preferences/src/types.ts Type interfaces (AppPreferences, FooterPreferences, HeaderPreferences, SidebarPreferences) updated with new layout and sizing properties.
packages/effects/layouts/src/basic/layout.vue The layout component template updated to bind new layout-related preference properties, exposing them as props for granular layout control.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Preferences
    participant BasicLayout

    User->>Preferences: Loads or updates preferences
    Preferences-->>BasicLayout: Provides new layout properties (padding, width, zIndex, etc.)
    BasicLayout-->>User: Renders layout using updated properties
Loading

Poem

In the warren of code, a fresh patch appears,
With paddings and widths, to layout our spheres.
Z-index hops high, sidebar grows wide,
Footer and header with heights to decide.
A rabbit’s delight—such tidy affairs!
🐇✨

Note

⚡️ AI Code Reviews for VS Code, Cursor, Windsurf

CodeRabbit now has a plugin for VS Code, Cursor and Windsurf. This brings AI code reviews directly in the code editor. Each commit is reviewed immediately, finding bugs before the PR is raised. Seamless context handoff to your AI code agent ensures that you can easily incorporate review feedback.
Learn more here.


Note

⚡️ Faster reviews with caching

CodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 16th. To opt out, configure Review - Disable Cache at either the organization or repository level. If you prefer to disable all data retention across your organization, simply turn off the Data Retention setting under your Organization Settings.
Enjoy the performance boost—your workflow just got faster.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between d0b8349 and f7ca613.

⛔ Files ignored due to path filters (1)
  • packages/@core/preferences/__tests__/__snapshots__/config.test.ts.snap is excluded by !**/*.snap
📒 Files selected for processing (5)
  • docs/src/en/guide/essentials/settings.md (8 hunks)
  • docs/src/guide/essentials/settings.md (8 hunks)
  • packages/@core/preferences/src/config.ts (4 hunks)
  • packages/@core/preferences/src/types.ts (4 hunks)
  • packages/effects/layouts/src/basic/layout.vue (2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (7)
  • GitHub Check: Test (windows-latest)
  • GitHub Check: Check (windows-latest)
  • GitHub Check: Lint (windows-latest)
  • GitHub Check: Lint (ubuntu-latest)
  • GitHub Check: Analyze (javascript-typescript)
  • GitHub Check: post-update (ubuntu-latest)
  • GitHub Check: post-update (windows-latest)
🔇 Additional comments (36)
packages/effects/layouts/src/basic/layout.vue (5)

183-188: Addition of detailed content padding controls

These new props allow for more granular control over content padding, including both a general padding setting and specific directional padding controls.


191-192: Added height controls for footer and header

The new properties enable customizable heights for the footer and header components, enhancing layout flexibility.


207-210: Enhanced sidebar width configuration options

These additional properties provide more precise control over sidebar dimensions in different states (extraCollapsedWidth, mixedWidth).


212-212: Added side collapse width control

This property allows for customization of the sidebar's collapsed state width.


215-215: Z-index control added

The addition of z-index control allows for better management of stacking contexts in the application layout.

packages/@core/preferences/src/config.ts (5)

12-17: Added content dimension and padding defaults

New content layout properties with sensible defaults:

  • Content compact width: 1200px
  • General padding and directional paddings all set to 16px

These values provide good spacing for most interfaces while maintaining consistency.


32-32: Added z-index default

The default z-index of 200 is appropriate for the main application layout, allowing room for both lower and higher stacking contexts.


53-53: Set default footer height

The 32px default height for the footer is compact yet provides sufficient space for content.


57-57: Set default header height

The 50px default for header height is standard in many admin interfaces, providing adequate space for navigation and action items.


84-84: Defined sidebar dimension defaults

Sensible defaults for sidebar dimensions:

  • Collapsed width: 60px
  • Extra collapsed width: 60px
  • Mixed width: 80px

These values provide good usability while maintaining a compact interface when needed.

Also applies to: 88-88, 91-91

packages/@core/preferences/src/types.ts (5)

36-47: Well-documented content dimension type definitions

Each new property has a clear JSDoc comment explaining its purpose, making the code more maintainable and developer-friendly.


78-79: Added z-index type definition

The z-index property is properly typed and documented.


117-118: Added footer height type definition

The footer height property is properly typed with appropriate documentation.


124-125: Added header height type definition

The header height property is properly typed with appropriate documentation.


159-160: Added sidebar dimension type definitions

The sidebar dimension properties (collapseWidth, extraCollapsedWidth, mixedWidth) are properly typed with clear documentation.

Also applies to: 167-168, 173-174

docs/src/en/guide/essentials/settings.md (10)

189-194: Updated documentation with content layout properties

The documentation now includes the new content compact width and padding settings, ensuring users can configure these options properly.


209-209: Documented z-index setting

The z-index property is included in the documentation with its default value.


230-230: Documented footer height setting

The footer height property is properly documented with its default value.


234-234: Documented header height setting

The header height property is properly documented with its default value.


260-260: Documented sidebar dimension settings

All sidebar dimension settings (collapseWidth, extraCollapsedWidth, mixedWidth) are properly documented with their default values.

Also applies to: 264-264, 267-267


334-345: Comprehensive type documentation for content layout properties

The documentation includes clear type definitions for all the new content padding and dimension properties, making it easy for developers to understand their purpose and usage.


376-377: Documented z-index type

The z-index property's type is properly documented.


414-415: Documented footer height type

The footer height property's type is properly documented.


421-422: Documented header height type

The header height property's type is properly documented.


455-456: Documented sidebar dimension types

All sidebar dimension types (collapseWidth, extraCollapsedWidth, mixedWidth) are properly documented with clear descriptions.

Also applies to: 463-464, 469-470

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

1-1: Ensure English documentation is updated
The new preference properties have been added to the Chinese guide. Please verify that the corresponding English version (docs/src/en/guide/essentials/settings.md) has been updated with the same additions to keep both language guides in sync.


188-194: Add content layout dimension defaults
The six new properties (contentCompactWidth, contentPadding, contentPaddingBottom, contentPaddingLeft, contentPaddingRight, contentPaddingTop) are correctly added under app defaults. Please confirm these values (1200, 16, 16, 16, 16, 16) match the defaults defined in packages/@core/preferences/src/config.ts.


208-208: Introduce zIndex default setting
A zIndex property has been added to control stacking order in the app preferences. Verify that the default of 200 aligns with your UI layering requirements.


229-229: Specify footer.height default
The height property for footer preferences is set to 32. Ensure this matches the design specification for footer height.


233-233: Specify header.height default
The height property for header preferences is set to 50. Confirm that this value reflects the intended header design.


259-266: Extend sidebar width properties
The sidebar preferences now include collapseWidth, extraCollapsedWidth, and mixedWidth with defaults 60, 60, and 80 respectively. Validate these settings to ensure the collapsed and mixed sidebar layouts behave as expected.


334-344: Extend AppPreferences interface with content padding
The TypeScript AppPreferences interface is updated to include the six content layout properties. Please check that each JSDoc comment clearly describes its corresponding default.


376-376: Add zIndex to AppPreferences interface
The zIndex field is now part of the AppPreferences interface. Ensure the inline comment uses consistent terminology with other stacking-related docs.


415-415: Add height to FooterPreferences
The FooterPreferences interface now includes a height property. Confirm the comment aligns with your project's inline documentation style.


422-422: Add height to HeaderPreferences
The HeaderPreferences interface now includes a height property. Verify that the comment is formatted consistently with other preference fields.


457-471: Add collapse and mixed widths to SidebarPreferences
The SidebarPreferences interface now includes collapseWidth, extraCollapsedWidth, and mixedWidth. Ensure these numeric properties and their descriptions match the implementation in your layout components.

✨ Finishing Touches
  • 📝 Generate Docstrings

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.
    • Explain this complex logic.
    • 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 explain this code block.
    • @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 explain its main purpose.
    • @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.

@wyc001122 wyc001122 changed the title Feat/additional settings feat/additional settings May 19, 2025
@wyc001122 wyc001122 changed the title feat/additional settings feat-additional-settings May 19, 2025
@wyc001122 wyc001122 changed the title feat-additional-settings feat:additional-settings May 19, 2025
@wyc001122 wyc001122 changed the title feat:additional-settings feat: additional-settings May 19, 2025
@jinmao88 jinmao88 merged commit dae46ab into vbenjs:main May 19, 2025
13 of 18 checks passed
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.

2 participants