modxcms / revolution

MODX Revolution - Content Management Framework
https://modx.com/
GNU General Public License v2.0
1.36k stars 529 forks source link

Normalize the attribute polarity #9523

Open modxbot opened 11 years ago

modxbot commented 11 years ago

everettg_99 created Redmine issue ID 9523

I don't know how else to describe this, but it's extremely bewildering to have some resource attributes set one way, and similar attributes set in exactly the opposite way.

Specifically, these two are polar opposites:

$this->set('show_in_tree',false);
$this->set('hide_children_in_tree',true);

I think "show" is the better verb here and more semantically correct, so I suggest the following attribute names:

Tolerable also would be the following:

Either way, these names must be consistent. These need to be nipped in the bud: confusion here festers and ends up spreading confusion throughout all the code built on it.

pbowyer commented 9 years ago

It's a good point for a consistent UI. Suggest tagging for MODX 3.X or NEXT.

whitebyte commented 9 years ago

There is another issue of the same kind. It's a plugin activation-deactivation checkbox vs resource publishing-unpublishing. Checked checkbox for resource published field shows that this resource is active while checked checkbox for a plugin shows that this plugin is inactive. I think the general schema "true" = "on", "false" = "off" should be respected.

Same goes to "hidemenu", which actually should be "showmenu".

SnowCreative commented 8 years ago

OK, I'm all for logic, but in this case, these things have never bothered me because they conform to how I actually think. As a default, I always want resources to appear in the tree, so hiding children is something I want to 'turn on' rather than 'turn off' (i.e., turn off 'show children in tree'). See what I mean? Same thing for menus. I want stuff in the menus by default, so I may want to turn this off by hiding them. That's an action, so I want a checkbox that says "hide from menus", like it does now, not one that says "show in menus" that I have to turn OFF. It would work fine that way, of course, it's just not how I think. Hiding is an action, not an undoing of something, as is showing something that is normally hidden. The fact that the terminology developed the way it did shows how people actually think about these actions rather than conforming to an abstract "logical" (i.e., machine-like) model of how to name actions.

Ruslan-Aleev commented 6 years ago

A few comments from another issue:

TV: For TV there is a setting "Allow Blank" (the logic is opposite), it is more correct to make a simple checkbox "Required TV".

From TV with types "date" there is a setting "Hide time option for user:", although it is more logical to call this setting "Show time option for user:"

Resource: Checkbox "Published" works on this principle: Selected (active) - Resource published (active).

But the Checkbox "Hide From Menus" works in reverse way: Selected (active) - The resource is hidden from the menu (NOT active).

And this is confusing, especially when they are located nearby. It is more appropriate in terms of UX / UI to put a checkbox - "Show in the menu", it seems to me.

Especially it will attracts attention in the design of MODX3, because there the orange color of the checkbox shows the "non-standard" behavior of the resource, although the display of the resource in the menu is the "standard" behavior of the resource.

p.s. By the way, in the concept design for MODX3 is the checkbox "Show in the menu":

resource-edit-settings