Jump to content

AdminOnSteroids


tpr

Recommended Posts

I think the "Show save dropdown on hover instead on click" option needs to have a little delay before it's hidden. At the moment I think it takes some careful mousing to get from the button to the dropdown options without them vanishing. Too much dexterity required for some users.

Link to comment
Share on other sites

It's controlled by jQuery and I don't know how could I add a delay. I've tried several tweaks in the past but haven't worked exactly I wanted. Anyway, I'm kinda like how it's working now, maybe because I got used to it. 

Do you see the submenu vanishing? It's flickering here a bit if I move the mouse from the button to the submenu and vice versa, but it stays visible.

Link to comment
Share on other sites

5 minutes ago, tpr said:

Do you see the submenu vanishing? 

Yeah, no flicker, just disappears if I don't move carefully (or quickly) from the button to the dropdown. Don't worry too much about it - I'll just disable that tweak.

Link to comment
Share on other sites

1 hour ago, adrian said:

Yeah, no flicker, just disappears if I don't move carefully (or quickly) from the button to the dropdown.

This may be caused sub-pixel rounding, creating a 1 pixel or sub-pixel gap between the button and the dropdown. The main menu dropdowns in the default admin theme have a similar issue (in Firefox anyway), causing the menu to collapse as you move to the submenu unless you do it quickly. Looking for a fix for this is on my todo list.

  • Like 1
Link to comment
Share on other sites

AOS is preventing the normal rendering of an AsmSelect in the field settings for a RepeaterMatrix field. With AOS disabled the field below renders as an AsmSelect:

rm.png

The AsmTweaks option is not active and there are no errors in the JS console.

The AsmSelect becomes operational after the field settings page is saved (the problem occurs when creating a new matrix type).

Link to comment
Share on other sites

No success in reproducing. Tried with PW 3.038, PW 3.0.40 and RepeaterMatrix 0.0.3 (according to Module Information) and AOS 1.0.4 && Chrome / Firefox.

Nothing comes to my mind that could cause something like this. AsmTweaks certainly not, perhaps some Inputfield::render hooks could interfere. Could you narrow it down to a submodule? (disable all and try enabling them one after other)

Link to comment
Share on other sites

31 minutes ago, tpr said:

Perhaps pulling up the dropdowns with translateY(-1px) would suffice if it's a subpixel issue.

Unfortunately not. The submenu is positioned absolutely by JS and if I set a translate transform or a negative margin the JS accounts for it and places the submenu further to the right so the result is the same.

The first submenu vertical position is okay (no gap), it's the horizontal position of the second nested submenu that's where the gap occurs.

2016-11-18_132453.png

Edit: just noticed that the gap appears in Chrome too, so it's probably deliberate. Mousing over the gap doesn't cause the menu to collapse in Chrome but it does in Firefox.

Edit2: nope, not deliberate because the gap doesn't appear for every dropdown menu - just randomly.

Link to comment
Share on other sites

On 18/11/2016 at 1:28 PM, Robin S said:

Unfortunately not. The submenu is positioned absolutely by JS and if I set a translate transform or a negative margin the JS accounts for it and places the submenu further to the right so the result is the same.

The first submenu vertical position is okay (no gap), it's the horizontal position of the second nested submenu that's where the gap occurs.

This is off-topic, but in case anyone else is bothered by the gap/collapse issue...

After spending some time seeing if this could be resolved in the JS (conclusion: not easily) I found the simplest solution is to avoid the fractional pixels by setting the menu item padding in whole pixels rather than ems. I added this with AdminCustomFiles:

.ui-menu .ui-menu-item a { padding:8px 11px; }

 

 

Link to comment
Share on other sites

Hey @tpr - have a weird situation where one of my sites stopped showing the page IDs in the list view. With all PW and AOS versions the same it still works on other sites.

I found a fix in the addPageListIDs() function. This seems to work on all sites:

$event->return = '<span data-pid="' . $page->id . '" class="label_title">' . $event->return . '</span>';

although with my limited testing I am not really sure why there wasn't already a span with the label_title class applied to each title in the list view on this particular site.

I am guessing that my approach might affect other modules that also modify the title in the list view, so you might need to investigate more thoroughly.

