? ? Pending

User tests: Successful: Unsuccessful:

avatar PhilETaylor
PhilETaylor
27 Apr 2021

Summary of Changes

Continuing the theme of Empty State Design, remove redundant, already disabled and non-sensible buttons from toolbars when in an Empty State leaving just the New button.

In an Empty state design you are trying to guide the user to their next step, presenting disabled/greyed out buttons and buttons that cannot yet be used goes against that.

Testing Instructions

Apply PR, create Empty States by deleting things, look at tool bars

Actual result BEFORE applying this Pull Request

Before this it could be as bad as these examples (Categories example is resolved in #33286)

Screenshot 2021-04-27 at 19 52 26

Screenshot 2021-04-27 at 19 53 15

Expected result AFTER applying this Pull Request

Screenshot 2021-04-27 at 19 53 51

Screenshot 2021-04-27 at 19 53 30

Documentation Changes Required

none

//cc @Bakual

avatar PhilETaylor PhilETaylor - open - 27 Apr 2021
avatar PhilETaylor PhilETaylor - change - 27 Apr 2021
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 27 Apr 2021
Category Administration com_banners com_contact com_content com_messages com_newsfeeds com_tags com_users
avatar Bakual
Bakual - comment - 27 Apr 2021

I would actually handle this the same as an any empty list, not differing if it's empty because of filters or empty because no items exist at all. So either hide it always when $this->items is empty (as it's useless then as well) or always show it.

But that is a personal opinion. I can see why you want it differently. In the end it's a UX question where I have no clue to begin with ?

avatar PhilETaylor
PhilETaylor - comment - 27 Apr 2021

Joomla had a UX Project at one point ... hahahaha

not differing if it's empty because of filters or empty because no items exist at all

I would say the complete opposite :) :) It should differ, that's one of the reasons we changed what's in the body of the page to make it more user friendly, so that it DOES differ

avatar ReLater
ReLater - comment - 27 Apr 2021

The rebuild button can be helpful if you don't see any categories in the backend for whatever reason to repair the database table. For me it's not useless in all cases.

The same for menus.

to make it more user friendly

Pure matter of opinion, just BTW. A disabled button shows a possible feature that is not active at the moment. Instead of seeing it you send the people to complicated and/or endless docs pages. How many people used these for newbies confusing help screens in the past?

avatar PhilETaylor
PhilETaylor - comment - 28 Apr 2021

Pure matter of opinion, just BTW. A disabled button shows a possible feature that is not active at the moment. Instead of seeing it you send the people to complicated and/or endless docs pages. How many people used these for newbies confusing help screens in the past?

You totally miss understand the concept and application of an empty state. Please go and do some research on the subject.

How many people used these for newbies confusing help screens in the past?

The quality of the Joomla documentation is outside the scope of this PR, and while I agree in some areas it is shocking, its best to provide somewhere where a journey can start, than nothing at all.

Most of Joomla is confusing and undocumented, there are lots and lots of tiny switches and options that have big effects on a site that are undocumented. Again outside the scope of this PR.

The rebuild button can be helpful if you don't see any categories in the backend for whatever reason to repair the database table. For me it's not useless in all cases.

The rebuild button is TOTALLY USELESS in the case when an empty state is shown.

The empty state for CATEGORIES will ONLY be shown if there ARE NO CATEGORIES in the database table (checked by running SQL) for the filtered extension.

No matter how many times you press the Rebuild button - It will never "repair the database" and show a category in this instance because, to get the Empty State to show THERE ARE NO CATEGORIES in the db (edit: for the filtered extension) - checked by running a SQL query.

You cannot magically "find" categories by pressing rebuild, because NO CATEGORIES EXIST in the database for the filtered extension.

The rebuild button is only useful if there are actually db rows for the given extension filter - but then an Empty State would not be showing, because there are "some rows"

avatar brianteeman
brianteeman - comment - 28 Apr 2021

