FLEXIcontent / flexicontent-cck

Advanced content management for Joomla
http://www.flexicontent.org
82 stars 53 forks source link

FLEXIcontent + j4: Tooltips #1116

Closed iamrobert closed 11 months ago

iamrobert commented 1 year ago

Hi,

I'm trying to build a site in Joomla 4 - but I see tooltips are missing not working in Administrator:

IMG

1) ATUM doesn't have tooltips: https://github.com/joomla-projects/j4adminui/issues/184

2) Bootstrap 4 recommends popover: https://getbootstrap.com/docs/4.0/components/tooltips/

Is it something that I should implement?

micker commented 1 year ago

Hello yes j4 remove tooltip If you do a pr it can bé appreciate

iamrobert commented 1 year ago

@micker

For the item page - the problem is this is missing from the joomla-script-options inline json file:

"bootstrap.tooltip":{".hasTooltip":{"animation":true,"container":"body","html":true,"trigger":"hover focus","boundary":"clippingParents","sanitize":true}},

into this:

<script type="application/json" class="joomla-script-options new">

When I add that code to a html page it seems to work:

https://youtu.be/ubD_v7Oy44M

How to insert this into FLEXIContent item page - I'm yet to identify. The items page has the code.

Any ideas?

micker commented 1 year ago

i found a base in -> administrator\components\com_flexicontent\views\item\tmpl\layouts\tabs\main.php and add this

use Joomla\CMS\HTML\HTMLHelper;
HTMLHelper::_('bootstrap.tooltip', '.hasTooltip');

can you confirm it ? can help me for front view ? (item, category and module)

iamrobert commented 1 year ago

Hey @micker,

Thanks for sharing that solution! It works for the item view.

Unfortunately, we don't have frontend editing enabled, so I can't confirm if it works for the front view (item, category, and module). However, as I continue working on the site, I'll test it in other areas and see if it functions as expected. I'm working on a module next,

Since this is my first Joomla 4 site, it's taking a bit longer to fully understand everything. But I'm getting there!

Also, I noticed that the spacing seems off:

I'll take a stab at switching to font awesome icons and updating it. Will share a PR when done.

Thanks again for your help!

iamrobert commented 1 year ago

The field view seems broken as well.

I added this to administrator/components/com_flexicontent/views/field/tmp/default.php

use Joomla\CMS\HTML\HTMLHelper;
HTMLHelper::_('bootstrap.tooltip', '.hasTooltip');

and it works in places.

However - I don't think its coded in a way to read tooltips. As .hasPopover class is used:

micker commented 1 year ago

yes i think we need to remove popover for tooltips. @ggppdk are you agree ?

micker commented 11 months ago

can we close it ?

iamrobert commented 11 months ago

Perhaps. Other areas of the admin I haven't tested and require it. eg fields.