8000 Small fixes on 2025-06-06 by xvaara · Pull Request #2734 · bootstrap-vue-next/bootstrap-vue-next · GitHub
[go: up one dir, main page]

Skip to content
8000

Small fixes on 2025-06-06 #2734

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jun 6, 2025
Merged

Conversation

xvaara
Copy link
Contributor
@xvaara xvaara commented Jun 6, 2025

Describe the PR

A clear and concise description of what the pull request does.

Small replication

A small replication or video walkthrough can help demonstrate the changes made. This is optional, but can help observe the intended changes. A mentioned issue that contains a replication also works.

PR checklist

What kind of change does this PR introduce? (check at least one)

  • Bugfix 🐛 - fix(...)
  • Feature - feat(...)
  • ARIA accessibility - fix(...)
  • Documentation update - docs(...)
  • Other (please describe)

The PR fulfills these requirements:

  • Pull request title and all commits follow the Conventional Commits convention or has an override in this pull request body This is very important, as the CHANGELOG is 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 denied

Summary by CodeRabbit

  • New Features

    • Added support for updating the identifier of registered show/hide components, ensuring their data is preserved during ID changes.
  • Bug Fixes

    • Improved popover event descriptions and documentation for clarity.
    • Fixed typographical errors in documentation and component descriptions.
  • Enhancements

    • The default active class for navigation links now includes both 'router-link-exact-active' and 'active' for improved styling.
    • The popover component now relies on implicit target binding for certain placements.
    • Improved event timing description for show/hide events.
    • Toasts now properly stop when their value is set to zero.
    • Link-related properties now include support for an exact active class.
    • Improved handling and error messaging for show/hide plugin injection.
    • Registry updates automati 8000 cally when component IDs change.

Copy link

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

Copy link
coderabbitai bot commented Jun 6, 2025

Walkthrough

This update introduces typo corrections in documentation and data files, adjusts prop defaults and property extraction in link components, modifies event descriptions, and enhances the show/hide plugin by adding an updateId method. Watchers and dependency injections are updated for improved state management and registry handling in related composables and plugins.

Changes

File(s) Change Summary
apps/docs/src/data/components/popover.data.ts, apps/docs/src/docs/components/popover.md Corrected typos in event and documentation descriptions.
apps/docs/src/docs/components/demo/PopoverPositioning.vue Removed explicit target attribute from a popover demo.
apps/docs/src/utils/showhide-emits.ts Updated event description for show to clarify emission timing.
packages/bootstrap-vue-next/src/components/BLink/BLink.vue Changed default exactActiveClass prop to include 'active' class.
packages/bootstrap-vue-next/src/components/BTabs/BTabs.vue Added a clarifying comment regarding tab sorting in the registerTab function.
packages/bootstrap-vue-next/src/components/BToast/BToast.vue Added watcher logic to stop countdown when modelValue is zero.
packages/bootstrap-vue-next/src/composables/useBLinkHelper.ts Included 'exactActiveClass' in the set of props picked for links.
packages/bootstrap-vue-next/src/composables/useShowHide.ts Added watcher to update registry when computedId changes.
packages/bootstrap-vue-next/src/composables/useToggle/index.ts Changed injection logic for show/hide storage and improved error messaging.
packages/bootstrap-vue-next/src/plugins/showHide/index.ts Added updateId(newId, oldId) method to the show/hide registry object.
packages/bootstrap-vue-next/src/utils/keys.ts Extended interface to include updateId method signature.

Sequence Diagram(s)

sequenceDiagram
    participant Component
    participant useShowHide
    participant showHidePlugin

    Component->>useShowHide: computedId changes
    useShowHide->>showHidePlugin: updateId(newId, oldId)
    showHidePlugin->>showHidePlugin: Update registry entry from oldId to newId
Loading

Possibly related PRs

Suggested reviewers

  • VividLemon

Poem

In fields of code where popovers bloom,
A typo fixed dispels the gloom.
Links now active, classes align,
Watchers and registries intertwine.
With every hop, IDs update—
This bunny’s merge is feeling great!
🐇✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 377491b and 0e29ce2.

📒 Files selected for processing (12)
  • apps/docs/src/data/components/popover.data.ts (1 hunks)
  • apps/docs/src/docs/components/demo/PopoverPositioning.vue (1 hunks)
  • apps/docs/src/docs/components/popover.md (1 hunks)
  • apps/docs/src/utils/showhide-emits.ts (1 hunks)
  • packages/bootstrap-vue-next/src/components/BLink/BLink.vue (1 hunks)
  • packages/bootstrap-vue-next/src/components/BTabs/BTabs.vue (1 hunks)
  • packages/bootstrap-vue-next/src/components/BToast/BToast.vue (1 hunks)
  • packages/bootstrap-vue-next/src/composables/useBLinkHelper.ts (1 hunks)
  • packages/bootstrap-vue-next/src/composables/useShowHide.ts (1 hunks)
  • packages/bootstrap-vue-next/src/composables/useToggle/index.ts (1 hunks)
  • packages/bootstrap-vue-next/src/plugins/showHide/index.ts (1 hunks)
  • packages/bootstrap-vue-next/src/utils/keys.ts (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
packages/bootstrap-vue-next/src/components/BTabs/BTabs.vue (1)
Learnt from: xvaara
PR: bootstrap-vue-next/bootstrap-vue-next#2716
File: packages/bootstrap-vue-next/src/components/BTabs/BTabs.vue:425-430
Timestamp: 2025-05-28T07:32:45.658Z
Learning: In BTabs component (packages/bootstrap-vue-next/src/components/BTabs/BTabs.vue), the activeIndex synchronization within sortTabs() is necessary and correct. When sorting tabs by DOM position, indices change, so activeIndex must be updated immediately to maintain consistency with activeId. This is not an unwanted side effect but a required consequence of the sorting operation.
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: build
🔇 Additional comments (12)
apps/docs/src/data/components/popover.data.ts (1)

171-171: Good typo correction!

The spelling correction from "popopver" to "popover" improves the documentation clarity.

packages/bootstrap-vue-next/src/utils/keys.ts (1)

176-176: Interface enhancement for dynamic ID updates.

The addition of the updateId method allows for proper management of component ID changes in the show/hide registry system, which improves state synchronization.

packages/bootstrap-vue-next/src/components/BTabs/BTabs.vue (1)

437-437: Good clarifying comment addition.

The comment explains the purpose of the sorting operation when tabs are updated after initialization, improving code readability and maintainability.

apps/docs/src/docs/components/popover.md (1)

82-82: Spelling correction improves documentation quality.

The typo fix from "utitlities" to "utilities" ensures accurate documentation.

apps/docs/src/docs/components/demo/PopoverPositioning.vue (1)

92-96: LGTM! Improved consistency with other popover instances.

Removing the explicit target attribute aligns this popover with the consistent pattern used by all other popover instances in the file, which rely on the #target template slot for binding.

packages/bootstrap-vue-next/src/components/BToast/BToast.vue (1)

256-258: LGTM! Proper countdown cleanup when modelValue is zero.

This addition ensures the countdown is properly stopped when modelValue becomes zero, providing logical consistency with the existing restart behavior for positive values.

packages/bootstrap-vue-next/src/composables/useBLinkHelper.ts (1)

34-34: LGTM! Complete link prop forwarding with exactActiveClass.

Adding exactActiveClass to the picked properties ensures proper forwarding of router-link exact active class functionality, maintaining consistency with standard Vue Router behavior.

packages/bootstrap-vue-next/src/composables/useShowHide.ts (1)

381-383: LGTM! Essential registry synchronization for dynamic ID updates.

This watcher ensures the app registry stays synchronized when component IDs change, preventing stale references and maintaining proper component lifecycle management. The optional chaining appropriately handles cases where appRegistry might be undefined.

packages/bootstrap-vue-next/src/components/BLink/BLink.vue (1)

41-41: LGTM! Improved CSS class handling for exact active links.

The addition of the 'active' class alongside 'router-link-exact-active' ensures proper styling when the link is exactly active, providing both router-specific and Bootstrap-style active states.

apps/docs/src/utils/showhide-emits.ts (1)

46-46: LGTM! Improved event timing documentation.

The updated description correctly clarifies that the 'show' event emits just before the component is shown, which is consistent with typical event lifecycle patterns and its cancelable nature.

packages/bootstrap-vue-next/src/plugins/showHide/index.ts (1)

37-43: LGTM! Well-implemented ID update functionality.

The new updateId method provides a clean and safe way to handle dynamic ID changes in the show/hide registry. The implementation correctly:

  • Safely retrieves existing values without throwing errors
  • Preserves all component data while updating the ID
  • Properly cleans up the old registry entry

This enhances the plugin's capability for dynamic ID management.

packages/bootstrap-vue-next/src/composables/useToggle/index.ts (1)

14-21: LGTM! Improved injection pattern and error handling.

The refactored injection approach is cleaner and more maintainable:

  • Injecting the full storage object provides access to all methods (including the new updateId)
  • More specific error message improves debugging experience
  • Cleaner separation of concerns by accessing registry from the storage object

This change aligns well with the show/hide system enhancements.

✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
pkg-pr-new bot commented Jun 6, 2025

bsvn-vite-ts

npm i https://pkg.pr.new/bootstrap-vue-next/bootstrap-vue-next@2734
npm i https://pkg.pr.new/bootstrap-vue-next/bootstrap-vue-next/@bootstrap-vue-next/nuxt@2734

commit: 0e29ce2

@xvaara xvaara merged commit 45bb9c5 into bootstrap-vue-next:main Jun 6, 2025
5 checks passed
xvaara added a commit to xvaara/bootstrap-vue-next that referenced this pull request Jun 10, 2025
* upstream/main:
  docs: fix on-this-page for composable and directives pages (bootstrap-vue-next#2742)
  fix(BTableLite): field attribute isRowHeader now being respected (bootstrap-vue-next#2713)
  docs: change example styles to be single-attribute-per-line (bootstrap-vue-next#2731)
  fix(BTabs): Add type=button to buttons to prevent form submission (bootstrap-vue-next#2740)
  docs: fix unplugin-vue-components issue (bootstrap-vue-next#2724)
  fix(bforminput): abort debouncing if blur occurs
  chore: release main (bootstrap-vue-next#2735)
  fix(BTabs): correct id/index on ssr (bootstrap-vue-next#2726)
  Small fixes on 2025-06-06 (bootstrap-vue-next#2734)
  docs(BPopover): Parity pass (bootstrap-vue-next#2701)
  chore: release main
  Fix some tabs bugs, commit the previous pr override (bootstrap-vue-next#2720)
  chore: release main (bootstrap-vue-next#2698)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant
0