-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
feat(config): Add option in config to set global tooltip and popover boundary #3229
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
Codecov Report
@@ Coverage Diff @@
## dev #3229 +/- ##
==========================================
+ Coverage 99.16% 99.16% +<.01%
==========================================
Files 214 214
Lines 3961 3967 +6
Branches 1161 1161
==========================================
+ Hits 3928 3934 +6
Misses 26 26
Partials 7 7
Continue to review full report at Codecov.
|
…s globally changed to other value
This should probably be made to work for both the directive and the component versions (using the same |
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.
Thanks for this.
Could you make this also apply to the b-tooltip component? They should use the same
BTooltip` key in the config.
As well, it would be nice to have this work as well for popovers, using the BPopover config key.
Hi, I will add support for the components now. Since the popover and tooltip use a Mixin, It will be best to implement in the mixin |
@AlanRezende The prop But the Miin is shared between BTooltip and BPopover, so in order to get the config value default unique for each, the individual components will need to have their own |
That was what I figured out and didi exactly what you describe. But I have a problem. With the directives all works fine, I`m using nuxt to set new values in config. With the components, not so much, if in dev I set new values in my dev config and rebuild all, it updates, but if I set in nuxt config nothing changes. Is there some aditional code to make the directives work with the given configs? |
EDIT: wrong train of thought for me. |
Could you provide an example of your nuxt config you are using? For the components, make sure you are using: boundary: {
// String: scrollParent, window, or viewport
// Element: element reference
type: [String, HTMLElement],
default: () => getComponentConfig(...)
}, and also include the HTMLElement polyfil (needed for SSR, as Node doesn't support import { HTMLElement } from '../utils/safe-types' |
All working now wi the nuxt config:
Care to explain why on component I had to use is it better to always use |
In the directives, the config is generated on demand in the For props, if you didn't use hte Since in the directive version everything is wrapped in functions, we didn't need to use |
I can confirm boundaryPadding is working based on config values (nuxt config used) |
Do we need to change anything else? |
I think we are good to go for a merge. |
Describe the PR
A clear and concise description of what the pull request does.
PR checklist
What kind of change does this PR introduce? (check at least one)
Does this PR introduce a breaking change? (check one)
The PR fulfills these requirements:
dev
branch, not themaster
branch[...] (fixes #xxx[,#xxx])
, where "xxx" is the issue number)fix(alert): not alerting during SSR render
,docs(badge): update pill examples, fix typos
,chore: fix typo in README
, etc). This is very important, as theCHANGELOG
is generated from these messages.If new features/enhancement/fixes are added or changed:
package.json
for slot and event changes)If adding a new feature, or changing the functionality of an existing feature, the PR's
description above includes: