[2.0] category-bar in editor

Discussion corner for Developers of Serendipity.
Post Reply
bernd_d
Regular
Posts: 466
Joined: Thu Jun 03, 2010 9:28 am
Contact:

[2.0] category-bar in editor

Post by bernd_d » Tue Jun 17, 2014 7:46 pm

With current git-builds, there is a new category "bar" between topic and entry. In my case, i don't use categories, so this bare is useless and needs just space.

I think, there should be an query to include this line only, if there are categories available/set.

The same query could be made for the category-button, which is on top left of the preview-button, this is in my case useless too.

User avatar
yellowled
Regular
Posts: 7078
Joined: Fri Jan 13, 2006 12:46 pm
Location: Eutin, Germany
Contact:

Re: [2.0] category-bar in editor

Post by yellowled » Tue Jun 17, 2014 9:15 pm

bernd_d wrote:The same query could be made for the category-button, which is on top left of the preview-button, this is in my case useless too.
I guess we could implement this as a config option „Use categories?“ (Y/N) if no one sees any side effects.

YL
amazon Wishlist - Serendipity-Podcast (German only, sorry)

User avatar
garvinhicking
Core Developer
Posts: 30020
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: [2.0] category-bar in editor

Post by garvinhicking » Wed Jun 18, 2014 1:33 pm

I don't think having an option for this very useful. Couldn't the output simply be changed / smallified when the category count is 0?

(I don't actually know which "category-bar" this is referring to. The simple dropdown?)
# 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/

User avatar
yellowled
Regular
Posts: 7078
Joined: Fri Jan 13, 2006 12:46 pm
Location: Eutin, Germany
Contact:

Re: [2.0] category-bar in editor

Post by yellowled » Wed Jun 18, 2014 1:52 pm

garvinhicking wrote:I don't think having an option for this very useful. Couldn't the output simply be changed / smallified when the category count is 0?

(I don't actually know which "category-bar" this is referring to. The simple dropdown?)
Since we moved category selection to a modal popup, you wanted a way to still see which categories an entry is assigned to once the modal popup is closed, remember? That line which lists the categories (between entry title and entry body in the entry editor) is what this is referring to.

It would actually kind of make sense to hide that list if it's empty because then it would also be hidden as long as there are no categories assigned yet. I'm just not sure how to implement that (yet).

YL
amazon Wishlist - Serendipity-Podcast (German only, sorry)

User avatar
yellowled
Regular
Posts: 7078
Joined: Fri Jan 13, 2006 12:46 pm
Location: Eutin, Germany
Contact:

Re: [2.0] category-bar in editor

Post by yellowled » Wed Jun 18, 2014 1:56 pm

yellowled wrote:It would actually kind of make sense to hide that list if it's empty because then it would also be hidden as long as there are no categories assigned yet.
Strike that, it would not make sense. That way, you could easily overlook that no category has been assigned yet.

However, since we're planning on adding the option to have a user.css for the backend, people like Bernd who do not use categories could easily hide this bar using that user.css. Wouldn't that be the best option?

YL
amazon Wishlist - Serendipity-Podcast (German only, sorry)

User avatar
garvinhicking
Core Developer
Posts: 30020
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: [2.0] category-bar in editor

Post by garvinhicking » Wed Jun 18, 2014 3:10 pm

Hi!

Maybe in a case where no categories exist, in the entries.tpl of the backend:

Code: Select all

{if count($entry_vars.category_options) > 0}
    <div id="category_list" class="clearfix">
        <h3>{$CONST.CATEGORIES}</h3>

        <ul class="plainList"></ul>
    </div>
{/if}
(untested)

That way, when no categories exist, this element wouldn't even exist? We could add the same if-check around the other place where the category-dropdown/selection is emitted? I believe, when one has no categories, we don't need to expose this selection there?!

Or do you think at that place we would need an unobtrusive info-icon with a bubble/tooltip that tells people "Category selection will appear here once you add categories to your blog"?
# 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/

User avatar
yellowled
Regular
Posts: 7078
Joined: Fri Jan 13, 2006 12:46 pm
Location: Eutin, Germany
Contact:

Re: [2.0] category-bar in editor

Post by yellowled » Wed Jun 18, 2014 3:37 pm

garvinhicking wrote:That way, when no categories exist, this element wouldn't even exist?
Yeah, but that gives us a (albeit rare) edge case where people have not created categories (yet), but want to use categories. I'm not sure if it would be good to suppress the extra category list and the icon in that case. Might irritate (new) users.
garvinhicking wrote:Or do you think at that place we would need an unobtrusive info-icon with a bubble/tooltip that tells people "Category selection will appear here once you add categories to your blog"?
That wouldn't really be better than emitting the “No categories” text. :)

YL
amazon Wishlist - Serendipity-Podcast (German only, sorry)

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

Re: [2.0] category-bar in editor

Post by Timbalu » Wed Jun 18, 2014 3:46 pm

I am not really sure I like the idea of hidden cats, if not set yet. They are a hint that using categories is quite a good idea. For the rare ones like Bernds request, the user.css hiding should do, IMHO, or we give a button to hide this part via js, but still leave the cat button on top present.
Regards,
Ian

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

User avatar
yellowled
Regular
Posts: 7078
Joined: Fri Jan 13, 2006 12:46 pm
Location: Eutin, Germany
Contact:

Re: [2.0] category-bar in editor

Post by yellowled » Wed Jun 18, 2014 4:22 pm

Timbalu wrote:For the rare ones like Bernds request, the user.css hiding should do, IMHO, or we give a button to hide this part via js, but still leave the cat button on top present.
Seriously, that will be a few very simple lines of CSS. There is no need to add buttons or anything for that. If you don't want to use categories and the line/button bother you, add

Code: Select all

#select_category,
#serendipityEntry #category_list {
    display: none;
}
to the backend-user.css. I think that should suffice. It's also quite flexible – you can only hide the extra list but keep the button.

YL
amazon Wishlist - Serendipity-Podcast (German only, sorry)

Post Reply