I've been playing with Skinr 2 and its awesome.

I was especially pumped when I saw the administrative shortcut "cog": Hover over the cog and a dotted outline wraps the target region. Click to reveal a drop down of shortcut options. To top it off, the chosen option opens in a discreet modal dialog so you can tweak the settings (with a live preview!) without ever leaving your current page. Brilliant!

I had visions of getting rid of all my theme-specific, template bound contextual admin shortcuts in favor of a configureable skinr method.

At least, that's what I expected.

Unfortunately, as far as I can tell, what I assumed to be a contextual dropdown menu really only has one option: "Edit skin", which makes it not as much of a contextual dropdown menu as a fancy tool tip.

Is there any reason we can't expand the scope of the skinr cog to provide discreet shortcuts for other common administrative uses too?

Please take a look at my attached screenshot mockup (before & after) of a node cog menu that offers links to edit, unpublish, delete, devel load/render, edit skin, edit content type, manage fields, display fields. The last option: 'manage form' is an example of how another module (nodeformcols) could also add shortcut links of its own.

This same contextual-admin-link framework could support views and panels, both of which provide their own less elegant — and often times conflicting — solution.

What do you guys think?

Comments

zach harkey’s picture

Note: The jpg attachment's url changed when I submitted the issue causing my inline link to break. Nor was there a way to go back and edit the post to fix it. Please click the attachment link at the bottom of the post instead.

jacine’s picture

Hi Zach!

We actually shamelessly stole this code from Drupal 7. It's a new module that is going to ship with core called contextual links.

Ideally, this code will be taken out of Skinr, and the module backported. I know that someone has already started backporting the module (after we started working on this), but I'm not sure what shape it's in, and it's also only on Github at this point.

I've been meaning to post about this, because it badly needs to happen, but haven't had the time, so if anyone has time to test it out and see what needs to be done to make this happen, I would be very happy:

The backported code is here:
http://github.com/swentel/contextual

moonray’s picture

fago has a utility to synchronize github with cvs at http://github.com/fago/drupal-git-sync
I've opened an issue with contextual on github for them to synch it with a drupal.org project.

JaapB’s picture

We have build such a module for drupal 6:
http://drupal.org/node/795694#comment-3032046

It has a lot of different hooks so you can add more links and forms to the "contextual tip".
It also enables (saveable) drag and drop for blocks.

Maybe we can join these things together somehow?
Mail me if you are interested!

zach harkey’s picture

Whoa JaapB! That demo is awesome!

JaapB’s picture

Thanks Zach!
We use it frequently on a couple of websites for our clients and they love it too.
I hope the Drupal community will think the same way...

zach harkey’s picture

The Skinr module has tremendous potential for Drupal theming. But the cog menu is quickly becoming a deal breaker because it is required to access the Skinr 2.x branch, yet cannot be extended or replaced with more general contextual admin solution.

Edit Skin is just one of many administrative links that my client admins need. They need to Edit block content, Edit node content, Admin menu items, etc.

There are several modules that provide this kind of functionality (e.g. block_edit, eazyedit, JaapB's administertooltip etc. Most base themes also provide contextual edit links), but I can't have competing contextual menus overlapping all over the ui.

Janice implied the current implementation of the cog menu was kind of a stop-gap kludge to be stripped out in favor of leveraging the D7 contextual menu.

In the meantime, if the Skinr cog menu cannot provide a simple way to accommodate additional contextual admin tasks, is there any way to go ahead and decouple the Skinr-2.x branch from the cog menu so that other contextual admin menu modules (including hopefully a backport of the D7 contextual admin) and/or themes could provide the Edit Skin link instead?

moonray’s picture

As soon as there is a good viable solution, we will gladly implement it in Skinr using a universal contextual module. Until then, though, every module is implementing their own version, and Skinr is forced to as well.
The backport of the D7 version of contextual can't be used as long as it's not available on drupal.org; it wouldn't be accessible enough.

You can always override some of the CSS to move things around and ensure they don't overlap, as a stop-gap measure.

Jeff Burnz’s picture

I want to be able to turn these links off and disable the modal dialog, this is not accessible and some of my clients, during testing, have complained that they do not like this feature (because its not accessible and therefor cannot use it in their sites because they must met strict accessibility requirements).

It would be good if we could just turn this off in the module.

jacine’s picture

You can disable the Dialog module and still use Skinr. It works just fine. As far as the contextual links are concerned, I'll re-quote moonray:

As soon as there is a good viable solution, we will gladly implement it in Skinr using a universal contextual module. Until then, though, every module is implementing their own version, and Skinr is forced to as well.

I understand the frustration here, but this is a dev version and there is ONE person who codes this module - that's it. We don't have the time or resources to make things like the Dialog fully accessible, nor to solve the contextual problems that are really contrib-wide problems.

JaapB’s picture

I'll see if I can make some hooks for the new Skinr-cog-link in my administertooltip module.
In that way there is a hookable and thus extendible module for some general contextual functionality...

moonray’s picture

Status: Active » Postponed

This is entirely dependent upon third-party modules.

jacine’s picture

Priority: Normal » Major
Status: Postponed » Active
ericduran’s picture

Hey,

So I read the comments but I'm not quiet sure on what needs to be done.

Have we decided on the solution for this issue? If so what needs to be completed for this issue to be resolve?

Thanks :)

moonray’s picture

Is the http://drupal.org/project/contextual module a solid, useable dependency? That is the real question. If so, we can start implementing it in skinr, and removing any custom code we dropped in for handling contextual links.

nomonstersinme’s picture

I dunno how to determine if this is a solid usable dependency but i just messed around with it and i like it a lot.. technically you can use it already to edit skins just not using the dialog.

perhaps when the new skinr ui is ready we can submit a patch for this to add an edit skin link..?

ericduran’s picture

We can implement the hook in skinr without a need to submit a patch to the module. I personally like http://github.com/swentel/contextual better because is a d7 backport. ;-)

But we can essentially provided the hooks for both of them and then a user can use what ever they like.

moonray’s picture

I prefer the D7 backport as well. Keep things standardized.

nomonstersinme’s picture

I dunno about that D7 backport.. i added on a site and it does absolutely nothing. no error messages or anything. it would be nice to use if it actually worked because it would be familiar but its not working and appears that the developer has zero interest in making it work.

jacine’s picture

@nomonstersinme - @ericdruan said he tried it with Skinr and it worked. You need to add variables to your theme to make it work, and Skinr will need to change some code to work with it too.

nomonstersinme’s picture

oh der.. would help if i actually looked at readme files... do you think this is too much for some to have to add both the skinr variable AND this cog variable or would we be able to simplify it?

jacine’s picture

Anyway, "someone" will end up back porting it. I have no question about that. It's only a matter of time. I would suggest that when we have 7.x in decent shape, if this is still not on d.o, that we just pull the code and create a project on d.o for it, but I don't think we can commit to that right now.

jacine’s picture

Do you think this is too much for some to have to add both the skinr variable AND this cog variable or would we be able to simplify it?

It will be another confusing step, but it's better than all sorts of modules and themes trying to implement these types of links and clashing all over the place. There's really nothing we can do about it. It's not perfect, but it's WAY better than the current situation.

nomonstersinme’s picture

Status: Active » Postponed

good point. i have it working now seems nice. i guess we should postpone this for now...

moonray’s picture

Status: Postponed » Closed (won't fix)

Not going to happen in D6. Closing.