On another note, I sometimes find that the template link in the page list actions doesn't always show for certain pages. It seems random and a page reload fixes it - maybe you have also noticed this?

Link to comment
Share on other sites

On 11/20/2016 at 6:18 AM, Robin S said:

After spending some time seeing if this could be resolved in the JS (conclusion: not easily) I found the simplest solution is to avoid the fractional pixels by setting the menu item padding in whole pixels rather than ems. I added this with AdminCustomFiles:


.ui-menu .ui-menu-item a { padding:8px 11px; }

 

I added 1px border to the submenu so it will always have at least 0.5px overlap. I'll add this to the next version of AOS.

#topnav .topnav {
    border-right: 1px solid transparent;
}

 

  • Like 1
Link to comment
Share on other sites

Thanks @tpr - unfortunately that still doesn't fix the Page IDs issue for me.  Here's the generated source of one of this pages in the list. As you can see there is no <span> to start with, which is why that version I posted (https://processwire.com/talk/topic/13389-adminonsteroids/?do=findComment&comment=133085) adds the span. Maybe it's not the best approach, but unfortunately it doesn't work as is.

<div class="PageListItem PageListTemplate_course PageListID1016 trashable"><a href="#" title="/rock-climbing/introduction-to-rock-climbing-rappelling/" class="PageListPage label">Introduction to Rock Climbing & Rappelling</a><span class="PageListNumChildren detail"></span><ul class="PageListActions actions"><li class="PageListActionEdit"><a href="/admin/page/edit/?id=1016" class="pw-modal pw-modal-large pw-modal-longclick" data-buttons="#ProcessPageEdit > .Inputfields > .InputfieldSubmit .ui-button">Edit</a></li><li class="PageListActionView"><a href="http://sradev.skaharockclimbing.com/rock-climbing/introduction-to-rock-climbing-rappelling/" class="pw-modal pw-modal-large pw-modal-longclick">View</a></li><li class="PageListActionMove"><a href="#">Move</a></li><li class="PageListActionEdit"><a href="http://sradev.skaharockclimbing.com/admin/setup/template/edit?id=44" class="pw-modal pw-modal-large pw-modal-longclick" data-buttons="#ProcessPageEdit > .Inputfields > .InputfieldSubmit .ui-button">course</a></li><li class="PageListActionExtras ui-priority-secondary"><a href="#" class="clickExtras"><i class="fa fa-angle-right fa-flip-horizontal"></i></a></li><li class="PageListActionExtra PageListActionUnpublish"><a class="PageListActionExtra PageListActionUnpublish" href="/admin/page/?action=unpub&id=1016" style="display: inline-block;">Unpub</a></li><li class="PageListActionExtra PageListActionHide"><a class="PageListActionExtra PageListActionHide" href="/admin/page/?action=hide&id=1016" style="display: inline-block;">Hide</a></li><li class="PageListActionExtra PageListActionLock"><a class="PageListActionExtra PageListActionLock" href="/admin/page/?action=lock&id=1016" style="display: inline-block;">Lock</a></li><li class="PageListActionExtra PageListActionDelete aos"><a class="PageListActionExtra PageListActionDelete aos" href="/admin/page/?action=delete&id=1016" style="display: inline-block;">Delete</a></li><li class="PageListActionExtra PageListActionTrash"><a class="PageListActionExtra PageListActionTrash" href="/admin/page/?action=trash&id=1016" style="display: inline-block;"><i class="fa fa-trash-o"></i> Trash</a></li></ul></div>

One small request with the new icon page list actions - can we get title attributes so users can figure out what they are until they get used to them?

Also, the "Always show page list actions" doesn't work for the parent of expanded branches (only tested on Default Admin Theme).

Thanks heaps!

Link to comment
Share on other sites

2 minutes ago, tpr said:

As for the pagelist icons, if you hover on them they expand to show the labels, isn't that suffice?

That doesn't seem to work for me - tested on default and reno.

Also, please note that I expanded on the icons issues with the default theme in my last post - the "Always show page list actions" doesn't work for the parent of expanded branches on Default Admin Theme - works fine with Reno.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...