? Pending

User tests: Successful: Unsuccessful:

avatar chmst
chmst
23 May 2018

Many list views in backend can be empty. As for example articles, menu items, contacts ....
Nevertheless there is always a full set of action buttons: publish, unpublish, batch, trash. But none of these has a function as long as the list is empty.
So only the one button "new" is needed, all the other buttons are useless.
This patch shows for the menu-items view how it could be made easier in a very simple way.
It is also a step towards accessibility as there are less elements to be tabbed or read by a screen reader.

This could be made for many list views: articles, contacts, user notes and so on if this is acepted.

Testing Instructions

Have a look on a empty Menu items list

Actual result

empty-list-view-before

After Patch

empty-list-view-after

Documentation Changes Required

yes

avatar chmst chmst - open - 23 May 2018
avatar chmst chmst - change - 23 May 2018
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 23 May 2018
Category Administration com_menus
avatar chmst chmst - change - 23 May 2018
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - edited - 23 May 2018
avatar Quy Quy - change - 23 May 2018
Title
Show only the new-button if there are no items.
[4.0] Show only the new-button if there are no items.
avatar brianteeman
brianteeman - comment - 23 May 2018

With the proposed new UI and a combined actions button is this even needed

avatar carlitorweb
carlitorweb - comment - 23 May 2018

We need to extend this for all components for sure

avatar carlitorweb
carlitorweb - comment - 23 May 2018

Tested here ok. Waiting for the remove of whitespace tabs

avatar carlitorweb
carlitorweb - comment - 23 May 2018

@Quy a question about this, do you think ToolbarHelper class can have a param in each method (where it makes sense to check if there are elements for actions like publish, delete etc) for check this? In this way when you do ToolbarHelper::publish(....) he will check first if the actual view has items where these action have sense.

avatar brianteeman
brianteeman - comment - 23 May 2018

please dont misunderstand me - i am a massive fan of progressive disclosure of buttons and I have tried with others to add this to joomla for 4 years. But in the new proposed toolbar there will just be a new and an actions button so I dont believe it is needed anymore

avatar carlitorweb
carlitorweb - comment - 23 May 2018

@brianteeman really? where I can see this you said?

avatar brianteeman
brianteeman - comment - 23 May 2018
avatar carlitorweb
carlitorweb - comment - 23 May 2018

Thank you @brianteeman . With a fast look, still relevant this PR IMO, is a button and a dropdown less

avatar chmst
chmst - comment - 24 May 2018

@Quy thank you - I've commited the changes.

avatar chmst
chmst - comment - 24 May 2018

Now as I have seen the new Screen, I think that also Elements like Search tools can be hidden on a empty list, because they cannot give a result. This could be made with the same simple condition.

avatar mbabker
mbabker - comment - 24 May 2018

I think that also Elements like Search tools can be hidden on a empty list, because they cannot give a result

You can't hide search tools on an empty screen. If you search/filter for something that yields no search results, you'd hide the search bar and make it impossible to clear the filters without logging out. This bug already exists in core (in fact we fixed one of those with 3.8.8).

avatar chmst
chmst - comment - 24 May 2018

@mbabker you are right - if filters are not empty, it's another use case.

avatar Quy
Quy - comment - 24 May 2018

Rebuild is an independent action from the other buttons. Should it be hidden too?

avatar chmst
chmst - comment - 25 May 2018

So it seems that it is better to ask for each or element if it makes sense. If there are no items at all, it is not necessary. So @carlitorweb has already mentioned the ToolbarHelper Class, which could be used for this purpose.

@Quy a question about this, do you think ToolbarHelper class can have a param in each method (where it makes sense to check if there are elements for actions like publish, delete etc) for check this? In this way when you do ToolbarHelper::publish(....) he will check first if the actual view has items where these action have sense.

avatar chmst
chmst - comment - 28 Nov 2018

Closed as there are other solutions

avatar chmst chmst - change - 28 Nov 2018
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2018-11-28 23:26:43
Closed_By chmst
avatar chmst chmst - close - 28 Nov 2018

Add a Comment

Login with GitHub to post a comment