Support » Plugin: Code Snippets » "Deactivate" button in Edit Snippet page

  • Resolved GermanKiwi

    (@germankiwi)


    I have a feature request. It would be very helpful if the Edit Snippet page (ie. the page you see when editing a particular snippet) had a Deactivate/Activate button somewhere, so I could easily disable/re-enable a snippet when I’m editing it.

    Currently I have to go back to the “Manage” overview page to deactivate a snippet, which is less than ideal. 🙂

    http://wordpress.org/plugins/code-snippets/

Viewing 14 replies - 1 through 14 (of 14 total)
  • Plugin Author Shea Bunge

    (@bungeshea)

    This is possible, but I kinda abandoned the idea with the introduction of the ‘Save & Activate’ button. If this would still be useful to you though, I might look at introducing the feature in an addon plugin.

    Thread Starter GermanKiwi

    (@germankiwi)

    Well, the Save & Activate button is good for activating a snippet, but there’s no way to deactivate it again from within the Edit Snippet page, and that’s what I’d like to be able to do.

    Kinda like how I can go to the “Edit Post” or “Edit Page” page and change its status from Published to Draft right there.

    Adding this functionality via a separate plugin would seem a bit of an overkill to me 🙂 – couldn’t you just add a simple button at the bottom of the Edit Snippet page called “Deactivate”, which is only there when the snippet is active?

    Plugin Author Shea Bunge

    (@bungeshea)

    What, like ‘Save & Deactivate’? That wouldn’t be hard to do, and I almost considered it last time, but the OP from that thread didn’t think it was necessary. If you find a use for it, then I’m fine to add it.

    Thread Starter GermanKiwi

    (@germankiwi)

    Yeah exactly – “Save & Deactivate”. Maybe you could have just one button, which acts as a kind of toggle switch – if the snippet is already active, then the button is “Save & Deactivate”, and if it’s already deactivated, then the button is “Save & Activate”. Nice and simple. 🙂

    Plugin Author Shea Bunge

    (@bungeshea)

    This has been added in the upcoming version. Thanks for the suggestion!

    Thread Starter GermanKiwi

    (@germankiwi)

    Awesome, thanks a lot! 🙂

    Thread Starter GermanKiwi

    (@germankiwi)

    BTW, another idea I just had, would be to make the title of each snippet, on the “Manage” overview page, into a clickable link that takes you to the Edit Snippet page. The same as how Posts and Pages work, where you can click on the title of the post/page to get to the Edit page. That would make it a tiny bit easier to get there, instead of having to pause for a second to look for the “Edit” link which is sandwiched underneath in the middle of “Deactivate | Edit | Export | Delete”. 🙂

    Plugin Author Shea Bunge

    (@bungeshea)

    Thanks for another great suggestion; I’ve added this to 1.9 also.

    Thread Starter GermanKiwi

    (@germankiwi)

    Thx!

    Plugin Author Shea Bunge

    (@bungeshea)

    Would you be interested in delete and export buttons on the edit snippet page as well?

    Thread Starter GermanKiwi

    (@germankiwi)

    Yes – that’s an excellent idea!

    Thread Starter GermanKiwi

    (@germankiwi)

    Just updated to 1.9 today – there are a ton of great improvements there!! 🙂 I love the new clickable titles, and how the “Deactivate | Edit | Export | Delete” row only shows on hover.

    One new thing which just occurred to me is this: I think it’s a bit too easy to click the “Save Changes” button when creating a new snippet, rather than the “Save Changes & Activate” button. This results in the snippet being created but not activated. I’ve done this a few times already – just clicked the “Save Changes” button, and been completely oblivious to the fact that my new snippet was not actually active!

    It’s because the “Save Changes” button is in the default location the left and is also in blue, while the other button is in white and not so noticeable.

    I myself would prefer to switch these two buttons around – have the “Activate” button as the one on the left, in blue, and the other one on the right in white. I would imagine it’s more common for people to want to save AND activate a new snippet at the same time – right? Or do you feel that most people would normally just create a new snippet but not want to activate it? What do you think?

    My only other thought now is to maybe make the deactivated snippets a little more distinctive on the Manage page – currently the background of a deactivated snippet is a slightly different shade of grey but it’s hard to see the difference unless you really look close – although I know this is also how deactivated plugins look on the Plugins page! 🙂 Not sure what’s best to do there. But that’s just my impression, that it’s hard to see that any are deactivated due to the background colour being almost identical. 🙂

    Thanks for all the improvements!!

    Plugin Author Shea Bunge

    (@bungeshea)

    I’m glad you like the new version 🙂

    The Save Changes button is shown as the primary button to be consistent with when the snippet is deactivated. I can certainly see that is it might be something that some people would want changed.

    I’m thinking of introducing a preferences page that will let you configure things like this. Sort of how Gmail lets you choose to use the ‘Send & Archive’ button in their preferences.

    I don’t think that changing the styling of the snippets table is really something I need to do at the moment, considering that it matches how WordPress works, and in MP6/WordPress 3.8, there is already a bigger visual difference between activated and deactivated snippets.

    Thread Starter GermanKiwi

    (@germankiwi)

    A preferences page like that sounds like a good idea to me! 🙂

    You’re right about the styling – in fact after I wrote my previous message above I was wondering if the upcoming design changes with MP6 would make this an irrelevant issue, and I think that it will.

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘"Deactivate" button in Edit Snippet page’ is closed to new replies.