-
Notifications
You must be signed in to change notification settings - Fork 7.2k
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
feat: Added header height props #5367
base: main
Are you sure you want to change the base?
Conversation
|
Warning There were issues while running some tools. Please review the errors and either fix the tool’s configuration or disable the tool if it’s a critical failure. 🔧 eslint
packages/@core/preferences/src/types.tsOops! Something went wrong! :( ESLint: 9.17.0 Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/node_modules/@vben/eslint-config/dist/index.mjs' imported from /eslint.config.mjs WalkthroughThe pull request introduces a new Changes
Sequence DiagramsequenceDiagram
participant User as User Preferences
participant Preferences as HeaderPreferences
participant Layout as VbenAdminLayout
User->>Preferences: Set header height
Preferences-->>Layout: height value
Layout->>Layout: Apply dynamic header height
Poem
Finishing Touches
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (1)
packages/@core/preferences/src/types.ts (1)
106-107
: Consider standardizing the JSDoc comment languageThe JSDoc comment for the height property is in Chinese while most other properties use English comments. Consider maintaining consistency in documentation language.
- /** header高度 */ + /** Header height */ height: number;
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
packages/@core/preferences/src/types.ts
(1 hunks)packages/effects/layouts/src/basic/layout.vue
(2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: post-update (windows-latest)
- GitHub Check: post-update (ubuntu-latest)
🔇 Additional comments (2)
packages/@core/preferences/src/types.ts (1)
106-107
: Verify default height value handlingThe height property is added without specifying how default values should be handled. Consider documenting the expected default behavior or constraints.
packages/effects/layouts/src/basic/layout.vue (1)
181-181
: LGTM! Clean implementation of header height customizationThe header height property is correctly bound to the VbenAdminLayout component, maintaining consistency with other header-related properties.
@enter="handleMenuMouseEnter" | ||
@select="handleMixedMenuSelect" | ||
@default-select="handleDefaultSelect" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codebase verification
Confirmed: Unrelated change to header height feature
The @default-select
event handler is part of the menu navigation system and has no functional relationship with the header height feature. This change should be addressed in a separate PR focused on menu-related modifications.
🔗 Analysis chain
Unrelated change detected
The @default-select
event handler appears to be re-added without any functional changes. This seems unrelated to the header height feature.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Check if this event handler existed before
git log -S '@default-select' --pickaxe-regex
Length of output: 0
Script:
#!/bin/bash
# Search for all occurrences of default-select
rg -l '@default-select|@emit.*default-select|\$emit.*default-select' --type vue
# Find handleDefaultSelect implementation
ast-grep --pattern 'handleDefaultSelect($$$) {
$$$
}'
Length of output: 167
Script:
#!/bin/bash
# Search for all occurrences of default-select and handler
rg -l 'default-select|handleDefaultSelect'
# Find the implementation with more context
ast-grep --pattern 'methods: {
$$$
handleDefaultSelect($$$) {
$$$
}
$$$
}'
Length of output: 237
Script:
#!/bin/bash
# Get context for both files
rg 'default-select|handleDefaultSelect' -C 5 packages/effects/layouts/src/basic/layout.vue packages/effects/layouts/src/basic/menu/use-extra-menu.ts
# Look for header-related code near these occurrences
rg 'header|height' -C 5 packages/effects/layouts/src/basic/layout.vue
Length of output: 7194
Description
暴露Layout组件Header中的height props,方便用户自定义Header高度
Type of change
Please delete options that are not relevant.
pnpm-lock.yaml
unless you introduce a new test example.Checklist
pnpm run docs:dev
command.pnpm test
.feat:
,fix:
,perf:
,docs:
, orchore:
.Summary by CodeRabbit
New Features
Improvements