Jump to content

AdminOnSteroids


tpr

Recommended Posts

Hello tpr,

here is another z-index problem by showing the source code via CK-Editor.

You gave the divs "breadcrumbs" and "headlines" a z-index of 100011. Now there is a problem if you use the "show source code" function of the CKEditor. This window will be overlapped from the 2 divs in the static bar, because the table which holds the source code has no z-index value (only position static).

The following line of CSS should solve this problem (not tested yet):

table.cke_dialog_contents {z-index: 100012;}

Screenshot_12.jpg

Best regards

  • Like 2
Link to comment
Share on other sites

Here is a sneak preview of the custom nav items feature I'm working on. They load page lists if applicable, or other pages based on the page type, eg. the Profile page. The main goal is to select pages to add to the main for easy reach. There's also an edit link to the right of the items if you want to edit the page instead list their children.

I haven't found a way to inject these pages with PHP to their destination so the last step involves a bit of JavaScript. If anyone knows how to do this, please share.

aos-navitems.png 

aos_navitems-reno.png      aos_navitems-default.png

  • Like 1
Link to comment
Share on other sites

I've just added a feature to automatically save module settings to file on uninstall, and restore on install. This way you can uninstall the module without having to re-add settings later if you decide to install again. Additionally, settings can be moved easily from one project to another. With this I can apply more "safe" default settings and leave the more advanced stuff to those who need them.

  • Like 3
Link to comment
Share on other sites

Actually there will be a fix for this in the next AOS. As I wrote on GitHub, the problem apparently comes from the navigation having 0.5em top margin, which will be 7.5px, and jQuery uses this value. I've set the margin-top to 8px which is safe enough I think.

Link to comment
Share on other sites

I would also like to join the feature request club :) 

This topic reminded me of what I currently do in WordPress development:

Besides being able to identify a site, it is also a good thing to tell apart the various instances of the sites we have (development, staging, live version, etc...). In the case of WordPress I use wp-cli to automatically update the site admin's color (the so called "Admin Color Scheme" setting), so that live sites are always in red, dev sites are in blue and staging sites are in purple. In the past, it happened to me that I worked in the wrong admin.... but with this skin changing trick, I'm far less likely to make this mistake again.

Now back to ProcessWire :) My idea is that we could set a value in in config.php, such as $config->adminHeaderColor = #FF3935; which is used by AOS to change the background color of the header. Thanks to AOS I apply sticky headers, so this color indicator could be a strong one.

BTW, here is another related feature idea: it would be cool if we could change the ProcessWire logo easily with AOS, replacing it with the client's logo.

  • Like 2
Link to comment
Share on other sites

3 minutes ago, szabesz said:

it would be cool if we could change the ProcessWire logo easily with AOS, replacing it with the client's logo.

there was some discussion about this years ago: 

don't know how ryan sees this nowadays where pw should be more a framework than a cms...

  • Like 1
Link to comment
Share on other sites

@bernhard Thanks for the link to the topic! I skimmed through Ryan's replies and the only thing that seems to matter is this:

" I do think the software name ProcessWire, version number and copyright should always remain in the footer of the admin at least."

I agree, I never wanted to remove these :) Also, I always educate my clients and teach them the name of the underlying system(s)/pieces of software they use. 

Link to comment
Share on other sites

Well if I release 054 you could add js/css tweaks on your own, because AOS will automatically add admin.js and admin.css from "/site/templates" dir. I concluded that this is the best place to have them but please tell if you have other opinion.

Changing colors is not that easy, unfortunately. It could be great if someone could take the time and separate color-related stuff in a scss file. This way colors could be edited as variables.

I've experimented with css3 features like hue-rotation, saturation and such, and results were great, apart from the fact that if I turned off "NoAnims" in AOS, admin became very sluggish. Even with no animations I suspect many computers would have tough times rendering the admin, unfortunately.

I've also added a feature to add extra items to the navigation besides the CustomNavItems I showcased earlier. This allows adding any part of the admin, eg. direct link to the translator or module edit screens:

Translator: setup/language-translator/edit/?language_id=1066&textdomain=site--templates--_strings-php
HelloWorld module: module/edit?name=Helloworld
//disabled item
!AdminOnSteroids: module/edit?name=AdminOnSteroids

 

  • Like 2
Link to comment
Share on other sites

23 minutes ago, tpr said:

AOS will automatically add admin.js and admin.css from "/site/templates" dir. I concluded that this is the best place to have them but please tell if you have other opinion.

