-
-
Notifications
You must be signed in to change notification settings - Fork 174
docs: refactor docs to avoid duplication and boilerplate code #2891
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
…f individual pages
|
|
|
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. WalkthroughAdds a VitePress Markdown plugin, new data loaders and composables, converts docs to data-driven rendering and frontmatter-based headers, removes per-component Changes
Sequence Diagram(s)sequenceDiagram
participant VP as VitePress
participant MD as MarkdownIt
participant Plugin as autoInjectDocComponents
participant Loader as createContentLoader / data
participant Page as PageHeader / ComponentReference
Note over VP,MD: Render pipeline for docs Markdown
VP->>MD: render(file.md)
MD->>Plugin: md.render intercept (file path)
Plugin->>Plugin: parse frontmatter & validate description
alt file under src/docs and has description
Plugin->>Plugin: derive title from filename
Plugin->>MD: inject header "# Title\n\n<PageHeader />" if missing
Plugin->>Loader: compute data import name (camelCase)
Plugin->>MD: inject <script> import + <ComponentReference /> before <style>/EOF
end
MD->>VP: processed HTML
VP->>Page: PageHeader/ComponentReference render using data & markdown renderer
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes
Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (24)
💤 Files with no reviewable changes (17)
🚧 Files skipped from review as they are similar to previous changes (3)
🧰 Additional context used📓 Path-based instructions (1)apps/docs/src/data/components/*.data.ts📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
🧠 Learnings (2)📚 Learning: 2025-09-30T23:57:21.526ZApplied to files:
📚 Learning: 2025-10-21T19:31:54.113ZApplied to files:
🪛 LanguageToolapps/docs/src/docs/icons.md[grammar] ~6-~6: Ensure spelling is correct (QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1) ⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
🔇 Additional comments (4)
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. Comment |
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.
Pull Request Overview
This PR refactors the documentation build system to eliminate manual duplication and boilerplate by automating description management, header/footer injection, and sourcePath inference. The changes affect all documentation files (100+ markdown files, 44+ data files) to establish a centralized, maintainable documentation structure.
Key changes:
- Centralized component descriptions in markdown frontmatter (single source of truth)
- Auto-injection of page headers, titles, and ComponentReference footers via markdown-it plugin
- Intelligent sourcePath derivation based on component ordering in data files
- Shared data loader utilities for DRY code across components, composables, directives, and configurations
Reviewed Changes
Copilot reviewed 127 out of 128 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| apps/docs/src/utils/dataLoaderUtils.ts | New shared utilities for data transformation and title case conversion |
| apps/docs/src/types/index.ts | Made sourcePath optional in ComponentReference to support auto-derivation |
| apps/docs/src/docs/reference/accessibility.md | Updated Bootstrap version reference from V4 to V5 |
| apps/docs/src/docs/directives/*.md | Added frontmatter with descriptions, removed manual headers |
| apps/docs/src/docs/composables/*.md | Added frontmatter with descriptions, removed manual headers |
| apps/docs/src/docs/components/*.md | Added frontmatter with descriptions, removed manual headers and footers |
| apps/docs/src/data/**/*.data.ts | New data loaders using shared utilities |
| apps/docs/src/components/PageHeader.vue | Unified header component with auto-derived source/edit links |
| apps/docs/src/components/ComponentReference.vue | Auto-derives sourcePath from component ordering |
| apps/docs/.vitepress/plugins/auto-inject-doc-components.ts | Markdown-it plugin for auto-injection |
| CONTRIBUTING.md | Comprehensive documentation of new conventions and requirements |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
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: 8
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (11)
apps/docs/src/docs/components/dropdown.md (1)
254-254: Remove orphaned text on line 254.Line 254 contains dangling
`variant`)which appears to be leftover from refactoring or an incomplete edit. This should be removed to avoid rendering broken content.- `variant`)apps/docs/src/docs/components/badge.md (1)
26-26: Fix typos in accessibility guidance.Line 26: "haveto" should be "have to"
Line 27: "hanlded" should be "handled"- Note that for links of buttons, you haveto manually apply the `postition-relative` class to the badge's parent, - unlike with [`Avatars`](/docs/components/avatar) where that is hanlded automatically. + Note that for links or buttons, you have to manually apply the `position-relative` class to the badge's parent, + unlike with [`Avatars`](/docs/components/avatar) where that is handled automatically.Also applies to: 27-27
apps/docs/src/docs/components/form-select.md (1)
1-146: CreateformSelect.data.tsto support auto-injected ComponentReference footer.The auto-injection plugin will attempt to inject
<ComponentReference :data="data" />and the import statementimport {data} from '../../data/components/formSelect.data'because:
- The file has a frontmatter
description(required trigger)- It lacks existing
<ComponentReference />and<script setup>sectionsHowever,
formSelect.data.tsdoes not exist, which will cause a module resolution failure at build time. All other components follow this pattern (accordion, alert, avatar, badge, button, etc.). Create the missing data file atapps/docs/src/data/components/formSelect.data.tsfollowing the same structure as peer component data files.apps/docs/src/data/components/buttonToolbar.data.ts (1)
27-31: Fix incorrect slot type definition (pre-existing issue).Line 31 incorrectly uses
PropRecord<keyof BButtonGroupSlots>for the slots definition. This violates the coding guideline requiring type definitions to match interfaces exactly. Should beSlotRecord<keyof BButtonToolbarSlots>.Apply this diff to fix the type definition:
- } satisfies PropRecord<keyof BButtonGroupSlots>, + } satisfies SlotRecord<keyof BButtonToolbarSlots>,Additionally, update the import on line 1:
-import type {BButtonGroupSlots, BButtonToolbarProps} from 'bootstrap-vue-next' +import type {BButtonToolbarProps, BButtonToolbarSlots} from 'bootstrap-vue-next'apps/docs/src/docs/components/modal.md (1)
1-370: ComponentReference component is missing from modal.md—the refactor is incomplete.The file lacks the actual
<ComponentReference :data="data" />component that should display the modal's props, events, and slots. Whilemodal.data.tsis properly configured and YAML frontmatter is present, the documentation reference itself is not rendered. The HTML comment at the end appears to be a placeholder rather than evidence of working auto-injection.Comparison shows
grid-system.mdstill uses the legacy pattern (script setup + ComponentReference), indicating either this refactor is inconsistent across files or the auto-injection pipeline has not been implemented.Add the ComponentReference component (and corresponding script import if auto-injection is not available):
<ComponentReference :data="data" /> <script setup lang="ts"> import {data} from '../../data/components/modal.data' </script>Alternatively, if auto-injection is intended, the pipeline must be implemented in VitePress/Vite configuration to automatically inject this component based on the frontmatter or file naming.
apps/docs/src/docs/components/link.md (1)
7-7: Fix typographical error.The word "defaut" should be "default".
Apply this diff:
-By defaut links with no options will default to # location. +By default links with no options will default to # location.apps/docs/src/docs/components/form-input.md (1)
110-110: Fix typographical error.There's an extra space in "sta tes" which should be "states".
Apply this diff:
-Using these contextual sta tes to denote the state of a form control only provides a visual, +Using these contextual states to denote the state of a form control only provides a visual,apps/docs/src/data/components/formTags.data.ts (1)
21-72: Critical: Component keys are swapped with their definitions.The component keys don't match their prop definitions:
- Line 21: Key is
BFormTags(plural) but props at lines 24-55 are typed asBFormTagProps(singular component for individual tags)- Line 73: Key is
BFormTag(singular) but props at lines 76-218 are typed asBFormTagsProps(plural component for the tags input)This mismatch will cause incorrect documentation to be displayed for both components, showing the wrong props, events, and slots.
Apply this diff to swap the component keys back to match their definitions:
- BFormTags: { + BFormTag: { styleSpec: {kind: StyleKind.BsvnClass}, props: { ...pick( buildCommonProps({ title: { ... } satisfies SlotRecord<keyof BFormTagSlots>, }, - BFormTag: { + BFormTags: { styleSpec: {kind: StyleKind.BsvnClass}, props: {Also applies to: 73-471
apps/docs/src/docs/components/carousel.md (1)
32-38: Tiny grammar fix in “Indicators” paragraph.Replace “With the indicators prop, can add indicators ... along side” with “With the indicators prop, you can add indicators ... alongside”.
-With the `indicators` prop, can add indicators to the Carousel, along side the previous/next controls. The indicators let users jump to a particular slide. +With the `indicators` prop, you can add indicators to the carousel, alongside the previous/next controls. The indicators let users jump to a particular slide.apps/docs/src/data/components/spinner.data.ts (1)
25-29: Normalize default value format for consistency.Docs data elsewhere use string defaults; here
default: falseis boolean. Use'false'to keep rendering uniform and avoid edge-cases in formatters.- small: { - type: 'boolean', - default: false, // TODO item not in string format + small: { + type: 'boolean', + default: 'false', description: 'Renders a smaller spinner suitable for placement in buttons.', },apps/docs/src/data/components/card.data.ts (1)
118-131: Type mismatch:slotsusesPropRecordinstead ofSlotRecord.This can break type-checking and downstream tooling.
Apply:
- } satisfies PropRecord<keyof BCardSlots>, + } satisfies SlotRecord<keyof BCardSlots>,
🧹 Nitpick comments (19)
CONTRIBUTING.md (2)
64-64: Minor style nit: Tighten verbose phrasing.Change "In order to test the docs, first make sure that you..." to "To test the docs, first make sure that you..." for conciseness.
238-238: Minor style nit: Use more direct phrasing.Change "To do that you will need to:" to "Follow these steps:" or similar for more directness.
apps/docs/src/data/components/formFile.data.ts (1)
37-98: Consider addressing TODO comments and empty description.Several areas could be improved for documentation completeness:
- Lines 37, 43, 64, 75, 80: TODO comments about default value formatting
- Line 86: TODO about similar content pattern
- Line 98: Empty description for the
labelslotThese don't block the current changes but would enhance the documentation quality.
Would you like me to help generate descriptions for these items or open an issue to track this work?
apps/docs/src/data/components/nav.data.ts (1)
95-95: Consider removing extraneous blank lines.These blank lines likely remain from the removed
sourcePathentries. While they don't affect functionality, removing them would improve consistency.Apply this diff to clean up the formatting:
BNavForm: { styleSpec: {kind: StyleKind.Tag, value: 'li > form'}, - props: {BNavItemDropdown: { styleSpec: {kind: StyleKind.OverrideClass, value: '.nav-item.dropdown'}, - props: dropdownProps,BNavText: { styleSpec: {kind: StyleKind.OverrideClass, value: '.navbar-text'}, - props: {Also applies to: 174-174, 181-181
apps/docs/src/data/components/formTextarea.data.ts (1)
32-36: Pre-existing: modelValue type and default value are inconsistent.The
modelValueprop declares type'Numberish | null'but has a default value of'""'(empty string). An empty string is neither a number-like value nor null, which could lead to type inconsistencies.Consider updating either the type to include
stringor the default to match the declared type (e.g.,null).Note: This is pre-existing technical debt, not introduced by this PR.
apps/docs/src/data/components/formSpinbutton.data.ts (1)
34-38: Consider completing the TODO items for prop documentation.Several props have incomplete documentation metadata:
formatterFn(line 37): missing descriptionmodelValue(lines 117-119): missing description, type, and defaultWhile these TODOs pre-date this PR, completing them would improve the component reference documentation quality.
Would you like me to help generate the missing documentation for these props based on the TypeScript interface definitions?
Also applies to: 116-120
apps/docs/src/components/ComponentReference.vue (1)
272-285: Consider documenting the component ordering requirement.The
deriveBaseDirectory()function relies on the first component in the data object being the "primary" component whose name matches the directory structure. While this is documented in the comment, this implicit ordering requirement could be error-prone.Consider adding a runtime check or more explicit documentation:
const deriveBaseDirectory = (): string => { const componentNames = Object.keys(props.data) + if (componentNames.length === 0) { + throw new Error('ComponentReference data must contain at least one component') + } return componentNames[0] // First component is the base directory }This would provide clearer error messages if the data structure is unexpected.
apps/docs/src/data/components/offcanvas.data.ts (2)
123-169: Emits definitions present but some lack descriptions.Several emit descriptions contain
// TODO missing descriptioncomments (e.g., lines 128, 148, 151). While pre-existing, consider addressing these in a follow-up pass to improve documentation completeness.If you'd like, I can help generate reasonable descriptions for these missing emit fields based on the component's behavior and the context clues already present in the data.
170-235: Slot definitions present but descriptions are missing.Similar to emits, several slot descriptions are empty with
// TODO missing descriptioncomments (e.g., lines 172, 186, 200, 204, 218, 232). These should be completed to ensure comprehensive documentation.I can help fill in reasonable descriptions for these slot fields if needed.
apps/docs/src/docs/components/form-spinbutton.md (1)
1-3: Frontmatter correctly applied with minor grammar improvement.YAML frontmatter description captures the spinbutton component's primary functionality. Minor suggestion: change "adjusting" to "adjust" for grammatical correctness: "allows the user to adjust a numeric range with finite control".
Consider updating line 2 from "allows the user to adjusting" to "allows the user to adjust" for grammatical accuracy.
apps/docs/src/composables/useMarkdownRenderer.ts (2)
19-32: Harden external links: add target and rel.Add target="_blank" and rel="noopener noreferrer" for http(s) links to prevent tab-nabbing and improve UX.
md.renderer.rules.link_open = function (tokens, idx, options, env, self) { const token = tokens[idx] const hrefIndex = token.attrIndex('href') if (hrefIndex >= 0) { const href = token.attrs![hrefIndex][1] - // Only add base to internal links (starting with /) + // Only add base to internal links (starting with /) if (href.startsWith('/') && !href.startsWith('//')) { token.attrs![hrefIndex][1] = withBase(href) + } else if (/^https?:\/\//i.test(href)) { + // External links: open in new tab with safe rel + if (token.attrIndex('target') < 0) token.attrPush(['target', '_blank']) + const relIdx = token.attrIndex('rel') + if (relIdx < 0) { + token.attrPush(['rel', 'noopener noreferrer']) + } else { + // Ensure both values present + const val = token.attrs![relIdx][1] + const wanted = ['noopener', 'noreferrer'] + const merged = Array.from(new Set((val || '').split(/\s+/).concat(wanted))).join(' ').trim() + token.attrs![relIdx][1] = merged + } } } return defaultRender(tokens, idx, options, env, self) }
37-45: Broaden input type to MaybeRefOrGetter for ergonomics.Accept plain Ref and getters. Use
toValueto normalize.-import {computed, type ComputedRef} from 'vue' +import {computed, toValue, type ComputedRef, type MaybeRefOrGetter} from 'vue' @@ -export function useMarkdownRenderer(text: ComputedRef<string> | string): ComputedRef<string> { - const textRef = typeof text === 'string' ? computed(() => text) : text +export function useMarkdownRenderer(text: MaybeRefOrGetter<string>): ComputedRef<string> { + const textRef = computed(() => toValue<string>(text))apps/docs/.vitepress/plugins/auto-inject-header.ts (2)
84-96: Ensure PageHeader is injected even when an H1 already exists.Currently, if an H1 is present but
<PageHeader />is missing, nothing is injected. Add a separate check to always inject<PageHeader />when absent.- // Build the expected header pattern - const expectedHeader = `# ${title}\n\n<PageHeader />` + // Build the expected header pattern + const expectedHeader = `# ${title}\n\n<PageHeader />` @@ - // Inject header if it doesn't already have it - if (!afterFrontmatter.startsWith(`# ${title}`)) { - afterFrontmatter = `${expectedHeader}\n\n${afterFrontmatter}` - } + // Inject H1 and/or PageHeader as needed + const escapeRegex = (s: string) => s.replace(/[.*+?^${}()|[\]\\]/g, '\\$&') + const h1Re = new RegExp(`^#\\s+${escapeRegex(title)}\\s*\\n+`) + const hasH1 = h1Re.test(afterFrontmatter) + const hasPageHeader = /<PageHeader\s*\/>/.test(afterFrontmatter) + if (!hasH1) { + // add both + afterFrontmatter = `${expectedHeader}\n\n${afterFrontmatter}` + } else if (!hasPageHeader) { + // insert PageHeader right after the H1 + afterFrontmatter = afterFrontmatter.replace(h1Re, (m) => `${m}\n<PageHeader />\n\n`) + }
97-109: Make footer detection more robust (whitespace, attributes, quoting).Loosen the regexes to avoid false negatives and support both single/double quotes.
- const componentReferencePattern = /<ComponentReference :data="data" \/>/ - const scriptPattern = - /<script setup lang="ts">\s*import\s*\{\s*data\s*\}\s*from\s*'\.\.\/\.\.\/data\/components\// + const componentReferencePattern = /<ComponentReference\b[^>]*:\s*data\s*=\s*"data"[^>]*\/>/m + const scriptPattern = + /<script\s+setup(?:\s+lang="ts")?\s*>\s*import\s*\{\s*data\s*\}\s*from\s*['"]\.\.\/\.\.\/data\/components\//m @@ - const footer = `\n\n<ComponentReference :data="data" />\n\n<script setup lang="ts">\nimport {data} from '../../data/components/${dataFilename}.data'\n</script>` + const footer = `\n\n<ComponentReference :data="data" />\n\n<script setup lang="ts">\nimport { data } from '../../data/components/${dataFilename}.data'\n</script>`apps/docs/.vitepress/plugins/auto-inject-doc-components.ts (2)
96-105: Relax detection regexes to avoid false negatives.Allow extra props/whitespace, different quote styles, and presence of setup/lang attributes in any order.
- const componentReferencePattern = /<ComponentReference :data="data" \/>/ - const scriptPattern = - /<script setup lang="ts">\s*import\s*\{\s*data\s*\}\s*from\s*'\.\.\/\.\.\/data\/components\// + const componentReferencePattern = /<ComponentReference\b[^>]*:data="data"[^>]*\/>/ + const scriptPattern = + /<script\b[^>]*setup[^>]*>[\s\S]*?import\s*\{\s*data\s*\}\s*from\s*['"]\.\.\/\.\.\/data\/components\//
81-86: Optionally prefer frontmatter.title when present.If a page sets title explicitly, use it over filename derivation to support edge cases.
- const [, directory, filename] = match - const title = filenameToTitle(filename, directory) + const [, directory, filename] = match + const title = (frontmatter as any)?.title + ? String((frontmatter as any).title) + : filenameToTitle(filename, directory)apps/docs/src/data/directives.data.ts (1)
4-8: Consistent naming nit (optional).To mirror ComposableData and Components data files, consider renaming the alias to DirectiveData for symmetry. No behavior change.
apps/docs/src/data/components/card.data.ts (1)
111-114: Minor docs consistency nits (optional).Defaults for booleans are raw
falsewhile strings use quoted form likedefault: "''". Consider normalizing defaults display, and remove “NYI?” comments from public docs strings.Also applies to: 148-151, 199-207
apps/docs/src/components/TableOfContentsNav.vue (1)
49-52: Remove unused props.
defineProps<{ name?: string; route?: string }>()is unused.Apply:
-defineProps<{ - name?: string - route?: string -}>() +// props removed (unused)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (107)
.markdownlint.json(1 hunks)CONTRIBUTING.md(2 hunks)apps/docs/.vitepress/config.mts(2 hunks)apps/docs/.vitepress/plugins/auto-inject-doc-components.ts(1 hunks)apps/docs/.vitepress/plugins/auto-inject-header.ts(1 hunks)apps/docs/eslint.config.mjs(2 hunks)apps/docs/package.json(2 hunks)apps/docs/src/components/ComponentReference.vue(3 hunks)apps/docs/src/components/PageHeader.vue(2 hunks)apps/docs/src/components/TableOfContentsCard.vue(1 hunks)apps/docs/src/components/TableOfContentsNav.vue(4 hunks)apps/docs/src/composables/useMarkdownRenderer.ts(1 hunks)apps/docs/src/data/components.data.ts(1 hunks)apps/docs/src/data/components/FormRating.data.ts(0 hunks)apps/docs/src/data/components/accordion.data.ts(0 hunks)apps/docs/src/data/components/alert.data.ts(0 hunks)apps/docs/src/data/components/app.data.ts(0 hunks)apps/docs/src/data/components/avatar.data.ts(2 hunks)apps/docs/src/data/components/badge.data.ts(0 hunks)apps/docs/src/data/components/breadcrumb.data.ts(0 hunks)apps/docs/src/data/components/button.data.ts(2 hunks)apps/docs/src/data/components/buttonGroup.data.ts(1 hunks)apps/docs/src/data/components/buttonToolbar.data.ts(1 hunks)apps/docs/src/data/components/card.data.ts(2 hunks)apps/docs/src/data/components/carousel.data.ts(1 hunks)apps/docs/src/data/components/collapse.data.ts(0 hunks)apps/docs/src/data/components/dropdown.data.ts(0 hunks)apps/docs/src/data/components/form.data.ts(6 hunks)apps/docs/src/data/components/formCheckbox.data.ts(0 hunks)apps/docs/src/data/components/formFile.data.ts(1 hunks)apps/docs/src/data/components/formGroup.data.ts(0 hunks)apps/docs/src/data/components/formInput.data.ts(0 hunks)apps/docs/src/data/components/formRadio.data.ts(3 hunks)apps/docs/src/data/components/formSelect.data.ts(5 hunks)apps/docs/src/data/components/formSpinbutton.data.ts(1 hunks)apps/docs/src/data/components/formTags.data.ts(2 hunks)apps/docs/src/data/components/formTextarea.data.ts(1 hunks)apps/docs/src/data/components/gridSystem.data.ts(2 hunks)apps/docs/src/data/components/image.data.ts(1 hunks)apps/docs/src/data/components/inputGroup.data.ts(0 hunks)apps/docs/src/data/components/link.data.ts(1 hunks)apps/docs/src/data/components/listGroup.data.ts(1 hunks)apps/docs/src/data/components/modal.data.ts(0 hunks)apps/docs/src/data/components/nav.data.ts(2 hunks)apps/docs/src/data/components/navbar.data.ts(0 hunks)apps/docs/src/data/components/offcanvas.data.ts(1 hunks)apps/docs/src/data/components/orchestrator.data.ts(1 hunks)apps/docs/src/data/components/overlay.data.ts(1 hunks)apps/docs/src/data/components/pagination.data.ts(0 hunks)apps/docs/src/data/components/placeholder.data.ts(4 hunks)apps/docs/src/data/components/popover.data.ts(1 hunks)apps/docs/src/data/components/progress.data.ts(0 hunks)apps/docs/src/data/components/spinner.data.ts(1 hunks)apps/docs/src/data/components/table.data.ts(6 hunks)apps/docs/src/data/components/tabs.data.ts(1 hunks)apps/docs/src/data/components/toast.data.ts(0 hunks)apps/docs/src/data/components/tooltip.data.ts(1 hunks)apps/docs/src/data/composables.data.ts(1 hunks)apps/docs/src/data/configurations.data.ts(1 hunks)apps/docs/src/data/directives.data.ts(1 hunks)apps/docs/src/docs/components.md(1 hunks)apps/docs/src/docs/components/accordion.md(1 hunks)apps/docs/src/docs/components/alert.md(1 hunks)apps/docs/src/docs/components/app.md(1 hunks)apps/docs/src/docs/components/avatar.md(1 hunks)apps/docs/src/docs/components/badge.md(1 hunks)apps/docs/src/docs/components/breadcrumb.md(1 hunks)apps/docs/src/docs/components/button-group.md(1 hunks)apps/docs/src/docs/components/button-toolbar.md(1 hunks)apps/docs/src/docs/components/button.md(1 hunks)apps/docs/src/docs/components/card.md(1 hunks)apps/docs/src/docs/components/carousel.md(1 hunks)apps/docs/src/docs/components/collapse.md(1 hunks)apps/docs/src/docs/components/dropdown.md(1 hunks)apps/docs/src/docs/components/form-checkbox.md(1 hunks)apps/docs/src/docs/components/form-file.md(1 hunks)apps/docs/src/docs/components/form-group.md(1 hunks)apps/docs/src/docs/components/form-input.md(1 hunks)apps/docs/src/docs/components/form-radio.md(1 hunks)apps/docs/src/docs/components/form-rating.md(2 hunks)apps/docs/src/docs/components/form-select.md(1 hunks)apps/docs/src/docs/components/form-spinbutton.md(1 hunks)apps/docs/src/docs/components/form-tags.md(1 hunks)apps/docs/src/docs/components/form-textarea.md(1 hunks)apps/docs/src/docs/components/form.md(1 hunks)apps/docs/src/docs/components/grid-system.md(1 hunks)apps/docs/src/docs/components/image.md(1 hunks)apps/docs/src/docs/components/input-group.md(1 hunks)apps/docs/src/docs/components/link.md(1 hunks)apps/docs/src/docs/components/list-group.md(1 hunks)apps/docs/src/docs/components/modal.md(1 hunks)apps/docs/src/docs/components/nav.md(1 hunks)apps/docs/src/docs/components/navbar.md(1 hunks)apps/docs/src/docs/components/offcanvas.md(1 hunks)apps/docs/src/docs/components/orchestrator.md(1 hunks)apps/docs/src/docs/components/overlay.md(1 hunks)apps/docs/src/docs/components/pagination.md(1 hunks)apps/docs/src/docs/components/placeholder.md(1 hunks)apps/docs/src/docs/components/popover.md(1 hunks)apps/docs/src/docs/components/progress.md(1 hunks)apps/docs/src/docs/components/spinner.md(2 hunks)apps/docs/src/docs/components/table.md(2 hunks)apps/docs/src/docs/components/tabs.md(2 hunks)apps/docs/src/docs/components/toast.md(1 hunks)apps/docs/src/docs/components/tooltip.md(1 hunks)apps/docs/src/docs/composables.md(1 hunks)apps/docs/src/docs/composables/ComposableHeader.vue(0 hunks)
⛔ Files not processed due to max files limit (20)
- apps/docs/src/docs/composables/useBreadcrumb.md
- apps/docs/src/docs/composables/useColorMode.md
- apps/docs/src/docs/composables/useModal.md
- apps/docs/src/docs/composables/usePopover.md
- apps/docs/src/docs/composables/useScrollspy.md
- apps/docs/src/docs/composables/useToast.md
- apps/docs/src/docs/composables/useToggle.md
- apps/docs/src/docs/configurations.md
- apps/docs/src/docs/configurations/customizing-styles.md
- apps/docs/src/docs/configurations/global-options.md
- apps/docs/src/docs/directives.md
- apps/docs/src/docs/directives/BColorMode.md
- apps/docs/src/docs/directives/BModal.md
- apps/docs/src/docs/directives/BPopover.md
- apps/docs/src/docs/directives/BToggle.md
- apps/docs/src/docs/directives/BTooltip.md
- apps/docs/src/docs/directives/DirectiveHeader.vue
- apps/docs/src/docs/reference/accessibility.md
- apps/docs/src/types/index.ts
- apps/docs/src/utils/dataLoaderUtils.ts
💤 Files with no reviewable changes (18)
- apps/docs/src/data/components/formGroup.data.ts
- apps/docs/src/data/components/badge.data.ts
- apps/docs/src/data/components/app.data.ts
- apps/docs/src/data/components/alert.data.ts
- apps/docs/src/data/components/collapse.data.ts
- apps/docs/src/data/components/progress.data.ts
- apps/docs/src/data/components/navbar.data.ts
- apps/docs/src/data/components/FormRating.data.ts
- apps/docs/src/docs/composables/ComposableHeader.vue
- apps/docs/src/data/components/toast.data.ts
- apps/docs/src/data/components/pagination.data.ts
- apps/docs/src/data/components/formCheckbox.data.ts
- apps/docs/src/data/components/breadcrumb.data.ts
- apps/docs/src/data/components/inputGroup.data.ts
- apps/docs/src/data/components/formInput.data.ts
- apps/docs/src/data/components/accordion.data.ts
- apps/docs/src/data/components/dropdown.data.ts
- apps/docs/src/data/components/modal.data.ts
🧰 Additional context used
📓 Path-based instructions (1)
apps/docs/src/data/components/*.data.ts
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
apps/docs/src/data/components/*.data.ts: When adding or modifying component props, events, or slots, ALWAYS update the corresponding .data.ts file in apps/docs/src/data/components/
Documentation format in .data.ts files must match TypeScript interfaces exactly (props, emits, slots definitions)
Files:
apps/docs/src/data/components/button.data.tsapps/docs/src/data/components/overlay.data.tsapps/docs/src/data/components/popover.data.tsapps/docs/src/data/components/nav.data.tsapps/docs/src/data/components/listGroup.data.tsapps/docs/src/data/components/image.data.tsapps/docs/src/data/components/gridSystem.data.tsapps/docs/src/data/components/formTextarea.data.tsapps/docs/src/data/components/buttonGroup.data.tsapps/docs/src/data/components/formSpinbutton.data.tsapps/docs/src/data/components/offcanvas.data.tsapps/docs/src/data/components/avatar.data.tsapps/docs/src/data/components/tooltip.data.tsapps/docs/src/data/components/carousel.data.tsapps/docs/src/data/components/table.data.tsapps/docs/src/data/components/formSelect.data.tsapps/docs/src/data/components/orchestrator.data.tsapps/docs/src/data/components/link.data.tsapps/docs/src/data/components/formFile.data.tsapps/docs/src/data/components/buttonToolbar.data.tsapps/docs/src/data/components/tabs.data.tsapps/docs/src/data/components/form.data.tsapps/docs/src/data/components/formTags.data.tsapps/docs/src/data/components/card.data.tsapps/docs/src/data/components/spinner.data.tsapps/docs/src/data/components/formRadio.data.tsapps/docs/src/data/components/placeholder.data.ts
🧠 Learnings (11)
📚 Learning: 2025-09-30T23:57:21.526Z
Learnt from: dwgray
PR: bootstrap-vue-next/bootstrap-vue-next#2866
File: apps/docs/src/docs/components/demo/ModalModel.vue:11-15
Timestamp: 2025-09-30T23:57:21.526Z
Learning: The bootstrap-vue-next documentation project uses unplugin-vue-components to automatically resolve and import Vue components like BModal, BButton, etc. Explicit imports for these components in script sections are not required.
Applied to files:
apps/docs/src/docs/components/app.mdapps/docs/.vitepress/config.mtsCONTRIBUTING.md
📚 Learning: 2025-09-12T14:46:49.416Z
Learnt from: CR
PR: bootstrap-vue-next/bootstrap-vue-next#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-09-12T14:46:49.416Z
Learning: Applies to packages/bootstrap-vue-next/src/App.vue : Use packages/bootstrap-vue-next/src/App.vue as a local test area for component changes
Applied to files:
apps/docs/src/docs/components/app.md
📚 Learning: 2025-08-19T23:30:52.911Z
Learnt from: dwgray
PR: bootstrap-vue-next/bootstrap-vue-next#2762
File: apps/docs/src/docs/components/tooltip.md:0-0
Timestamp: 2025-08-19T23:30:52.911Z
Learning: VitePress .data.ts files use build-time data loading where the file exports a default object with a load() function, and VitePress processes this at build time to make the loaded data available as a named export {data}. The correct import syntax is `import {data} from './file.data'`, not a default import, even though the .data.ts file itself uses export default.
Applied to files:
apps/docs/src/data/directives.data.tsapps/docs/src/data/components.data.ts
📚 Learning: 2025-09-12T14:46:49.416Z
Learnt from: CR
PR: bootstrap-vue-next/bootstrap-vue-next#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-09-12T14:46:49.416Z
Learning: Applies to apps/docs/src/data/components/*.data.ts : When adding or modifying component props, events, or slots, ALWAYS update the corresponding .data.ts file in apps/docs/src/data/components/
Applied to files:
apps/docs/src/data/components.data.ts
📚 Learning: 2025-08-19T23:25:20.688Z
Learnt from: dwgray
PR: bootstrap-vue-next/bootstrap-vue-next#2762
File: apps/docs/src/docs/components/popover.md:141-143
Timestamp: 2025-08-19T23:25:20.688Z
Learning: In VitePress projects, .data.ts files use build-time data loading where the file exports a `load()` function, and VitePress makes the loaded data available as a named export `{data}`. The correct import syntax is `import {data} from './file.data'`, not a default import.
Applied to files:
apps/docs/src/data/components.data.ts
📚 Learning: 2025-08-19T23:30:07.062Z
Learnt from: dwgray
PR: bootstrap-vue-next/bootstrap-vue-next#2762
File: apps/docs/src/docs/components/tooltip.md:90-94
Timestamp: 2025-08-19T23:30:07.062Z
Learning: In bootstrap-vue-next docs, tooltip.data.ts uses popoverSharedProps('popover') to define props, which includes the 'manual' prop through the shared props structure from popover-shared.ts. The manual prop is available in BTooltip documentation through this prop spreading/inheritance mechanism.
Applied to files:
apps/docs/src/data/components/tooltip.data.tsapps/docs/src/docs/components/tooltip.mdapps/docs/src/docs/components/popover.md
📚 Learning: 2025-08-19T23:30:07.062Z
Learnt from: dwgray
PR: bootstrap-vue-next/bootstrap-vue-next#2762
File: apps/docs/src/docs/components/tooltip.md:90-94
Timestamp: 2025-08-19T23:30:07.062Z
Learning: In bootstrap-vue-next docs, tooltip.data.ts uses popoverSharedProps('tooltip') to define props, which includes the 'manual' prop through the shared props structure from popover-shared.ts. The manual prop is available in BTooltip documentation through this inheritance mechanism.
Applied to files:
apps/docs/src/data/components/tooltip.data.tsapps/docs/src/docs/components/tooltip.md
📚 Learning: 2025-06-26T19:46:19.333Z
Learnt from: dwgray
PR: bootstrap-vue-next/bootstrap-vue-next#2762
File: apps/docs/src/docs/components/tooltip.md:0-0
Timestamp: 2025-06-26T19:46:19.333Z
Learning: BTooltip is a very thin wrapper around BPopover in bootstrap-vue-next. There is no separate `useTooltipController` composable - the `usePopoverController` composable can be used to programmatically control both popovers and tooltips.
Applied to files:
apps/docs/src/data/components/tooltip.data.tsapps/docs/src/docs/components/tooltip.mdapps/docs/src/docs/components/popover.md
📚 Learning: 2025-10-21T19:31:54.084Z
Learnt from: dwgray
PR: bootstrap-vue-next/bootstrap-vue-next#2882
File: apps/docs/src/docs/components/demo/PlaceholderWidth.vue:1-22
Timestamp: 2025-10-21T19:31:54.084Z
Learning: The bootstrap-vue-next project uses unplugin to automatically import components, so explicit imports in demo/documentation components are not needed.
Applied to files:
apps/docs/.vitepress/config.mts
📚 Learning: 2025-09-12T14:46:49.416Z
Learnt from: CR
PR: bootstrap-vue-next/bootstrap-vue-next#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-09-12T14:46:49.416Z
Learning: Applies to packages/bootstrap-vue-next/src/components/index.ts : When adding a new component, update packages/bootstrap-vue-next/src/components/index.ts to export it
Applied to files:
CONTRIBUTING.md
📚 Learning: 2025-08-20T14:05:32.416Z
Learnt from: xvaara
PR: bootstrap-vue-next/bootstrap-vue-next#2732
File: packages/bootstrap-vue-next/src/components/BApp/BOrchestrator.vue:28-28
Timestamp: 2025-08-20T14:05:32.416Z
Learning: Vue 3 supports TypeScript annotations in template binding expressions when using `<script setup lang="ts">` or `<script lang="ts">`. Template ref callbacks like `:ref="(ref: ComponentPublicInstance) => ..."` are valid TypeScript syntax in Vue templates when TypeScript is enabled in the script block.
Applied to files:
apps/docs/src/docs/components/tooltip.md
🧬 Code graph analysis (8)
apps/docs/src/data/components/nav.data.ts (1)
apps/docs/src/utils/dropdownCommon.ts (3)
dropdownProps(7-156)dropdownEmits(158-172)dropdownSlots(174-195)
apps/docs/src/data/directives.data.ts (1)
apps/docs/src/utils/dataLoaderUtils.ts (2)
DocItem(5-9)transformDocData(53-84)
apps/docs/src/data/components.data.ts (1)
apps/docs/src/utils/dataLoaderUtils.ts (2)
DocItem(5-9)transformDocData(53-84)
apps/docs/src/data/components/tooltip.data.ts (5)
apps/docs/src/utils/popover-shared.ts (2)
popoverSharedProps(7-15)popoverSharedEmits(172-195)apps/docs/src/types/index.ts (2)
PropRecord(17-17)EmitRecord(30-30)packages/bootstrap-vue-next/src/types/ComponentProps.ts (1)
BTooltipProps(1370-1372)packages/bootstrap-vue-next/src/types/ComponentEmits.ts (1)
BTooltipEmits(153-153)apps/docs/src/utils/showHideData.ts (1)
showHideSlotsData(144-170)
apps/docs/.vitepress/config.mts (1)
apps/docs/.vitepress/plugins/auto-inject-doc-components.ts (1)
autoInjectDocComponents(46-130)
apps/docs/src/data/composables.data.ts (1)
apps/docs/src/utils/dataLoaderUtils.ts (2)
DocItem(5-9)transformDocData(53-84)
apps/docs/src/data/configurations.data.ts (1)
apps/docs/src/utils/dataLoaderUtils.ts (2)
DocItem(5-9)transformDocData(53-84)
apps/docs/src/data/components/tabs.data.ts (5)
packages/bootstrap-vue-next/src/utils/object.ts (1)
pick(20-33)apps/docs/src/utils/showHideData.ts (1)
showHideProps(95-142)apps/docs/src/utils/commonProps.ts (1)
buildCommonProps(511-529)apps/docs/src/types/index.ts (1)
PropRecord(17-17)packages/bootstrap-vue-next/src/types/ComponentProps.ts (1)
BTabProps(779-792)
🪛 LanguageTool
CONTRIBUTING.md
[style] ~64-~64: Consider a more concise word here.
Context: ...ntation in the ./apps/docs directory. In order to test the docs, first make sure that you...
(IN_ORDER_TO_PREMIUM)
[style] ~238-~238: Consider a more expressive alternative.
Context: ... and usable by users of the library. To do that you will need to: 1. Add the comp...
(DO_ACHIEVE)
🪛 markdownlint-cli2 (0.18.1)
CONTRIBUTING.md
79-79: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
88-88: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
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
♻️ Duplicate comments (5)
apps/docs/.vitepress/plugins/auto-inject-doc-components.ts (3)
53-56: Nice: cross‑platform path normalization.Backslash→slash normalization avoids Windows misses in the path regex. LGTM.
90-94: Optional: inject even if an H1 already exists.Current logic skips injection when the doc already starts with
# ${title}. If you ever have H1 without<PageHeader />, consider inserting<PageHeader />after the first H1.- // Inject header if it doesn't already have it - if (!afterFrontmatter.startsWith(`# ${title}`)) { - afterFrontmatter = `${expectedHeader}\n\n${afterFrontmatter}` - } + const hasH1 = afterFrontmatter.startsWith(`# ${title}`) + const hasPageHeader = /<PageHeader\b/.test(afterFrontmatter) + if (!hasH1) { + afterFrontmatter = `${expectedHeader}\n\n${afterFrontmatter}` + } else if (!hasPageHeader) { + afterFrontmatter = afterFrontmatter.replace( + /^#\s+[^\n]+\n?/, + (m) => `${m}\n<PageHeader />\n\n` + ) + }#!/bin/bash # Find markdown files with frontmatter description that start with H1 but lack <PageHeader /> rg -nUP '(?s)^---\r?\n.*\bdescription\s*:\s*.+?\r?\n---\r?\n\s*#\s+[^\n]+\n(?!\s*<PageHeader\b)' \ --glob 'apps/docs/src/docs/**/{components,composables,directives,configurations}/*.md'
109-118: Good: footer inserted before the first <style> anywhere.Robust placement; addresses trailing/inline style blocks.
apps/docs/src/components/PageHeader.vue (1)
54-56: Deduplicate helpers.
toCamelCaseexists in multiple places; consider moving todataLoaderUtilsand reusing.apps/docs/src/docs/directives/BModal.md (1)
1-3: Polish the description grammar.“…through directive” → “…through a directive” (or “…using a directive”).
-description: 'Similar to the BToggle directive, the BModal directive is used to trigger the state of a modal through directive' +description: 'Similar to the BToggle directive, the BModal directive is used to trigger the state of a modal through a directive'
🧹 Nitpick comments (11)
CONTRIBUTING.md (2)
64-64: Minor style: simplify "in order to".Line 64 uses "in order to test," which can be more concise. Consider "To test the docs" instead.
238-238: Minor style: make phrasing more direct.Line 238 uses "To do that you will need to," which could be more expressive. Consider "To register the component for export, you will need to:" or similar.
apps/docs/src/components/TableOfContentsNav.vue (1)
111-137: Consider extracting the mapping logic to reduce duplication.All four computed lists use identical mapping logic. A shared helper would eliminate repetition:
const createRouteList = (data: Array<{name: string; url: string}>) => computed(() => data.map((item) => ({ name: item.name, route: item.url })))Then:
-const componentsComputedList = computed(() => - componentsData.map((component) => ({ - name: component.name, - route: component.url, - })) -) +const componentsComputedList = createRouteList(componentsData)apps/docs/src/composables/useMarkdownRenderer.ts (1)
19-29: Harden href handling just a bit.Very close; coerce before
startsWithto avoid edge cases if a plugin ever emits an undefined value.- if (hrefIndex >= 0 && token.attrs) { - const [, href] = token.attrs[hrefIndex] + if (hrefIndex >= 0 && token.attrs) { + const href = token.attrs[hrefIndex][1] ?? '' // Only add base to internal links (starting with /) - if (href.startsWith('/') && !href.startsWith('//')) { + if (href && href.startsWith('/') && !href.startsWith('//')) { token.attrs[hrefIndex][1] = withBase(href) } }apps/docs/.vitepress/plugins/auto-inject-doc-components.ts (2)
95-120: Make footer detection more tolerant to avoid false negatives and dupes.Regexes are very strict (exact spacing, single quotes). Widen them to handle common variations.
- const componentReferencePattern = /<ComponentReference :data="data" \/>/ - const scriptPattern = - /<script setup lang="ts">\s*import\s*\{\s*data\s*\}\s*from\s*'\.\.\/\.\.\/data\/components\// + const componentReferencePattern = /<ComponentReference\b[^>]*\b:data\s*=\s*["']data["'][^>]*\/>/ + const scriptPattern = + /<script\s+setup\b[^>]*>\s*import\s*\{\s*data\s*\}\s*from\s*["']\.\.\/\.\.\/data\/components\//
29-31: Consider centralizing case helpers to utils.
filenameToCamelCaseduplicates logic also present in PageHeader; moving todataLoaderUtilsavoids drift.apps/docs/src/components/PageHeader.vue (3)
93-95: Normalize separators before filename split (defensive).VitePress usually uses POSIX paths, but normalize to be safe.
- const segments = page.value.relativePath.split('/') + const rel = page.value.relativePath.replace(/\\/g, '/') + const segments = rel.split('/')
125-126: Return a boolean from showButtons.Current expression can be a string; coerce to boolean for clearer typing.
-const showButtons = computed(() => props.withPageHeader && (editHref.value || sourceHref.value)) +const showButtons = computed(() => !!(props.withPageHeader && (editHref.value || sourceHref.value)))
6-7: Tiny template nit.Prefer non‑self‑closing
<p>for HTML validity.- <slot><p v-html="renderedDescription" /></slot> + <slot><p v-html="renderedDescription"></p></slot>apps/docs/src/docs/directives/BPopover.md (1)
1-3: Optional punctuation tweak.Drop the comma after “site” for smoother reading.
-description: 'Add popovers to any element on your site, using Bootstrap v5 CSS for styling and animations' +description: 'Add popovers to any element on your site using Bootstrap v5 CSS for styling and animations'apps/docs/src/docs/directives/BToggle.md (1)
1-3: Frontmatter properly implements the data-driven documentation model.The YAML frontmatter correctly replaces manual headers and components with descriptive metadata, aligning with the PR's shift to frontmatter-driven documentation. The description accurately captures the directive's purpose and accessibility handling.
Minor suggestion: consider updating
light-weighttolightweight(modern single-word usage) for consistency.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (8)
CONTRIBUTING.md(2 hunks)apps/docs/.vitepress/plugins/auto-inject-doc-components.ts(1 hunks)apps/docs/src/components/PageHeader.vue(2 hunks)apps/docs/src/components/TableOfContentsNav.vue(5 hunks)apps/docs/src/composables/useMarkdownRenderer.ts(1 hunks)apps/docs/src/docs/directives/BModal.md(1 hunks)apps/docs/src/docs/directives/BPopover.md(1 hunks)apps/docs/src/docs/directives/BToggle.md(1 hunks)
🧰 Additional context used
🧠 Learnings (3)
📚 Learning: 2025-09-12T14:46:49.416Z
Learnt from: CR
PR: bootstrap-vue-next/bootstrap-vue-next#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-09-12T14:46:49.416Z
Learning: Applies to packages/bootstrap-vue-next/src/components/index.ts : When adding a new component, update packages/bootstrap-vue-next/src/components/index.ts to export it
Applied to files:
CONTRIBUTING.md
📚 Learning: 2025-08-19T23:30:07.062Z
Learnt from: dwgray
PR: bootstrap-vue-next/bootstrap-vue-next#2762
File: apps/docs/src/docs/components/tooltip.md:90-94
Timestamp: 2025-08-19T23:30:07.062Z
Learning: In bootstrap-vue-next docs, tooltip.data.ts uses popoverSharedProps('popover') to define props, which includes the 'manual' prop through the shared props structure from popover-shared.ts. The manual prop is available in BTooltip documentation through this prop spreading/inheritance mechanism.
Applied to files:
apps/docs/src/docs/directives/BPopover.md
📚 Learning: 2025-08-19T23:30:07.062Z
Learnt from: dwgray
PR: bootstrap-vue-next/bootstrap-vue-next#2762
File: apps/docs/src/docs/components/tooltip.md:90-94
Timestamp: 2025-08-19T23:30:07.062Z
Learning: In bootstrap-vue-next docs, tooltip.data.ts uses popoverSharedProps('tooltip') to define props, which includes the 'manual' prop through the shared props structure from popover-shared.ts. The manual prop is available in BTooltip documentation through this inheritance mechanism.
Applied to files:
apps/docs/src/docs/directives/BPopover.md
🧬 Code graph analysis (1)
apps/docs/.vitepress/plugins/auto-inject-doc-components.ts (1)
apps/docs/src/utils/dataLoaderUtils.ts (1)
kebabToTitleCase(25-30)
🪛 LanguageTool
CONTRIBUTING.md
[style] ~64-~64: Consider a more concise word here.
Context: ...ntation in the ./apps/docs directory. In order to test the docs, first make sure that you...
(IN_ORDER_TO_PREMIUM)
[style] ~238-~238: Consider a more expressive alternative.
Context: ... and usable by users of the library. To do that you will need to: 1. Add the comp...
(DO_ACHIEVE)
apps/docs/src/docs/directives/BPopover.md
[grammar] ~1-~1: Hier könnte ein Fehler sein.
Context: --- description: 'Add popovers to any element on your site, using Bootstrap v5 CSS for styling and animations' ---
(QB_NEW_DE)
apps/docs/src/docs/directives/BModal.md
[grammar] ~1-~1: Hier könnte ein Fehler sein.
Context: --- description: 'Similar to the BToggle directive, the BModal directive is used to trigger the state of a modal through directive' ---
(QB_NEW_DE)
apps/docs/src/docs/directives/BToggle.md
[grammar] ~1-~1: Hier könnte ein Fehler sein.
Context: --- description: 'A light-weight directive for toggling visibility state for collapses and sidebars by ID. It automatically handles the accessibility attributes on the trigger element' ---
(QB_NEW_DE)
🔇 Additional comments (8)
CONTRIBUTING.md (3)
79-79: YAML code block language identifiers: fixed.Both fenced code blocks now correctly include the
yamllanguage identifier.Also applies to: 88-88
110-178: Well-structured component data file conventions.The section clearly outlines component ordering, special cases, and TypeScript slot types. Examples of ✅ and ❌ patterns provide actionable guidance.
307-342: Clarify incomplete template text at line 331.The markdown template example at line 331 shows "if appropriate" in isolation, which is incomplete. This should either be:
- "Include a complete example if appropriate" (as instructional text)
- Or removed entirely if not intended
Currently, it's ambiguous and could confuse contributors about what to include in their markdown files.
Clarify the intent and complete the template guidance.
apps/docs/src/components/TableOfContentsNav.vue (1)
60-65: Active state checking correctly fixed.The
isRouteActivehelper properly normalizes routes withwithBaseand checks both the exact path and.html-suffixed variant, resolving the issue flagged in the previous review.apps/docs/src/composables/useMarkdownRenderer.ts (2)
6-10: Good defaults for security.Disabling HTML with
html: falseplus inline rendering is a solid baseline for safev-html.
37-45: API shape looks good.Accepts
string | ComputedRef<string>, normalizes toComputedRef, and returns inline HTML; LGTM.apps/docs/src/components/PageHeader.vue (2)
76-86: Do we need “configurations” support here too?Plugin targets configurations as well. If a “View Source” link is desired for them, extend
inferredBase(and AppInfo) accordingly; if not, ignore.
115-123: Review comment is incorrect; sourcePath is not a frontmatter concept.The codebase uses
sourcePathin component metadata (types and data files), not in markdown frontmatter. PageHeader.vue operates on markdown frontmatter, which only contains adescriptionfield. The current implementation already supports overrides viafrontmatter.value?.path ?? derivedPath.value—no changes needed.Likely an incorrect or invalid review comment.
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
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
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
apps/docs/.vitepress/plugins/auto-inject-doc-components.ts(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
apps/docs/.vitepress/plugins/auto-inject-doc-components.ts (1)
apps/docs/src/utils/dataLoaderUtils.ts (1)
kebabToTitleCase(25-30)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: build
🔇 Additional comments (4)
apps/docs/.vitepress/plugins/auto-inject-doc-components.ts (4)
1-31: LGTM! Clean helper functions with proper code reuse.The helpers correctly reuse the shared
kebabToTitleCaseutility and provide clear transformations for title generation and data file naming.
47-79: LGTM! Robust path handling and frontmatter parsing.The path normalization ensures cross-platform compatibility, and the defensive frontmatter parsing with try-catch properly handles edge cases.
81-93: LGTM! Header injection follows approved design.The header injection correctly generates the title and injects the expected header pattern when not present.
109-118: No issues found. Edge case does not occur in practice.Verification confirms the implementation is correct. The codebase contains only properly-formatted markdown with code blocks using triple-backtick syntax (e.g.,
```scss). The regex/<style[^>]*>/correctly matches only actual HTML<style>tags, not markdown syntax. All 2 style tags found (grid-system.md and color-variants.md) are legitimate component styles in proper positions. The theoretical edge case of style tags in code examples is not present in the codebase—developers use proper markdown formatting.
commit: |
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
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
apps/docs/src/docs/reference/router-links.md (1)
151-179: Address contradictory implementation status and fix grammar in Nuxt.js router link props section.The review comment is accurate. The file contains a genuine contradiction: line 153 has the
<NotYetImplemented/>component, yet lines 155-179 provide detailed implementation documentation forprefetchandno-prefetchprops. Additionally, line 151 uses "Nuxt.js specific" which should be "Nuxt.js-specific" (hyphenated compound adjective).Resolve by choosing one of these options:
- If Nuxt.js support is implemented: Remove
<NotYetImplemented/>and keep the detailed documentation.- If Nuxt.js support is not yet implemented: Remove the detailed documentation (lines 155-179) and rely on the component's auto-rendered message.
Also fix the grammar on line 151.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (26)
CONTRIBUTING.md(2 hunks)apps/docs/.vitepress/plugins/auto-inject-doc-components.ts(1 hunks)apps/docs/src/data/components/formRating.data.ts(0 hunks)apps/docs/src/data/reference.data.ts(1 hunks)apps/docs/src/docs/components.md(1 hunks)apps/docs/src/docs/components/table.md(5 hunks)apps/docs/src/docs/composables.md(1 hunks)apps/docs/src/docs/configurations.md(1 hunks)apps/docs/src/docs/directives.md(1 hunks)apps/docs/src/docs/icons.md(1 hunks)apps/docs/src/docs/migration-guide.md(1 hunks)apps/docs/src/docs/reference.md(1 hunks)apps/docs/src/docs/reference/accessibility.md(3 hunks)apps/docs/src/docs/reference/color-variants.md(1 hunks)apps/docs/src/docs/reference/form-validation.md(1 hunks)apps/docs/src/docs/reference/images.md(1 hunks)apps/docs/src/docs/reference/router-links.md(2 hunks)apps/docs/src/docs/reference/settings.md(1 hunks)apps/docs/src/docs/reference/size-props-and-classes.md(1 hunks)apps/docs/src/docs/reference/spacing-classes.md(1 hunks)apps/docs/src/docs/reference/starter-templates.md(1 hunks)apps/docs/src/docs/reference/theming-bootstrap.md(1 hunks)apps/docs/src/docs/reference/third-party-libraries.md(1 hunks)apps/docs/src/docs/reference/utility-classes.md(1 hunks)apps/docs/src/docs/types.md(1 hunks)apps/docs/src/index.md(1 hunks)
💤 Files with no reviewable changes (1)
- apps/docs/src/data/components/formRating.data.ts
✅ Files skipped from review due to trivial changes (3)
- apps/docs/src/docs/migration-guide.md
- apps/docs/src/docs/reference/color-variants.md
- apps/docs/src/docs/icons.md
🧰 Additional context used
🧠 Learnings (4)
📚 Learning: 2025-05-23T23:58:07.165Z
Learnt from: dwgray
PR: bootstrap-vue-next/bootstrap-vue-next#2701
File: apps/docs/src/docs/migration-guide.md:630-632
Timestamp: 2025-05-23T23:58:07.165Z
Learning: The `<NotYetImplemented/>` component in the bootstrap-vue-next documentation automatically renders text indicating "Not Yet Implemented", so additional explanatory text about features not being implemented is redundant when this component is used.
Applied to files:
apps/docs/src/docs/reference/router-links.md
📚 Learning: 2025-09-12T14:46:49.416Z
Learnt from: CR
PR: bootstrap-vue-next/bootstrap-vue-next#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-09-12T14:46:49.416Z
Learning: Applies to packages/bootstrap-vue-next/src/components/index.ts : When adding a new component, update packages/bootstrap-vue-next/src/components/index.ts to export it
Applied to files:
CONTRIBUTING.md
📚 Learning: 2025-08-19T23:30:52.911Z
Learnt from: dwgray
PR: bootstrap-vue-next/bootstrap-vue-next#2762
File: apps/docs/src/docs/components/tooltip.md:0-0
Timestamp: 2025-08-19T23:30:52.911Z
Learning: VitePress .data.ts files use build-time data loading where the file exports a default object with a load() function, and VitePress processes this at build time to make the loaded data available as a named export {data}. The correct import syntax is `import {data} from './file.data'`, not a default import, even though the .data.ts file itself uses export default.
Applied to files:
apps/docs/src/data/reference.data.ts
📚 Learning: 2025-08-19T23:25:20.688Z
Learnt from: dwgray
PR: bootstrap-vue-next/bootstrap-vue-next#2762
File: apps/docs/src/docs/components/popover.md:141-143
Timestamp: 2025-08-19T23:25:20.688Z
Learning: In VitePress projects, .data.ts files use build-time data loading where the file exports a `load()` function, and VitePress makes the loaded data available as a named export `{data}`. The correct import syntax is `import {data} from './file.data'`, not a default import.
Applied to files:
apps/docs/src/data/reference.data.ts
🧬 Code graph analysis (2)
apps/docs/.vitepress/plugins/auto-inject-doc-components.ts (1)
apps/docs/src/utils/dataLoaderUtils.ts (1)
kebabToTitleCase(25-30)
apps/docs/src/data/reference.data.ts (1)
apps/docs/src/utils/dataLoaderUtils.ts (2)
DocItem(5-9)transformDocData(53-84)
🪛 LanguageTool
apps/docs/src/docs/reference/size-props-and-classes.md
[grammar] ~1-~1: Hier könnte ein Fehler sein.
Context: --- description: > Bootstrap v5 CSS provides several classes that control the sizing of elements, of which some of these have been translated into props on components. ---
(QB_NEW_DE)
apps/docs/src/docs/reference/router-links.md
[grammar] ~155-~155: Use a hyphen to join words.
Context: ...s, plus the following additional Nuxt.js specific props. ### prefetch - type:...
(QB_NEW_EN_HYPHEN)
CONTRIBUTING.md
[style] ~64-~64: Consider a more concise word here.
Context: ...ntation in the ./apps/docs directory. In order to test the docs, first make sure that you...
(IN_ORDER_TO_PREMIUM)
[style] ~252-~252: Consider a more expressive alternative.
Context: ... and usable by users of the library. To do that you will need to: 1. Add the comp...
(DO_ACHIEVE)
apps/docs/src/docs/reference/theming-bootstrap.md
[grammar] ~1-~1: Hier könnte ein Fehler sein.
Context: --- description: > Theming is accomplished by SASS variables, SASS maps, and custom CSS. There is no dedicated theme stylesheet; instead, you can enable the built-in theme to add gradients, shadows, and more. ---
(QB_NEW_DE)
apps/docs/src/docs/reference.md
[grammar] ~1-~1: Hier könnte ein Fehler sein.
Context: --- description: BootstrapVueNext and Bootstrap reference, and additional resources documentation. --- <script setup lang="ts"> import {data} from '../data/reference.data' import TableOfContentsCard from '../components/TableOfContentsCard.vue' </script>
(QB_NEW_DE)
apps/docs/src/docs/reference/utility-classes.md
[grammar] ~1-~1: Hier könnte ein Fehler sein.
Context: --- description: > Bootstrap v5 CSS provides various utility classes to control color, spacing, flex-box, text alignment, floating, position, responsive display/hiding and much more. ---
(QB_NEW_DE)
apps/docs/src/docs/reference/settings.md
[grammar] ~1-~1: Hier könnte ein Fehler sein.
Context: --- description: BootstrapVue provides a few options for customizing component default values, and more. ---
(QB_NEW_DE)
apps/docs/src/docs/reference/starter-templates.md
[grammar] ~1-~1: Hier könnte ein Fehler sein.
Context: --- description: > There are several ways you can create your app, from basic client side HTML all the way up to using a build system and compilers. ---
(QB_NEW_DE)
apps/docs/src/docs/configurations.md
[grammar] ~1-~1: Hier könnte ein Fehler sein.
Context: --- description: BootstrapVueNext provides several configuration options that you can use to customize the behavior of your components. --- <script setup lang="ts"> import {data} from '../data/configurations.data' import TableOfContentsCard from '../components/TableOfContentsCard.vue' </script>
(QB_NEW_DE)
apps/docs/src/docs/reference/third-party-libraries.md
[grammar] ~1-~1: Hier könnte ein Fehler sein.
Context: --- description: > There are several 3rd party libraries that you can use to add additional functionality and features to your BootstrapVue project. ---
(QB_NEW_DE)
apps/docs/src/docs/components.md
[grammar] ~1-~1: Hier könnte ein Fehler sein.
Context: --- description: BootstrapVueNext components list. --- <script setup lang="ts"> import {data} from '../data/components.data' import TableOfContentsCard from '../components/TableOfContentsCard.vue' </script>
(QB_NEW_DE)
apps/docs/src/docs/composables.md
[grammar] ~1-~1: Hier könnte ein Fehler sein.
Context: --- description: BootstrapVueNext exposes several custom composables that integrate with various components. --- <script setup lang="ts"> import {data} from '../data/composables.data' import TableOfContentsCard from '../components/TableOfContentsCard.vue' </script>
(QB_NEW_DE)
apps/docs/src/docs/reference/form-validation.md
[grammar] ~1-~1: Hier könnte ein Fehler sein.
Context: --- description: > BootstrapVueNext does not include form validation by default; we leave that up to the many existing form validation plugins. Included here are some examples of validation plugins and how they may be integrated. ---
(QB_NEW_DE)
apps/docs/src/docs/reference/spacing-classes.md
[grammar] ~1-~1: Hier könnte ein Fehler sein.
Context: --- description: > Bootstrap v5 CSS includes a wide range of shorthand responsive margin and padding utility classes to modify an element's appearance. ---
(QB_NEW_DE)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: build
🔇 Additional comments (28)
apps/docs/src/docs/reference/settings.md (1)
1-3: LGTM! Frontmatter migration is clean and aligns with PR objectives.The YAML frontmatter is well-formed and the description text is properly preserved. This change aligns perfectly with the centralized descriptions objective—the auto-inject plugin will now consume this frontmatter to automatically generate the PageHeader and h1 title.
Note: The static analysis hint about grammar is a false positive (LanguageTool appears to have been confused by the language detection).
apps/docs/src/docs/reference/theming-bootstrap.md (1)
1-5: LGTM! Frontmatter conversion aligns with PR objectives.The YAML frontmatter is properly formatted with correct multi-line string syntax. The description concisely captures the theming approach and will be consumed by the auto-injection plugin to populate the
<PageHeader />component, eliminating manual markup duplication.apps/docs/src/docs/reference/accessibility.md (3)
1-3: Verify product terminology consistency across the page.The YAML frontmatter is correctly added and aligns with the PR's data-driven architecture for auto-injection. However, there's an inconsistency in product naming: lines 7 and 64–65 reference "BootstrapVueNext," but lines 11, 17, and 19 still reference "BootstrapVue" (without "Next").
Clarify whether this distinction is intentional (e.g., referencing the original product vs. the current version) or an oversight that should be normalized.
23-23: Bootstrap V5 context is appropriately added.The update mentioning "Bootstrap V5's default palette" provides proper version context and is consistent with the framework's current state.
64-65: Keyboard accessibility guidance updated correctly.The revision to reference "BootstrapVueNext provides keyboard control" is aligned with product naming conventions and clarifies the framework's keyboard support expectations.
apps/docs/src/docs/reference/router-links.md (1)
1-5: YAML frontmatter implementation aligns with PR objectives.The centralized description in frontmatter follows the documented approach for the documentation refactor and is properly formatted.
apps/docs/src/docs/reference/utility-classes.md (1)
1-5: Frontmatter structure looks good.The migration to YAML frontmatter follows the PR's standardized format. The description is properly formatted with the folding indicator (
>).apps/docs/src/docs/reference/form-validation.md (1)
1-5: Consistent frontmatter migration.Follows the same standardized pattern as other reference files; frontmatter is correctly formatted.
apps/docs/src/docs/reference/spacing-classes.md (1)
1-5: Frontmatter follows established pattern.Properly formatted YAML with consistent structure across the reference section.
apps/docs/src/docs/reference/third-party-libraries.md (1)
1-5: Consistent with reference documentation standard.YAML frontmatter properly formatted and following the established pattern.
apps/docs/src/docs/reference/starter-templates.md (1)
1-5: Frontmatter properly formatted.Follows the standardized pattern for reference documentation pages.
apps/docs/src/docs/reference/images.md (1)
1-8: Frontmatter properly separated from markdown content.The YAML frontmatter is correctly terminated with
---on line 6, and the blank line on line 7 properly separates it from the markdown content that follows. Structure is valid.apps/docs/src/docs/configurations.md (2)
8-8: Confirm data export is correctly imported.Line 8 imports
{data}from the configurations.data module. Verify this is a named export and matches the actual export structure in the data file.
5-5: Data structure alignment verified—no issues found.The bindings in configurations.md are correct:
DocIteminterface exports{name, description, url}with all string typestransformDocData()producesDocItem[]matching this shapeTableOfContentsCardaccepts:routeas a string (used withwithBase()):route="configuration.url"correctly passes the URL string to the componentThe refactor is properly aligned with no type mismatches.
apps/docs/src/docs/directives.md (2)
1-12: Data-driven refactor follows established pattern.The migration from hardcoded lists to data-driven rendering is consistent with configurations.md. Preserved markdown content (lines 6-8) remains above the data iteration, maintaining clarity of intent.
8-8: No issues found—bindings and data structure are correct.The directives.data exports
DocItem[]with properties{name: string, description: string, url: string}, and the TableOfContentsCard component expects string values for all props. The bindings in line 8 correctly mapdirective.urlto the:routeprop. This pattern is consistent with configurations.md and properly typed throughout the data transformation pipeline.CONTRIBUTING.md (1)
64-213: Excellent documentation additions!The new comprehensive guidance for the documentation system is very helpful. It clearly explains:
- File structure conventions
- Frontmatter requirements with YAML folding syntax
- Auto-injection behavior
- Component data file ordering rules
- Testing procedures
This will significantly help contributors understand the new data-driven documentation approach.
Note: Please address the past review comments regarding YAML code block language identifiers (lines 79, 88) and the typo at line 345 ("af appropriate" → "if appropriate").
apps/docs/src/data/reference.data.ts (1)
1-16: LGTM! Clean data loader implementation.The reference data loader follows the established VitePress pattern consistently with other data loaders in the PR (components, composables, directives, configurations). The type safety and transformation options are appropriate for reference documentation.
apps/docs/.vitepress/plugins/auto-inject-doc-components.ts (3)
1-25: Good use of shared utility to avoid duplication.The plugin now imports and uses
kebabToTitleCasefrom the shareddataLoaderUtils, which eliminates the code duplication that was previously flagged. The utility functions are clean and handle the special casing rules appropriately.
52-66: Path normalization added for cross-platform compatibility.The addition of path normalization on line 59 (
path.replace(/\\/g, '/')) addresses the Windows path separator concern raised in past reviews. The updated regex pattern on line 61 is also more flexible.
120-128: Improved style block detection.The footer insertion logic now uses
.search()to find the first<style>block anywhere in the content (line 121), which is more robust than the previous approach that only handled trailing style sections.apps/docs/src/docs/types.md (1)
1-4: Perfect frontmatter implementation.The YAML frontmatter uses the folding syntax (
>) for the multi-line description, following the conventions documented in CONTRIBUTING.md. This allows the auto-injection plugin to generate the page header correctly.apps/docs/src/index.md (1)
1-4: Clean frontmatter addition for the homepage.The index page now has proper frontmatter with both
titleanddescriptionfields, maintaining consistency with the rest of the documentation.apps/docs/src/docs/reference.md (1)
1-10: Successful conversion to data-driven approach.The reference page now follows the same data-driven pattern as other documentation pages (components, composables, directives). The use of
item.urlfor routing and the import from../data/reference.dataaligns perfectly with the architectural changes in this PR.apps/docs/src/docs/composables.md (1)
1-10: Consistent data-driven implementation.The composables page successfully adopts the data-driven pattern, matching the implementation in reference.md and components.md. The iteration over
dataand routing viacomposable.urlis clean and maintainable.apps/docs/src/docs/components.md (1)
1-10: Excellent data-driven conversion completing the pattern.The components page completes the consistent data-driven approach across all documentation listing pages (components, composables, directives, reference). The architecture is now uniform:
- Frontmatter descriptions
- Data imports from centralized
.data.tsmodules- Iteration over
datawith.urlfor routingThis significantly reduces duplication and makes the documentation system more maintainable.
apps/docs/src/docs/components/table.md (2)
1-3: Frontmatter migration looks good. The YAML description is properly formatted and succinctly captures the key BTable features (pagination, filtering, sorting, custom rendering). This aligns well with the auto-injection plugin approach from the PR.
264-264: Terminology consistently updated from BootstrapVue to BootstrapVueNext. All marked references align with the BootstrapVueNext rebranding across the documentation.Also applies to: 297-297, 458-458, 961-961
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
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
apps/docs/src/docs/reference/router-links.md (1)
179-181: Remove unused import.The
NotYetImplementedcomponent is imported on line 181 but is not used in the rendered content. This is likely a cleanup artifact from refactoring to use frontmatter and HighlightCard components. Per learnings,NotYetImplementedwas previously used but is now redundant.Apply this diff:
<script setup lang="ts"> import HighlightCard from '../../components/HighlightCard.vue' -import NotYetImplemented from '../../components/NotYetImplemented.vue' </script>Based on learnings from related PRs—the
<NotYetImplemented/>component automatically renders explanatory text, making manual imports unnecessary when the component is not explicitly rendered.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
apps/docs/.vitepress/plugins/auto-inject-doc-components.ts(1 hunks)apps/docs/src/docs/reference/router-links.md(2 hunks)apps/docs/src/docs/reference/size-props-and-classes.md(1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-05-23T23:58:07.165Z
Learnt from: dwgray
PR: bootstrap-vue-next/bootstrap-vue-next#2701
File: apps/docs/src/docs/migration-guide.md:630-632
Timestamp: 2025-05-23T23:58:07.165Z
Learning: The `<NotYetImplemented/>` component in the bootstrap-vue-next documentation automatically renders text indicating "Not Yet Implemented", so additional explanatory text about features not being implemented is redundant when this component is used.
Applied to files:
apps/docs/src/docs/reference/router-links.md
🧬 Code graph analysis (1)
apps/docs/.vitepress/plugins/auto-inject-doc-components.ts (1)
apps/docs/src/utils/dataLoaderUtils.ts (1)
kebabToTitleCase(25-30)
🪛 LanguageTool
apps/docs/src/docs/reference/router-links.md
[grammar] ~153-~153: Use a hyphen to join words.
Context: ...s, plus the following additional Nuxt.js specific props. ### prefetch - type:...
(QB_NEW_EN_HYPHEN)
apps/docs/src/docs/reference/size-props-and-classes.md
[grammar] ~1-~1: Hier könnte ein Fehler sein.
Context: --- description: > Bootstrap v5 CSS provides several classes that control the sizing of elements, some of which have been translated into props on components. ---
(QB_NEW_DE)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: build
🔇 Additional comments (3)
apps/docs/src/docs/reference/router-links.md (1)
1-5: LGTM on frontmatter conversion.The YAML frontmatter description is clear and appropriately captures the content. Good alignment with the PR's goal of making frontmatter the single source of truth.
apps/docs/src/docs/reference/size-props-and-classes.md (1)
1-5: LGTM — frontmatter migrated cleanly.Grammar fix applied (“some of which”). Plugin should now auto-inject the header as intended.
apps/docs/.vitepress/plugins/auto-inject-doc-components.ts (1)
57-62: Good cross‑platform path handling and scoping.Backslash normalization plus scoped match to src/docs/*.md is solid.
|
@VividLemon This is ready to go - it’s pretty close to a pure refactor of the docs to get rid of duplicate string and boilerplate code. It should make things easier to maintain moving forward. The only things that aren’t boilerplate are small bugs in the docs that the various AIs found during the refactor. |
* upstream/main: (28 commits) fix(BToggle)! Remove redundant attribute cleanup & update docs for accessibility attributes on show/hide components (bootstrap-vue-next#2918) chore: release main (bootstrap-vue-next#2912) fix: allow custom component props in orchestrator create methods with type safety (bootstrap-vue-next#2922) fix(BModal): prevent focus trap error when no tabbable elements exist (bootstrap-vue-next#2864) Update package description for clarity (bootstrap-vue-next#2917) Update project description for clarity and detail test: add event emission tests for BTable and BTableLite (bootstrap-vue-next#2915) fix(BTableLite): Use primary key to persist row-details state when items change (bootstrap-vue-next#2871) chore: release main (bootstrap-vue-next#2896) feat(BTable): add configurable debouncing ci: Add publint to the build process (bootstrap-vue-next#2909) docs(Offcanvas): Parity pass (bootstrap-vue-next#2900) fix(directives): Robustness fixes for directives (bootstrap-vue-next#2906) docs(BFormInput): document @wheel.prevent for disabling mousewheel events (bootstrap-vue-next#2903) fix(typings): Fix paths to `*.d.mts` files (bootstrap-vue-next#2907) feat: add name and form props to BFormRating for form submission (bootstrap-vue-next#2895) docs: refactor docs to avoid duplication and boilerplate code (bootstrap-vue-next#2891) docs(BToast): Parity (bootstrap-vue-next#2887) docs(BModal): fix attribute to hide footer (bootstrap-vue-next#2888) docs(BPlaceholder): Parity pass (bootstrap-vue-next#2886) ...
Describe the PR
Overview
This PR automates the documentation build system by eliminating manual duplication of component descriptions, auto-injecting page headers and footers, and implementing intelligent sourcePath inference for GitHub source links. The changes affect all documentation files across components, composables, directives, and configurations.
Problem Statement
The documentation system had several manual, error-prone processes:
<PageHeader />components and# Titleheaders<ComponentReference />footersSolution
1. Centralized Descriptions in Frontmatter
Before:
After:
2. Auto-Injection of Headers and Footers
auto-inject-doc-components.ts) to automatically inject page elementsAuto-injected elements:
<h1>page titles (generated from filename with proper Title Case)<PageHeader />components (with description from frontmatter)<ComponentReference />footers (for component docs with corresponding data files)Special handling:
<style>sections and inserts footer before them.data.tsfile exists3. Intelligent sourcePath Inference
Algorithm:
tabs.data.ts,BTabsis first → all components use/BTabs/directory/${firstComponentName}/${componentName}.vueSpecial cases (3 total with explicit sourcePath):
BButtonGroup→/BButton/BButtonGroup.vue(lives in parent directory)BButtonToolbar→/BButton/BButtonToolbar.vueBOrchestrator→/BApp/BOrchestrator.vueData file reordering (2 files):
formTags.data.ts: Swapped to putBFormTagsbeforeBFormTagtabs.data.ts: Swapped to putBTabsbeforeBTab4. Shared Data Loader Utilities
Utilities (
dataLoaderUtils.ts):extractFilenameFromUrl(): Get filename from URL pathkebabToTitleCase(): Convert “button-group” → “Button Group”extractTitleFromUrl(): Combine above for full title extractiontransformDocData(): Unified data transformation logic5. Unified PageHeader Component
PageHeader,ComposablePageHeader, andDirectiveHeaderinto single componentFeatures:
Files Changed
Created/Modified Files
New Files:
apps/docs/src/plugins/auto-inject-doc-components.ts- Markdown-it plugin for auto-injectionapps/docs/src/utils/dataLoaderUtils.ts- Shared data loader utilitiesapps/docs/src/data/configurations/configurations.data.ts- Data loader for configurationsMigration Scripts:
apps/docs/scripts/remove-manual-headers.mjs- Removed manual PageHeader componentsapps/docs/scripts/remove-component-reference-footers.mjs- Removed manual ComponentReference footersapps/docs/scripts/remove-sourcepath.mjs- Removed manual sourcePath declarationsModified Core Files:
apps/docs/src/components/PageHeader.vue- Unified header componentapps/docs/src/components/ComponentReference.vue- Auto-derive sourcePath logicapps/docs/.vitepress/config.mts- Registered markdown-it pluginUpdated Documentation:
formTags.data.ts,tabs.data.tsbuttonGroup.data.ts,buttonToolbar.data.ts,orchestrator.data.tsCONTRIBUTING.md- Documented all conventions and requirementsBreaking Changes
None - This is purely an internal refactoring. The documentation output is functionally identical (with minor improvements to title formatting).
Testing
pnpm --filter docs run build)Benefits
Migration Notes
Future contributors should be aware:
<PageHeader />or<ComponentReference />to markdown files# Titleheaders at the top of markdown filesdescriptionfield in every markdown filedescription: >) for multi-line descriptionsAll conventions are now documented in
CONTRIBUTING.md.Checklist
Future Enhancements
Potential follow-ups (not in this PR):
ription of what the pull request does.
Small replication
N/A
PR checklist
What kind of change does this PR introduce? (check at least one)
fix(...)feat(...)fix(...)docs(...)The PR fulfills these requirements:
CHANGELOGis generated from these messages, and determines the next version type. Pull requests that do not follow conventional commits or do not have an override will be deniedSummary by CodeRabbit
New Features
Documentation
UX
Style