Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Category IDs are not consistent #14598

Open
pepebe opened this issue Jun 5, 2019 · 18 comments

Comments

@pepebe
Copy link
Contributor

commented Jun 5, 2019

Bug report

Summary

The numbers show on the right side of category names listed under templates, tvs, chunks, snippets and plugins are not consistent with the category ids stored in the database

Step to reproduce

Compare categories listed in the elements tree with the general category list.

Observed behavior

Category List at bottom of elements:

Screenshot 2019-06-05 10 05 38

Example: Schneidscheiben (20) (identical to the value in the database)

TV List showing TVs ordered by category

Screenshot 2019-06-05 10 05 21

Example: Schneidscheiben (15) and Produkte doesn't even has an ID

Expected behavior

The id shown should be euqal to the id used in the database.

Environment

I guess this effects all versions, tested on 2.7.1

@Ibochkarev

This comment has been minimized.

Copy link
Contributor

commented Jun 5, 2019

@pepebe The value in brackets next to the TV indicates how many TV parameters are in the folder
image

@Ruslan-Aleev

This comment has been minimized.

Copy link
Contributor

commented Jun 5, 2019

Although @pepebe is right, visually it is confusing, because for the remaining elements in brackets is specified id.
Perhaps it makes sense to change the brackets for category, for example:

cat

cat_2

@Jako

This comment has been minimized.

Copy link
Collaborator

commented Jun 5, 2019

To make it more obvious we could use [2 TVs], [2 Elements], [2 Children].

@pepebe

This comment has been minimized.

Copy link
Contributor Author

commented Jun 5, 2019

Its the number of elements? Wow. I didn't even think about this.

From a consistency point of view I'd expect the number in brackets to be the elements id.

To be honest, I don't care how many elements are inside a category. If anyone does, please give a real world example that explains why this is important information.

@Ruslan-Aleev

This comment has been minimized.

Copy link
Contributor

commented Jun 5, 2019

@pepebe Maybe to find out how the list will unfold? The information is not very useful, but let it be.
And if you want to know exactly the id categories - they are listed in the list of categories in brackets.

@pepebe

This comment has been minimized.

Copy link
Contributor Author

commented Jun 5, 2019

Today I have learned the following things:

  • name (id) = a category, may have subcategories or not. (id) equals number of total elements directly below it.
  • name = a category, may have subcategories or not. Does not have any elements directly below it.

I still can't see the need to know how many elements are inside a category.

A single real-world example why this is useful would satisfy my curiosity.

I might be a bit biased because I spend an hour retrieving a list of TVs from the database looking for the wrong category id, but I don't see any reason why the consisent use of ids should be overruled in this case.

@JoshuaLuckers

This comment has been minimized.

Copy link
Collaborator

commented Jun 5, 2019

The amount of elements inside a category is useful to me. I use it as a quick indicator to make sure new elements are synced from a dev to a live environment.

@Ruslan-Aleev

This comment has been minimized.

Copy link
Contributor

commented Jun 5, 2019

why the consisent use of ids should be overruled in this case

Not certainly in that way.
The element identifier (categories, for example) are listed in the list of elements (categories, for example), there is no change of logic.

But since the amount in categories and id indicated in the same way, this is confusing.

cat_info

@pepebe

This comment has been minimized.

Copy link
Contributor Author

commented Jun 5, 2019

Thats my point. The number should always be the id of the element. Categories does it right.

@sottwell

This comment has been minimized.

Copy link
Contributor

commented Jun 5, 2019

It actually only shows the number of children. If some elements are in sub-categories they are not counted.

@Ruslan-Aleev

This comment has been minimized.

Copy link
Contributor

commented Jun 5, 2019

Maybe it makes sense to display both the amount and the id so that there is no confusion?

For example:
cat_new
Or simple:
cat_new_2

@pepebe

This comment has been minimized.

Copy link
Contributor Author

commented Jun 7, 2019

Before be find a solution for a problem nobody cares about. Let's find at least a single example why it is useful to know the number of direct descendants inside a category.

Somebody "might" find it useful is not a reason the break apart from consistency. By the very same reasoning, you could do the same thing to resources and I guess most of us will agree that although this would be useful in a few cases, it would be total overkill.

I'm aware that knowing the ID of a category has a very limited use case, but at least I have one and consistency would be another.

@JoshuaLuckers

This comment has been minimized.

Copy link
Collaborator

commented Jun 7, 2019

I am in favour of consistency and knowing the ID of resources, elements and categories is very useful.
Showing the category ID instead of the element count would be more consistent with how container and child resources are displayed.

However, I also think having numbers of how many elements are under a "leaf" is useful and should be visible somehow.

@Bruno17

This comment has been minimized.

Copy link
Contributor

commented Jun 7, 2019

to have both could be useful, like @Ruslan-Aleev posted.
perhaps like this:

my category [id](count)

@JoshuaLuckers

This comment has been minimized.

Copy link
Collaborator

commented Jun 7, 2019

The tree(s) already look very messy and busy and adding more metadata would make it even worse.
Do we really want to show metadata like id's and element count all the time?

I wouldn't mind if the "number of elements" was only visible on hover/focus.

@Ruslan-Aleev

This comment has been minimized.

Copy link
Contributor

commented Jun 7, 2019

Yes, a very good option with a tooltip of the count of elements on hover, as suggested by @JoshuaLuckers

@OptimusCrime

This comment has been minimized.

Copy link
Contributor

commented Jun 13, 2019

I fail to see how the ID of a category is ever relevant. Can we just hide these IDs?

@Mark-H

This comment has been minimized.

Copy link
Collaborator

commented Aug 20, 2019

I'm with @OptimusCrime that category IDs are totally irrelevant and am inclined to reject #14605 in its current state.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
9 participants
You can’t perform that action at this time.