Wow :) I will try it out for sure. As for the path, well, I do not think we have other viable options than using this path, so let's go for it, maybe with an additional subfolder to keep things organized, such as: /site/templates/aos or /site/templates/AdminOnSteroids which is longer, but more concise than "aos".

About the color issue: I was just thinking about something like this (sorry for the actual colors, it is just an example...):

#masthead, #branding, .main-nav-toggle { background-color: red !important; }
#ProcessPageSearchQuery { background-color: darkred !important; }

I do not want to recolor the admin, the WP part of the comment is just an example I'm familiar with. Changing the head is just enough for the use case I've outlined. But with the new admin.js and admin.css feature one can easily do this.

Edited by szabesz
typos
Link to comment
Share on other sites

3 hours ago, szabesz said:

Besides being able to identify a site, it is also a good thing to tell apart the various instances of the sites we have (development, staging, live version, etc...). In the case of WordPress I use wp-cli to automatically update the site admin's color (the so called "Admin Color Scheme" setting), so that live sites are always in red, dev sites are in blue and staging sites are in purple. In the past, it happened to me that I worked in the wrong admin.... but with this skin changing trick, I'm far less likely to make this mistake again.

Not to be a feature stealer :), but I wonder if an icon/label on the Tracy debugbar might be a decent approach for this? Maybe not if you don't have the debugbar enabled in the backend? Or maybe if you typically don't want it on in the backend, then you could just have this "PW Instance" panel enabled for the backend, but no others?

I was thinking of adding a field where you can type the "label" for the current site - ie "Dev", "Staging", "Live" etc and then would be displayed in the debug bar. You could also choose an icon color along with the label.

Any thoughts on this vs coloring the header via AOS?

Link to comment
Share on other sites

4 hours ago, szabesz said:

BTW, here is another related feature idea: it would be cool if we could change the ProcessWire logo easily with AOS, replacing it with the client's logo.

I'd love to see this - I don't think it is taking away from PW branding - in fact I'd be happy to see the PW logo in the footer instead. I think as well as making the client feel like it's a system customized for them, I think the actual key benefit is providing another key visual trigger to let you know what site's admin you are currently looking at.

  • Like 2
Link to comment
Share on other sites

25 minutes ago, adrian said:

Any thoughts on this vs coloring the header via AOS?

Thanks for the idea, however, I used to use a prominent "corner ribbon" (eg https://codepen.io/eode9/pen/twkKm) but it was not enough, I did make the stupid mistake even thought it was big and red. Maybe its just me, I dunno... The header bar is even bigger and more prominent when it is "sticky", so I hope that will do.

BTW, I normally have Tracy turned off for the backend, it's only enabled when fiddling with admin hacks :P, and this sort of feature probably fits AOS better, I suppose.

  • Like 1
Link to comment
Share on other sites

33 minutes ago, adrian said:

I'd be happy to see the PW logo in the footer instead

+1

What happens when we click on it, anyway? It does not take us to processwire.com but... ;) The proposed footer logo / current text version should be linked though.

  • Like 2
Link to comment
Share on other sites

1 hour ago, adrian said:

I'd love to see this - I don't think it is taking away from PW branding - in fact I'd be happy to see the PW logo in the footer instead. I think as well as making the client feel like it's a system customized for them, I think the actual key benefit is providing another key visual trigger to let you know what site's admin you are currently looking at.

I agree,  being able to do a little welcoming branding for the client is really great.

I am doing that with a few lines of JS and CSS already, placing another logo (at least) next to the PW logo. Not perfect but it works.

 

Link to comment
Share on other sites

1 hour ago, tpr said:

In case you haven't come across with this beautiful blog post from... well, myself, here is another approach to easily distinguish different projects:

Per Project Chrome Instances

This approach has other benefits too: better isolation, saved passwords, bookmarks bar for the current projet only, etc.

Beautiful blog post indeed! :D However, you used the keywords: "for the current project only". I mean, I mixup the admins of the same project, so that is what I've solved with different admin theme colors. It would be an overkill to launch 4 Chrome instances for a project, 2 or three for another, and trying to tell the instances apart from my macOS dock would be frustrating. I also use other browsers too sometimes (for example here is Blisk I recently learnt about here, in the forums), although Chrome is my favorite for development so far.

Link to comment
Share on other sites

The use case is this: I have a local dev instance and I also have the live site and sometimes even another staging instance for testing another "branch". So same project, but different environments running different clones of the site. It does matter whether I make changes to the live site or to my local instance ;) Since the admin area looks identical, it is easy to pick the wrong tab without noticing, especially around midnight :P

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...