User tests: Successful: Unsuccessful:
Most users do not understand what the refresh button in categories does.
Just now got an issue in a german user group, where a user tried to publish his trashed categories via the button "rebuild".
If filter.trashed is on, the refresh button is hidden
Note: I would like to remove the "new" button in trashed lists too - who wants to write fot the trash?
Trash one or more categories
Inspect the view categories before (button is visible) and after patch (button rebuild ist ont visible).
Status | New | ⇒ | Pending |
Category | ⇒ | Administration com_categories |
I think it works also in the trashed view and it is a user error. But why not remove it here and don't make users think (wrong)?
If the user thought that rebuild would magically move there trashed categories back to being published I think that same user would think the rebuild button would do that wherever it is.
We cant fix stupid - my 2c
I have tested this item
When I tested this pr yesterday I also thought that hiding the button is not correct. After a night's sleep I think differently.
We cant fix stupid, but we can make it easier for people.
Emty Trash
work as intended when the filter is not trashed, but we only show it when the filter is trashed
. I think we do that because we want to show the user only the features that are important to him for the moment.
Someone who wants to rebuild articles and categories will not open the trash view. Therefore, it makes sense in my opinion to hide the button here.
Labels |
Added:
?
|
Title |
|
Title |
|
@brianteeman you are right, in the code, it is a "refresh" button.
Emty Trash
work as intended when the filter is not trashed, but we only show it when the filter istrashed
. I think we do that because we want to show the user only the features that are important to him for the moment.
It has nothing to do with "features that are important at the moment". Rather, it is designed as a safeguard to ensure the user actually reviews what is in the trashed state (think of it as your operating system's Trash or Recycle Bin) before permanently deleting something. There are no other system limitations on using the empty trash button, but without that existing check it is too easy for a user to do something that causes permanent change on their site (executing DELETE queries on their database). Hiding action buttons in general simply because "why should a user do this while the trashed filter is active" IMO makes little sense.
My opinion is: Of course it does not make much harm if the button is there or not.
But every little helps to make a system easier - every single button which needs NOT to be read and NOT to be tabbed. I am rather sure that no user and no developer will miss the button at this place or has ever used it - except if he thinks that this could reactivate the trashed Elements.
By that argument you could also say the only buttons that should be on the toolbar when in a trashed filter is the empty trash and publish buttons because "it makes no sense for a user to be able to create a new item or edit something that has been deleted". Or if you wanted to be correct about things, the rebuild button should only be visible when all items are viewed because it acts on everything regardless of state.
I don't necessarily agree with arbitrarily creating this type of restriction on actions you can do based on the active state filter. If there are going to be restrictions, they need to be in the user's best interest (as is the case with the empty trash button now because it deliberately requires an extra step before permanently deleting content), otherwise saying "you must have this state active to perform this action" creates the potential for unnecessary confusion. The better option, that has continually been shot down over the years, is a context relevant toolbar akin to Gmail, but since that has continually been shot down that's never going to be an option.
I have tested this item
Deleted categories and set filter to trashed. (Rebuild is there)
Apply patch. Clear cache.
Rebuild button disappears. Reappears when I set filter to trashed.
This might be reason: !$this->state->get('filter.published') != -2)
I have tested this item
Deleted categories and set filter to trashed. (Rebuild is there)
Apply patch. Clear cache.
Rebuild button disappears. Reappears when I set filter to trashed.
This might be reason: !$this->state->get('filter.published') != -2)
I have tested this item
This is working the wrong way round. So that when you do the patch and clear cache the rebuild disappears in all cases apart from when in trash
In the code you have a double negative
if ($canDo->get('core.admin') && !$this->state->get('filter.published') != -2)
So if first case is true and not filter is not equal to trashed
Should be either
if ($canDo->get('core.admin') && $this->state->get('filter.published') != -2)
or
if ($canDo->get('core.admin') && !$this->state->get('filter.published') == -2)
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2019-10-05 08:58:12 |
Closed_By | ⇒ | chmst |
Does rebuild work as intended when the filter is trashed. If it does then imho this was simply user error