Factually untrue. There are rows in the db just not for that extension

avatar PhilETaylor
PhilETaylor - comment - 28 Apr 2021

There are rows in the db just not for that extension

Correct. This is what I said. This is what is meant by the phrase "for the filtered extension." in the sentence:

The empty state for CATEGORIES will ONLY be shown if there ARE NO CATEGORIES in the database table (checked by running SQL) for the filtered extension.

and

You cannot magically "find" categories by pressing rebuild, because NO CATEGORIES EXIST in the database for the filtered extension.

avatar PhilETaylor
PhilETaylor - comment - 28 Apr 2021

The rebuild button is TOTALLY USELESS in the case when an empty state is shown.

If you were to use a Rebuild button on an Empty State it would only be messing with Categories for other extensions, and would never change the empty state for this filtered extension. It would be more confusing, as the changes it makes would only be reflected if you went to those other extensions categories pages (which would not be empty states) to see the changes.

No matter how many times you press Rebuild button on an empty state category view, you will NEVER see a change and the empty state will NEVER change magically to show categories for that filtered extension.

avatar Quy
Quy - comment - 28 Apr 2021

With no categories or 1 unpublished category, do you know why there is no New/Add button? It is happening with News Feeds too. Is it dependent on another PR?

33380

avatar brianteeman
brianteeman - comment - 28 Apr 2021

Thats a problem because you do NOT need to have an existing category before you can create a banner

avatar PhilETaylor
PhilETaylor - comment - 28 Apr 2021

This is a bug in the original com_banners empty state PR, and not in this PR.

avatar Quy
Quy - comment - 28 Apr 2021

A category is required to create a new banner.

avatar PhilETaylor
PhilETaylor - comment - 28 Apr 2021

A category is required to create a new banner.

Correct. This is totally unrelated to my work on empty states.

The code clearly states a cateogory needs to be there before the Add button in the toolbar will show.

	if (count($user->getAuthorisedCategories('com_banners', 'core.create')) > 0)
		{
			$toolbar->addNew('banner.add');
		}

Therefore this was a preexisting issue with Joomla.

avatar brianteeman
brianteeman - comment - 28 Apr 2021

@Quy a category does NOT need to be created before you create a banner. It is created automatically. Just as it is with all similar components that use categories

avatar PhilETaylor
PhilETaylor - comment - 28 Apr 2021

If I revert my code to the last Beta Issued of Joomla 4 and delete my banner category - I get no new button. Thus confirming nothing to do with Empty State :) - phew :)

Screenshot 2021-04-28 at 22 56 23

avatar PhilETaylor
PhilETaylor - comment - 28 Apr 2021

@Quy a category does NOT need to be created before you create a banner. It is created automatically. Just as it is with all similar components that use categories

No. it. is. not. Please test and you will see. The NEW button doesn't even show if there are no categories.

avatar joomdonation
joomdonation - comment - 28 Apr 2021

Change this line of code https://github.com/joomla/joomla-cms/blob/4.0-dev/administrator/components/com_banners/src/View/Banners/HtmlView.php#L144 to

if ($canDo->get('core.create') || count($user->getAuthorisedCategories('com_banners', 'core.create')) > 0)

will fix the problem.

avatar PhilETaylor
PhilETaylor - comment - 28 Apr 2021

You CAN create a NEW category when saving a NEW banner - but you cannot get to the NEW Banner Edit page if there are ZERO categories.

avatar PhilETaylor
PhilETaylor - comment - 28 Apr 2021

That line 144 has been there for 10 years , this "bug" has been dormant for 10 years. LMAO

Screenshot 2021-04-28 at 23 00 06

avatar PhilETaylor
PhilETaylor - comment - 28 Apr 2021

That bug is now fixed in #33399

avatar Quy
Quy - comment - 28 Apr 2021

If you're up for it, news feeds has the same issue. Thanks.

