Skip to content

Creating better tooltips/popovers for elements with sub-choices. #70

Open
RohdeK wants to merge 15 commits intoebailey78:shinyBS3from
RohdeK:shinyBS3
Open

Creating better tooltips/popovers for elements with sub-choices. #70
RohdeK wants to merge 15 commits intoebailey78:shinyBS3from
RohdeK:shinyBS3

Conversation

@RohdeK
Copy link

@RohdeK RohdeK commented May 12, 2016

Hello, my name is Konstantin and I recently answered to an issue on stackoverflow here, from where I got the idea to propose a pull request.

There, the user requested to add tooltips/popovers from shinyBS onto singular choices of radioButtons and not only the whole radioButton element. Now, I got much further into shinyBS and wrote a small extension, which adds those features for groupInputs (that is radioButton and checkboxGroup) and selectizeInputs.

The main aim was to create tooltips/popovers to a certain choice of such an element. In effect and design, the resulting functions remain very similar to the original bsPopover/bsTooltip functions. They just take an additional value (the specific choice which should be highlighted) and differ mostly in the JavaScript selection algorithm. I tried hard to match the language and style of the work you guys have done so far.

Also, I tried/managed to supply both the ui-sided as well as the server-sided versions to create and delete tooltips/popovers, just like the regular bsTooltip/bsPopover.

While groupInputTooltip/-Popover is very straight-forward, selectizeTooltip/-Popover needs some additional machinery, using observers, to re-enact tooltips/popovers whenever the DOM is changing. Those observers have to be stored in a collection, such that they can be disconnected, if the tooltip/popover is to be removed.

I already did a lot of testing on the way and everything has been working well. There should be no conflict with the rest of the package. I'd appreciate if you'd try out my functions and see if this is worth including into your package.

Best regards,
Konstantin Rohde

RohdeK added 15 commits May 12, 2016 10:21
Add new features, that add specific popovers to selectize lists.
Add new features, that add specific popovers to group inputs.
Added server side tooltip/popover creation.
Added remove popover/tooltip functionality.
Added updateSelectize custom message handler for server sided creation of popovers and tooltips on selectize Elements.
Added observer dictionary to created tabs and observers.
Changed selectize handler to also disconnect observers.
Included server sided tooltip/popover updates.
Added GroupInput server side message handler.
@adefelicibus
Copy link

Hi, is it possible to use this feature? Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants