Repository navigation
Conversation
…nfig
`tooltipPlacement` and `tooltipDelay` were declared with hardcoded defaults
(`'top'` and `{ show: 0, hide: 0 }`), so ButtonIcon always passed a concrete
value down to its BTooltip.
bootstrap-vue-next only falls back to a globally configured default when a
prop is absent from the vnode, so those defaults made
`createBootstrap({ components: { BTooltip: { ... } } })` a no-op for every
ButtonIcon in a consuming application: the global value was resolved, then
immediately shadowed.
Leaving both props unset lets BTooltip apply its own defaults while staying
globally configurable. Callers passing either prop explicitly are unaffected.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
ButtonIcondeclares hardcoded defaults for two tooltip props:It then forwards them unconditionally to its
<b-tooltip>. bootstrap-vue-next resolves a globally configured default only when a prop is absent from the vnode (propIsDefinedinuseDefaults), so a concrete value passed here permanently shadows it.The practical effect in a consuming app: configuring tooltips globally is a no-op for every button.
Every
ButtonIconkeeps{ show: 0, hide: 0 }. SinceButtonIconis the base button of downstream applications, this covers most tooltips in them. We hit this indatashare-clientwhile trying to set an application-wide hover delay.Fix
Remove both defaults.
BTooltipthen applies its own, and a global default wins when one is configured. Callers passingtooltip-placementortooltip-delayexplicitly are unaffected.Behaviour
tooltipPlacementis strictly neutral:BPopoveralready defaultsplacementto'top'.tooltipDelayis neutral for the main button tooltip (BTooltipdeclaresdelay: 0), with one intentional exception. TheiconLeftLabel/iconRightLabeltooltips use thev-b-tooltipdirective, which renders aBPopoverdirectly, andBPopoverdefaultsdelayto{ show: 100, hide: 300 }. Measured on the timeruseShowHideactually schedules:100 ms is bootstrap-vue-next's intended default and is imperceptible, but it is a real change and can now be overridden globally, which was the point.
Tests
New
tests/unit/components/Button/ButtonIconTooltip.spec.tsasserts the props reaching the tooltip vnode, plus one integration test proving a globally configuredBTooltipdelay now reaches the renderedBPopover. Three of the five tests fail without the change.Full suite: 856 tests passing, lint clean,
build:libclean.