-
-
Notifications
You must be signed in to change notification settings - Fork 79k
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
popover html replace title and content #12754
Comments
Hi @acornejo, it will be good if you could list down popular stack overflow questions relating your feature request. If there is really a need for features then I am sure core team won't mind adding or creating it. I personally would like tooltip / popover to be more advanced (in BS3) but its a matter of personal taste, as almost 70-80% (I personally think its 90+%) of bootstrap users don't use BS3 tooltip / popover for advanced usage, so adding extra features to it is not gonna be good idea, if it brings performance or such issues.
this plugin it past, and trust me I really liked it, so maybe you want to have a look at it for you need(s). I have tried about dozens of tooltip plugins but settled with this one. Regarding your pull-request, it won't be a waste of time even if it won't get into core, you could still utilize it for your personal projects :D. |
Hi @saas786 These are the first two google matches for people asking how to add close buttons to popovers: http://stackoverflow.com/questions/15606760/how-to-create-bootstrap-popover-close-option The Thanks for the pointer to jquery-cluetip, there are plenty of solutions to popovers out there. If you are looking for alternatives, I suggest you look at Semantic-UI for a complete alternative to bootstrap complete with popovers with customizable content (much like the proposed feature). I highly recommend it for new projects. Per the pull-request, I already have a hacky version which I use for my projects (which doesn't require modifying bootstrap). Creating the pull-request would not take me more than 5 minutes, but in my experience the mantainers of projects as large as bootstrap sometimes won't accept pull-requests for new features without a discussion (which was the purpose of opening this issue). |
@acornejo I reviewed these two questions, and I don't think they are that much popular questions upon which we can make assumption that this is highly needed feature and must be part of core. You see in answers that is quick and dirty solution, which you can easily use in your code and most importantly via "Popover" Events. And as bootstrap is Mobile first and also in modern web, there is not lot place for tooltips / popovers, you should only use them unless they are really really needed, also for mobile devices you have to provide fallbacks, and providing two versions for same feature makes your work more harder, so that's another no for popover uses. So I am not sure if your feature is gonna be considered for core. As core team already have lot and important tasks / features to deal with. And remember, adding any new feature, brings new bugs, new compatibility issues, performance issues, usability issues and long list of issues :). So unless feature is really needed, and can be a part of core, its not gonna be considered. |
@saas786 If after your review process you have decided my proposed fearure is not worth inclusion then feel free to mark this issue as wontfix and/or close it. |
When using popovers as a way to display additional information, the use of string as content is very limiting. For example, Meteor renders a DOMFragment and updates it in real time as the data source changes. Other frameworks that support taking a DOMFragment directly work seamlessly, but with Bootstrap 3 popovers we must first render the popover with a static HTML string (so that it is positioned properly), then find the content node and re-render it with the dynamically updated content. Having better support for this type of use case would greatly improve interoperability with reactive rendering frameworks and more dynamic content. |
Punting to the v4 checklist. |
(This is not a bug report, but a feature request)
Currently bs3 provides options for setting the title and the content of the popovers, together with an html boolean to determine if the content and title should be escaped as text, or inserted as html.
I propose to allow html to be a domnode or a string. If that is the case, the content and title options are ignored, and the domnode or string are used to populate the interior of the popover.
I think this feature would be immensely useful and simplify a lot of use-cases, since a lot of people out there have worked out all sorts of hacks to customize the contents of popovers (for instance, things like placing a close button on the title of the popover has been subject to numerous stack overflow questions and blog posts).
PS: I can create a pull-request implementing this feature, but I don't want to waste the time if this won't be included in bootstrap.
The text was updated successfully, but these errors were encountered: