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
Add bootstrap tooltip extended: 4 extra positions and RTL support #10237
Add bootstrap tooltip extended: 4 extra positions and RTL support #10237
Conversation
Did you change bootstrap js and bootstrap extended css? I think you should had as new files. |
bootstrap-extended IIRC is a Joomla thing, not native Bootstrap. And the bootstrap.js is already core hacked to bits to deal with event names, MooTools incompatibilities, and "auto-hover" on the dropdown menus (compare joomla.org and api.joomla.org mega menus and how you have to click to move between them; the former is using Joomla Bootstrap and the later the native Bootstrap). So, we're already long past pure vendor files (at least here). |
ok, didn't know the history. |
The keyword there is "should" 😉 It really should be "must", but considering Joomla has a history of hacking third party code, good luck changing that. |
When bs abandoned v2 and we were stuck with it we had no option This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10237. |
i see, vendor code MUST not ever be changed ... for 4.0 then |
Most of those hacks came when we first implemented Bootstrap 2.1 because they weren't going to make changes to deal with the MooTools conflicts and someone decided they wanted fluid dropdowns on the top nav bar in Isis (which I agree is a nice little UX thing but it came at the expense of hacking Bootstrap). |
ok, so, for what is to this PR, this change in vendor lib is ok, because the vendor lib is already changed. |
Note: i can add this as a separated plugin too. ;-) The first reason is to have a better placement of the tooltip when inside a modal. BS 3 has an auto placement based on an additional viewport option (which solves such issue, but we are in BS2). We can too implement tooltip from BS3 (backward compatible) to replace BS 2 tooltip plugin, and then just set the viewport when tooltip inside a modal, to the modal ID ;-) |
@andrepereiradasilva note about bootstrap, i don't have hacked nor changed nothing in Bootstrap, just added a plugin in bootstrap.js, which extends tooltip plugin.
Maybe an idea...! 👍 With something like : OR to extend tooltip class like this : @andrepereiradasilva, @mbabker, @brianteeman ... |
I know. I mean changing the bootstrap(.min).js file. 😄
IMHO it would be better. |
So, what about this in bootstrap class :
We call files with This way, no change in bootstrap.js, and no change in core less/css files. ;-) Should i go this way ? |
i agree |
@andrepereiradasilva Done! ;-) Testing Instructions not changed: in all modals (Batch, copy Template...) |
I have tested this item ✅ successfully on c76be51 This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10237. |
will test tomorrow. 😃 |
I have tested this item ✅ successfully on c76be51 This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10237. |
rtc This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10237. |
Thank you @JoomliC and testers! |
This PR introduces bootstrap-tooltip-extended.js to add 4 positions and RTL support for BS tooltips.
It follows discussion about tooltip placement issue when inside modals: #10100 (comment)
Summary of Changes
JHtml::_('bootstrap.tooltipExtended');
method to load bootstrap-tooltip-extended.js to get 4 extra positions :top-left
,top-right
,bottom-left
andbottom-right
(https://github.com/cyrilreze/bootstrap-tooltip-extended)Add tooltip-extended arrow css styles inbootstrap-extended.less
data-placement="auto-dir top-left"
(if data-placement is undefined) for class.modalTooltip
(handler class for BS tooltip when inside a modal-body).Testing Instructions
Screenshots
(eg. batch modules)
BEFORE PATCH
AFTER PATCH
Left-to-right (LTR) language direction :
Right-to-left (RTL) language direction :