-
Notifications
You must be signed in to change notification settings - Fork 312
docs(select): [select] add dropdown menu top slot official website documen #3186
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
Conversation
WalkthroughThis pull request introduces a new Changes
Sequence Diagram(s)sequenceDiagram
participant U as User
participant TS as TinySelect Component
participant DS as Dropdown Slot
U->>TS: Click to open dropdown
TS->>DS: Render dropdown header slot
DS-->>TS: Return header content ("顶部插槽")
TS->>U: Display dropdown with header & footer
Possibly related PRs
Suggested labels
Poem
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
examples/sites/demos/pc/app/select/slot-header-footer.spec.tsOops! Something went wrong! :( ESLint: 8.57.1 ESLint couldn't find the plugin "eslint-plugin-vue". (The package "eslint-plugin-vue" was not found when loaded as a Node module from the directory "".) It's likely that the plugin isn't installed correctly. Try reinstalling by running the following:
The plugin "eslint-plugin-vue" was referenced from the config file in ".eslintrc.js » @antfu/eslint-config » @antfu/eslint-config-vue". If you still can't figure out the problem, please stop by https://eslint.org/chat/help to chat with the team. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (1)
🪧 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: 2
🔭 Outside diff range comments (2)
examples/sites/demos/pc/app/select/slot-header-footer.spec.ts (2)
3-6
:⚠️ Potential issuePotential test path inconsistency.
The test is navigating to 'select#slot-footer' but the new functionality appears to be using 'slot-header-footer' based on other file changes. This inconsistency may be causing the pipeline timeout failure.
- await page.goto('select#slot-footer') + await page.goto('select#slot-header-footer')
7-12
: 🛠️ Refactor suggestionUpdate selector identifiers for consistency.
With the test path change, you should also update the selector identifier to match the new demo ID.
- const wrap = page.locator('#slot-footer') + const wrap = page.locator('#slot-header-footer')
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
examples/sites/demos/apis/select.js
(1 hunks)examples/sites/demos/pc/app/select/slot-header-footer-composition-api.vue
(2 hunks)examples/sites/demos/pc/app/select/slot-header-footer.spec.ts
(1 hunks)examples/sites/demos/pc/app/select/slot-header-footer.vue
(2 hunks)examples/sites/demos/pc/app/select/webdoc/select.js
(1 hunks)
🧰 Additional context used
🪛 GitHub Actions: E2E Test PR--docs(select): [select] add dropdown menu top slot official website documen
examples/sites/demos/pc/app/select/slot-header-footer.spec.ts
[error] 13-13: Test timeout of 30000ms exceeded. Error: locator.click: Test timeout of 30000ms exceeded.
🔇 Additional comments (6)
examples/sites/demos/pc/app/select/slot-header-footer.vue (2)
4-8
: New dropdown template slot implementation.The implementation adds a header slot to the dropdown menu with a success button. This is consistent with the PR's objective to add dropdown menu top slot functionality.
50-54
: Added styling for the header slot.The CSS styling for the header matches the footer styling for consistency. The styling includes center alignment, a light background color, and appropriate padding.
examples/sites/demos/pc/app/select/slot-header-footer-composition-api.vue (2)
4-8
: Consistent dropdown template implementation in Composition API.The implementation of the dropdown slot is consistent with the Options API version, providing a unified experience across different coding styles.
40-44
: Consistent styling for header slot in Composition API.The CSS styling for the header matches the corresponding implementation in the Options API version, ensuring visual consistency.
examples/sites/demos/apis/select.js (1)
846-847
: Updated footer slot demo reference.The pcDemo property for the footer slot has been updated from 'slot-footer' to 'slot-header-footer' to reflect the enhanced demo that includes both header and footer slots.
examples/sites/demos/pc/app/select/webdoc/select.js (1)
571-582
: Documentation enhancement looks good and consistent!The changes effectively update the demo to include both top and bottom dropdown slots:
- Updated the demo ID from
slot-footer
toslot-header-footer
- Modified the names in both languages to reflect the additional dropdown top slot functionality
- Enhanced the description to include documentation for the new
dropdown
slot- Updated the code file reference to match the new demo
These changes align perfectly with the PR objective of adding documentation for the dropdown menu's top slot feature.
{ | ||
name: 'dropdown', | ||
type: '', | ||
defaultValue: '', | ||
desc: { | ||
'zh-CN': '下拉弹框顶部插槽', | ||
'en-US': 'Pull down the pop-up box slot' | ||
}, | ||
mode: ['pc', 'mobile-first'], | ||
pcDemo: 'slot-header-footer' | ||
}, |
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.
💡 Verification agent
🧩 Analysis chain
Added new dropdown slot configuration.
The new dropdown slot is properly documented with appropriate properties and descriptions in both Chinese and English. This completes the PR's objective to add documentation for the dropdown menu's top slot feature.
However, there's a potential issue with the test file that still references 'select#slot-footer' instead of 'select#slot-header-footer', which may be causing the pipeline failure.
🏁 Script executed:
#!/bin/bash
# Check if all webdoc files have been updated to reflect the new slot
echo "Checking if webdoc files have been updated:"
find examples/sites/demos/pc/app/select/webdoc/ -type f -name "*.js" | xargs grep -l "slot-footer"
Length of output: 195
🏁 Script executed:
#!/bin/bash
# Search the entire codebase for instances of "select#slot-footer" to verify if any test files still reference the outdated string.
rg "select#slot-footer"
Length of output: 230
Action Required: Correct Test References to Updated Dropdown Slot
- The dropdown slot configuration in the API documentation is correctly updated to
'slot-header-footer'
. - However, we found two test files still referencing the outdated
'slot-footer'
:- examples/sites/demos/pc/app/select/slot-header-footer.spec.ts: Contains
await page.goto('select#slot-footer')
- examples/sites/demos/pc/app/base-select/slot-footer.spec.ts: Contains
await page.goto('base-select#slot-footer')
- examples/sites/demos/pc/app/select/slot-header-footer.spec.ts: Contains
- Please update these references to use the new slot identifier (e.g., change to
select#slot-header-footer
or the equivalent for base-select if needed) to ensure consistency and resolve the pipeline failure.
添加下拉框顶部插槽官网文档
PR
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: N/A
What is the new behavior?
Does this PR introduce a breaking change?
Other information
Summary by CodeRabbit
New Features
Style
Tests