You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm a little uncomfortable with the input names on these directives as they could potentially conflict with 3rd party libraries that may coincidentally have directives that have the same input names, or the native browser.
eg. Popover's title is used natively to represent native tooltips, so you will see the popover's title as the tooltip on the popover's host element.
This could be solved by prefixing ngb at the small risk of conflicting with other ngb directives, though the naming style differs from how the components specify their inputs.
ui-bootstrap prefixed the input with popup- or tooltip-, not sure how likely a user would use two popover/tooltip directives on a single element.
Unfortunately this would be a breaking change.
Any thoughts or opinions?
The text was updated successfully, but these errors were encountered:
I think that the answer to this question is 2-fold.
To start with I think that the issue only applies to popovers as tooltips don't have the title property. And for popovers the issue can be easily worked around by doing <div ngbPopover="..." [title]="'Some title'">. Not perfect but gets the job done.
Then there is a more philosophical question - shell we prefix all properties? I believe that this topic is higly debated in the Angular team itself and in the doc team specifically so @Foxandxss might have more input here. I don't think that there was any consensus reached so far. In a nutshell we've got this trade-off: avoid potential collisions at the expense of more typing.
I'm going to open this issue open so we can improve demo and see what is the best way forward.
I'm a little uncomfortable with the input names on these directives as they could potentially conflict with 3rd party libraries that may coincidentally have directives that have the same input names, or the native browser.
eg. Popover's
title
is used natively to represent native tooltips, so you will see the popover's title as the tooltip on the popover's host element.This could be solved by prefixing
ngb
at the small risk of conflicting with other ngb directives, though the naming style differs from how the components specify their inputs.ui-bootstrap prefixed the input with
popup-
ortooltip-
, not sure how likely a user would use two popover/tooltip directives on a single element.Unfortunately this would be a breaking change.
Any thoughts or opinions?
The text was updated successfully, but these errors were encountered: