[2.0] Backend sections created by additional plugins

Discussion corner for Developers of Serendipity.
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

[2.0] Backend sections created by additional plugins

Post by yellowled »

So I have a day off and decided to start testing and adapting those plugins in additonal_plugins which create their own sections in the backend to 2.0. I kind of ran into an issue there which needs discussion.

The way we do layout in the 2.0 backend now, there are not many “generic classes” to use for layout purposes. In hindsight, that might not have been my wisest idea, although it is way better for making individual adjustments as well as writing a different backend theme without touching the markup.

The issue with this is that at least some of the additional_plugins which generate their own backend section would need layout styles as well. (I'm guessing it's more like “most of them” than “some”, but I have only tested one so far.) The question is how to best handle this.

The options I currently see are:

1. Include these styles in templates/2k11/admin/style.css, which will blow up that file significantly. Technically, this is bad because a lot of users won't even use most of the additonal plugins, yet the backend theme stylesheet would still include styles for them.

2. Rewrite templates/2k11/admin/style.css to provide and use generic layout classes which backend sections generated by additional plugins can use. I assume this would slow down the RC phase quite a bit since it could be a lot of work.

3. Have plugins which generate a backend section emit individual CSS (just like they do in the frontend). I don't think this is feasible since this CSS obviously would not work well with possible future backend themes, so it would need to be overwritten there.

4. Just ignore it. That would mean the backend sections generated by additional plugins would be styled according to their markup (adapted for 2.0) and the generic styles which already exist in templates/2k11/admin/style.css, but they would not get individual layout. I don't think this is a solution, but it might be a temporary option to not slow down backend development.

If anyone sees another option, please add to the list. Based on this list, I think the only viable options are 1 and 2, 1 being the obvious preference because it would not slow down developement (much). I also think the impact on style.css (in option 1) would be acceptable.

YL
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: [2.0] Backend sections created by additional plugins

Post by yellowled »

To illustrate Option 4 a little: This is how serendipity_plugin_pollbox (arbitrary choice to start with that one) looks if only the markup is adapted to 2.0 without additional layout styles.

https://www.dropbox.com/s/891ypfd4nb4p5 ... .13.04.png

YL
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: [2.0] Backend sections created by additional plugins

Post by Timbalu »

I know most (more simple) plugins will hit option #4. There is a slight chance, you will need to tweak this a little more with #2, creating (some) more generic layout classes, but I think that could also be done in later versions.

My experiences with dev staticpages showed, it can use most of the 2.0 backend classes, which proves the quality of your work(!), but there is also a need to use some unique styles for this plugin and there for sure will be other plugins too.
We already have the "css_backend" hook for this. So option #3 is my prefered choice in this case.
If someone (really?!) writes a new backend css layout, the one will have to overwrite these hooked-in classes in his admin style or admin user css. Or it is another major change like 2.0 and plugins will need an overhaul, like now.
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: [2.0] Backend sections created by additional plugins

Post by yellowled »

Timbalu wrote:but I think that could also be done in later versions.
That is of course true – we could use a mixture of reusable classes (there are some in the 2k11 backend theme) and styles just based on the markup for 2.0 and fine-tune the layout styles in 2.x. For many plugins, that's going to look similar to the screenshot I posted of pollbox.
Timbalu wrote:If someone (really?!) writes a new backend css layout
I don't believe many people will do that, although I remember onli saying he plans to do so. I just don't want to limit the possibility. You can see what happens if the possibilities to even do backend themes are limited in 1.x – not many people even attempted to write backend themes because the foundation was really hard to work with. We don't want to do that again.

YL
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: [2.0] Backend sections created by additional plugins

Post by yellowled »

Apart from a few ones I know have a complicated backend section (bayes, staticpage etc.), I have now tested all plugins listed in the issue at least briefly. That means I have installed them in a 2.0 backend and checked their backend sections. I have already adapted the markup in some cases.

Bottom line: Unless we delay the 2.0 release significantly, we're going to have to prioritize here.

This is going to be (as I always assumed) a ton of work. Most of the backend sections look “kind of okay-ish”, which basically means they are still usable if you're willing to consider an interface with no layout usable. My personal impression is that they all need major work to fit well into the 2.0 backend, but it might be that most of our users are actually content with it as long as “it works”.

Either way, due to the fact that I can't take the next few weeks off to work on this exclusively, I guess we're going to have to come up with a guideline which ones to fix first and postpone the rest for after the RC or even after the release … :(

Thoughts?

YL
onli
Regular
Posts: 2825
Joined: Tue Sep 09, 2008 10:04 pm
Contact:

Re: [2.0] Backend sections created by additional plugins

Post by onli »

Bayes in my eyes is perfectly fine. Sure, if we wanted to have it a s a core plugin, it should be adapted to look more like the other menus, and simply better. But right now it pretty much looks like before, but with 2k11-buttons. So quite alright.

We should probably prioritize to get all plugins working - if they worked before, so we broke them, and if they are not too old - and let the rest be handled by the plugin authors.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: [2.0] Backend sections created by additional plugins

Post by garvinhicking »

Hi!

I think we can live with some "oddities", I do think option #4 isn't too bad and agree with Timbalu.

We could still prioritize some "common" plugins to touch up. I think I saw a list from you somewhere, but can't find it right now, could you post it here? I think we could agree on a few plugins (maybe 3 or 4, not a lot) and gradually adapt the rest as time and user feedback allows.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: [2.0] Backend sections created by additional plugins

Post by yellowled »

onli wrote:Bayes in my eyes is perfectly fine.
I haven't even actually looked at bayes, but it's very well possible that I have a more critical definition of “perfectly fine”. :)

My inner perfectionist wants every plugin to have markup adapted to 2k11 and an individual, responsive layout for the backend section. That is not only not feasible in an acceptable period of time, but also inefficient. (I think it doesn't make sense to put a great amount of work into a plugin which is barely used like, say, serendipity_event_motm.)
onli wrote:We should probably prioritize to get all plugins working
To make this very clear, I have not tested most of the plugins sufficiently to make a statement if they do or don't work. My remarks are purely related to the visuals of their respective backend sections. To test if they actually still work, I definitely need you guys and/or users to help out with testing, there's just too many to do it alone.
garvinhicking wrote:I think I saw a list from you somewhere, but can't find it right now, could you post it here?
I have already adapted all current core plugins which create their own section in the backend as well of the following of the additonal_plugins (meaning: those are good to go, but their layout could be improved):

* serendipity_event_adminnotes
* serendipity_event_assigncategories
* serendipity_event_dbclean
* serendipity_plugin_pollbox

I also found some which don't even generate their own backend section (grep fail), so the remaining plugins to fix (visually) would be:

* serendipity_event_aggregator
* serendipity_event_backup
* serendipity_event_cal
* serendipity_event_categorytemplates
* serendipity_event_downloadmanager
* serendipity_event_faq
* serendipity_event_flickr
* serendipity_event_forum
* serendipity_event_freetag
* serendipity_event_guestbook
* serendipity_event_includeentry
* serendipity_event_linklist
* serendipity_event_motm
* serendipity_event_mycalendar
* serendipity_event_mymood
* serendipity_event_phoneblogz
* serendipity_event_popfetcher
* serendipity_event_sidebarhider
* serendipity_event_spamblock_bayes
* serendipity_event_staticpage
* serendipity_event_template_editor
* serendipity_event_todolist
* serendipity_event_userprofiles
* serendipity_event_wikilinks
* serendipity_plugin_twitter

Note that this list only includes plugins which create a nav item in the backend. There might be others which create a section of the backend that is “nested” somewhere in another section.

My suggestions to prioritize based on their (assumed) usage in the community are:

* serendipity_event_freetag
* serendipity_event_spamblock_bayes
* serendipity_event_staticpage
* serendipity_plugin_twitter

YL
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: [2.0] Backend sections created by additional plugins

Post by garvinhicking »

Hi!

I agree to your assessment. I'd probably add aggregator and guestbook as close runners-up.

For popfetcher and categorytemplates I think those two should have no relevant specific output...

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: [2.0] Backend sections created by additional plugins

Post by yellowled »

Kind of a problem here: the suggested plugins are pretty complicated for me to understand, meaning I'm going to need some kind of help deciphering the code.

Almost all of these add their own CSS and/or JS, some of them even use smarty templates for their backend section. Also, these are examples where only altering the code which needs to be altered between 1.x and 2.x can get really messy. It's like I'm looking at the plugin code and I don't even know where to begin. :(

YL
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: [2.0] Backend sections created by additional plugins

Post by Timbalu »

For the guestbook I will have a look, if that helps, after the main things for dev staticpages have been solved (which is near). Though I do think the main time for having a guestbook is over... :wink:
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: [2.0] Backend sections created by additional plugins

Post by garvinhicking »

I'll try to help. Maybe for the time being just install the plugin and see if it works at all, and then go from the HTML output on the page and you can ask here where to change that HTML or JS specifically and we can give a hand? Don't know how else to solve this...
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: [2.0] Backend sections created by additional plugins

Post by yellowled »

garvinhicking wrote:Maybe for the time being just install the plugin and see if it works at all, and then go from the HTML output on the page and you can ask here where to change that HTML or JS specifically and we can give a hand?
Well, the issue is not so much if it works – if any additional_plugin would not work in 2.0, I really can't do much about it anyway.

I think what makes these really complicated for me is that they are … how do I put this? I'm not experienced in reading native PHP code, especially not plugin code.

In at least some of these, the backend output is in functions, there is not one block of backend section markup. That makes it kind of complicated.

Also, some plugins tend to switch between HTML generated using PHP (using “echo”) and just plain HTML mixed in with the PHP code (e.g. using “?>” and “<?php” over and over). This makes it harder (at least for me) to a) read and understand and b) modify the code, especially with the necessity to add a 1.x/2.x switch. Also, I'm supposed to only edit/switch the parts of the markup which actually need to be different in 1.x/2.x, which also adds to it being harder than with the simpler plugins.

Last, some of these (I think static pages and bayes) use smarty templates at least for parts of their backend section. I'm not sure how to implement the version switch there – should it be used in the .tpl files somehow or should we just have seperate .tpl files for 1.x/2.x?

Then again, I'm not really sure how to make this easier (without rewriting the whole plugin first) for me, either. :?

YL
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: [2.0] Backend sections created by additional plugins

Post by yellowled »

Ian, does it even make sense for me to start working on static pages or should I wait until you finally commit your changes to additional_plugins?

YL
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: [2.0] Backend sections created by additional plugins

Post by Timbalu »

That depends where you want to work. I would not recommend to take the current released 4.07 version, since my dev version has improved much and that would foil my work on it.
If that is not the case and you are talking about the current dev 4.21 version, we should close up privately to discuss things first you might want to change.
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Post Reply