-
Notifications
You must be signed in to change notification settings - Fork 125
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
Fix: dropdown.md documentation (close inside example, slots) #333
base: main
Are you sure you want to change the base?
Conversation
Note Currently processing new changes in this PR. This may take a few minutes, please wait... 📒 Files selected for processing (1)
WalkthroughThe pull request introduces modifications to the Changes
Possibly related PRs
Tip CodeRabbit can suggest fixes for GitHub Check annotations.Configure 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: 0
🧹 Outside diff range and nitpick comments (2)
docs/components/dropdown/examples/FwbDropdownExampleCloseInside.vue (1)
8-19
: Consider enhancing accessibility with ARIA labels.The list items are well-structured with consistent hover behavior. Consider adding ARIA labels for better screen reader support.
Here's how you could enhance the accessibility:
- <fwb-list-group-item hover> + <fwb-list-group-item hover aria-label="Open user profile"> Profile </fwb-list-group-item> - <fwb-list-group-item hover> + <fwb-list-group-item hover aria-label="Open settings"> Settings </fwb-list-group-item> - <fwb-list-group-item hover> + <fwb-list-group-item hover aria-label="View messages"> Messages </fwb-list-group-item> - <fwb-list-group-item hover> + <fwb-list-group-item hover aria-label="Start download"> Download </fwb-list-group-item>docs/components/dropdown.md (1)
Line range hint
236-259
: Fix component naming inconsistency in the example.The example uses
ListGroup
andListGroupItem
while other examples useFwbListGroup
andFwbListGroupItem
. This inconsistency might confuse users.Apply this diff to maintain consistency:
<template> <fwb-dropdown text="Bottom" close-inside> - <list-group> - <list-group-item> + <fwb-list-group> + <fwb-list-group-item> Profile - </list-group-item> - <list-group-item> + </fwb-list-group-item> + <fwb-list-group-item> Settings - </list-group-item> - <list-group-item> + </fwb-list-group-item> + <fwb-list-group-item> Messages - </list-group-item> - <list-group-item> + </fwb-list-group-item> + <fwb-list-group-item> Download - </list-group-item> - </list-group> + </fwb-list-group-item> + </fwb-list-group> </fwb-dropdown> </template> <script setup> - import { FwbDropdown, ListGroup, ListGroupItem } from 'flowbite-vue' + import { FwbDropdown, FwbListGroup, FwbListGroupItem } from 'flowbite-vue' </script>
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (2)
docs/components/dropdown.md
(4 hunks)docs/components/dropdown/examples/FwbDropdownExampleCloseInside.vue
(1 hunks)
🔇 Additional comments (3)
docs/components/dropdown/examples/FwbDropdownExampleCloseInside.vue (1)
3-6
: LGTM! Clear and self-documenting dropdown configuration.
The close-inside
attribute and descriptive text provide clear feedback about the dropdown's behavior.
Let's verify the close-inside
attribute is properly documented:
✅ Verification successful
The close-inside
attribute is properly documented and implemented
Based on the documentation found in docs/components/dropdown.md
, the closeInside
prop is:
- Listed in the props table with type
boolean
and default valuefalse
- Has a dedicated section "Dropdown - close inside" with example usage
- Demonstrated in the example component
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check if the close-inside attribute is documented in the dropdown markdown
rg -A 5 "close-inside" "docs/components/dropdown.md"
Length of output: 256
Script:
#!/bin/bash
# Let's check if there's any documentation or prop definition for close-inside
ast-grep --pattern 'prop: {
closeInside: {
$$$
}
}'
# Also check for any description or comments about this prop
rg -i "close.*inside" --type md
Length of output: 624
Script:
#!/bin/bash
# Let's check the actual implementation to ensure the prop is properly handled
ast-grep --pattern 'export default {
$$$
props: {
$$$
closeInside: {
$$$
}
$$$
}
$$$
}'
Length of output: 119
Script:
#!/bin/bash
# Let's try a simpler pattern to find the component definition
ast-grep --pattern 'defineComponent({
$$$
props: {
$$$
}
$$$
})'
# Also check for the component file directly
rg -l "FwbDropdown" --type vue
Length of output: 137
docs/components/dropdown.md (2)
6-6
: LGTM!
The new import follows the established pattern and maintains consistency with other example imports.
265-271
: LGTM!
The API documentation updates are well-structured and provide clear information about:
- The new
closeInside
prop - The new
trigger
slot
Also applies to: 280-283
✅ Deploy Preview for sensational-seahorse-8635f8 ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
@Sqrcz I see you assigned yourself to this. |
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.
good catch... please ammend the "semicolon issue" and it will be redy for merge.
Thank you.
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.
👌 Thank you!
Issue: #332
Summary by CodeRabbit
New Features
trigger
slot in the API, allowing for custom trigger elements.Documentation