avatar sandramay0905
sandramay0905 - comment - 29 Apr 2021

@PhilETaylor

  1. After deleting all articles the Empty Trash-button is shown . Cause it was the last filter set and creating now a new article give them status "trashed":

image

  1. These 9 views are to test?

image

avatar PhilETaylor
PhilETaylor - comment - 29 Apr 2021

1 thanks I'll fix that today
2 I forget how many empty states have been merged already - but all of them probably need the empty trash button fix and all need testing

avatar PhilETaylor
PhilETaylor - comment - 29 Apr 2021

If you're up for it, news feeds has the same issue. Thanks.

Done #33405

avatar PhilETaylor PhilETaylor - change - 29 Apr 2021
Labels Added: ?
avatar PhilETaylor
PhilETaylor - comment - 29 Apr 2021

After deleting all articles the Empty Trash-button is shown . Cause it was the last filter set and creating now a new article give them status "trashed":

This is now resolved and only effected Articles, Featured, Messages and Notes view models. Thanks

avatar Quy Quy - test_item - 29 Apr 2021 - Tested successfully
avatar Quy
Quy - comment - 29 Apr 2021

I have tested this item successfully on 35cde2e


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/33380.

avatar brianteeman
brianteeman - comment - 29 Apr 2021

@infograf768 always objected in the past to removing buttons and any attempt at progressive disclosure of toolbar functions

avatar PhilETaylor
PhilETaylor - comment - 29 Apr 2021

Joomla has a long history of bad UX decisions. It's time to move on.

Empty state design is now a part of joomla 4. It should minimise everything on the screen to guide a user to a CTA, which is nearly always to create something with a new button, or to get help/documentation on what the future is

It is not really progressive disclosure, because as soon as you have one of an item, the empty state is removed revealing the full interface. If we really did have progressive disclosure of toolbar patterns, then there would never be any grayed out buttons, they would appear when they could be used in context

image

avatar sandramay0905 sandramay0905 - test_item - 30 Apr 2021 - Tested successfully
avatar sandramay0905
sandramay0905 - comment - 30 Apr 2021

I have tested this item successfully on 35cde2e


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/33380.

avatar alikon alikon - change - 30 Apr 2021
The description was changed
Status Pending Ready to Commit
avatar joomla-cms-bot joomla-cms-bot - edited - 30 Apr 2021
avatar alikon
alikon - comment - 30 Apr 2021

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/33380.

avatar richard67
richard67 - comment - 30 Apr 2021

@PhilETaylor This PR here has now a merge conflict in file administrator/components/com_tags/src/View/Tags/HtmlView.php after your other PR #33286 has been merged. I could try to solve that, but I think it's better if you do that since you are author of both PR's, this here and the other one.

avatar PhilETaylor
PhilETaylor - comment - 30 Apr 2021

No worries - I was expecting conflicts as each PR was designed to be standalone and contain everything they needed to function, for ease of testing and acceptance. I'll fix this one up now.

avatar PhilETaylor PhilETaylor - change - 30 Apr 2021
Labels Added: ?
avatar richard67 richard67 - alter_testresult - 30 Apr 2021 - Quy: Tested successfully
avatar richard67 richard67 - alter_testresult - 30 Apr 2021 - sandramay0905: Tested successfully
avatar richard67
richard67 - comment - 30 Apr 2021

Previous tests and RTC are still valid since the 2 commits after the tests were only a clean update of the branch to the upstream 4.0-dev branch plus a code style fix.

avatar drmenzelit drmenzelit - close - 30 Apr 2021
avatar drmenzelit drmenzelit - merge - 30 Apr 2021
avatar drmenzelit drmenzelit - change - 30 Apr 2021
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2021-04-30 09:40:57
Closed_By drmenzelit
Labels Added: ?
Removed: ?
avatar drmenzelit
drmenzelit - comment - 30 Apr 2021

Thanks

Add a Comment

Login with GitHub to post a comment