User tests: Successful: Unsuccessful:
Pull Request for Issue #22154, #19827
Do not show Batch action in the toolbar if batch action is not possible.
Earlier - Batch button is displayed in the toolbar but "Process" button is hidden when filtered by trash or menu type is not selected.
After this patch - The Batch button is only displayed when some menu type is selected and filtered by states other than trashed.
NA
Status | New | ⇒ | Pending |
Category | ⇒ | Administration com_menus |
Labels |
Added:
?
|
I like the idea of hiding a button if there are no items where the function can be applied.
I have made a similiar proposal some time ago. https://issues.joomla.org/tracker/joomla-cms/20559. It was a discussion on how and when showing buttons in the toolbar and it should be a general solution for all buttons.
But I don't like hiding buttons if no items are selected.
When I teach new adminitrators who are nor experienced in managing websites, I am sure that they never try selecting items to get a surprise toolbar and see what they can do.
I don't mean to hide the button based on selection of rows. It is depending on the active filters (menutype + state)
Why don't we allow batch actions when filter is set to trashed?
Yes it works and I too like the idea, showing buttons only if they can be applied. I think if we do that for one button, it should be made for all butttons and everywhere. Or do you think it is possible only here?
EDIT: @SharkyKZ indeed
@chmst Yes, this idea can be applied everywhere. I am using this concept in my extensions since long. Not sure if can be accepted in 3.x core.
@SharkyKZ @chmst Please see #22154 (comment)
hmm
I did not remark this when testing
Although I do reluctantly agree that the button may not show when filtering by trash, I am not sure it is a good idea to also make it depend on the menu type as we have a nice error in that case which makes sense and it keeps letting users know we can batch.
I change my test now to negative because of that.
I have tested this item
For the reason stated above.
I have tested this item
For the reason stated above.
@chmst some of us have been trying to do this for joomla for 4 years but everyone the concept of not showing a button if it cannot be used is mentioned it is shot down and blocked by one person. Progressive disclosure of actions is a ui pattern adopted by everyone except joomla all because maintainers are scared of one person
ROTFLOL
because maintainers are scared of one person
Just state directly it is because of me that this is not done, as if I could scare anyone here... and specially maintainers.
I suggest you complain —again— to OSM to try to get me fired if I scare people so much.
ROTFLOL again.
Haven't read Discussins 4 Years ago. But Today i hope Decisions are made by Arguments, which fits Joomla. In my Opinion the Target of Joomla has to be the non-Experienced User.
From my understanding, its okay to hide action buttons if that is not applicable. However, the argument by @infograf768 is valid, that we need to tell users that they need to filter the list in a specific way to get that action.
And further, I don't see a reason why trashed item cannot be batch processed neither do I understand it for menutype filtering. We may need to adjust the "move" target field. But that should be better.
PS: Irrespective of this debate here, I am going to change this PR the older way, viz. just hide the process button in the modal.
my 2ct here, not being an expert and not every day on this list. I've seen many exchanges on similar discussion related to show/hide buttons. Current settings is the buttons are shown in a contextual manner (actionable/non-actionable) such as the "Empty Trash" that shows-up only when filtering is on Trashed, however the "Empty Trash" is not showing-up when filtering is on All,
My personal preference would be that all buttons be visible but grayed-out when not-actionable, that would give you an immediate visual indication that you are in a non-actionable state. The UI draw back with this is that the toolbar is often taking 2 lines in your screen for non English languages.
As @SharkyKZ wrote:
We can perform batch operations on trashed items when filter is set to All, so it doesn't make much sense to add a limitation when filtering by trashed.
This is indeed a contradiction.
The code is in default_batch_body.php
and I would suggest to refactor this too.
basically we would only get 2 types of messages:
<p><?php echo JText::_('COM_MENUS_SELECT_MENU_FIRST'); ?></p>
Therefore we would be able to batch Trashed items (why not do it?) and the code would make sense and be simplified both for site and admin.
After all, batching trashed items makes no sense but that is the responsibility of the site admin to clutter the db...
The problem is not solved. I have a "trashed" filter and "Batch" buttons appears but even if you have menu items selected the modal message appears any way, saying "Filter the list by a state other than trashed or clear the filter."
I have tested this item
Can this be closed as new Feature doesn't go in J3 and J4 have this kind of Stuff?
its not a feature its a bug fix
Sorry that it took so long to respond. As this is a nice fix for Joomla, can you recheck why the test failed from @joomlaboat and have a look the remark from @infograf768. Also would be good to identify if the issue still exists in Joomla 4. In the meantime I'm closing this pr, when ready, please reopen again so we can make another round of testing. Thank you very much for your help making Joomla better.
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2022-03-28 07:48:19 |
Closed_By | ⇒ | laoneo | |
Labels |
Added:
?
Removed: ? |
I have tested this item✅ successfully on 28e30b0
Tks.
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/22178.