? ? ? Pending

User tests: Successful: Unsuccessful:

avatar PhilETaylor
PhilETaylor
24 Apr 2021

Summary of Changes

Introducing a generic blank state that is reusable for any extension.

Tags and categories are unique with blank states as their db tables are NOT EMPTY when a blank state is true. They require the tables to be additionally filtered by a column. This PR improves the initial work on blank states to provide that additional filtering generically so it can be reused.

Testing Instructions

Delete your categories for "Article Categories" while maintaining some "News feed categories" (remembering to empty trash)

Navigate to Content -> Categories = See new blank state
Navigate to Components -> News Feed Categories = See your existing news feed categories
Trash all your Newsfeed categories, empty trash = See new blank state

Actual result BEFORE applying this Pull Request

No blank states, only "No matching Results" screen historically.

Expected result AFTER applying this Pull Request

A generic categories screen, reusing existing language strings from components.

Screenshot 2021-04-24 at 19 28 31

Screenshot 2021-04-24 at 19 28 41

Screenshot 2021-04-24 at 20 02 40

Documentation Changes Required

avatar PhilETaylor PhilETaylor - open - 24 Apr 2021
avatar PhilETaylor PhilETaylor - change - 24 Apr 2021
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 24 Apr 2021
Category Administration com_categories Language & Strings Libraries
avatar PhilETaylor PhilETaylor - change - 24 Apr 2021
Labels Added: ? ?
avatar joomla-cms-bot joomla-cms-bot - change - 24 Apr 2021
Category Administration com_categories Language & Strings Libraries Administration com_categories com_tags Language & Strings Libraries
avatar PhilETaylor PhilETaylor - change - 24 Apr 2021
Title
[4] Generic Blank State for Categories of Extensions
[4] Generic Blank State for Categories of Extensions & Tags
avatar PhilETaylor PhilETaylor - edited - 24 Apr 2021
avatar PhilETaylor PhilETaylor - change - 24 Apr 2021
The description was changed
avatar PhilETaylor PhilETaylor - edited - 24 Apr 2021
avatar PhilETaylor PhilETaylor - change - 24 Apr 2021
The description was changed
avatar PhilETaylor PhilETaylor - edited - 24 Apr 2021
avatar joomla-cms-bot joomla-cms-bot - change - 24 Apr 2021
Category Administration com_categories Language & Strings Libraries com_tags Administration com_categories com_tags Language & Strings
avatar PhilETaylor
PhilETaylor - comment - 25 Apr 2021

Marked as draft as will require conflicts to be resolved once the great work from @Bakual in #33288 is merged.

I'll revisit it after that.

avatar joomla-cms-bot joomla-cms-bot - change - 25 Apr 2021
Category Administration com_categories Language & Strings com_tags Administration com_categories com_tags Language & Strings Layout
avatar PhilETaylor
PhilETaylor - comment - 25 Apr 2021

Ok I have now refactored this to use the new layouts from @Bakual and its ready for testing again. Thanks.

avatar Bakual
Bakual - comment - 25 Apr 2021

You've beat me to it. But the solution you have chosen is the one that came to my mind as well ?

avatar Bakual
Bakual - comment - 25 Apr 2021

When testing the categories part with my component, I've got a few issues due to the fact that my categories have sections (eg "com_sermonspeaker.sermons"). You've assumed that "$extension" is always the component.
I'll see if I can fix that and do a PR to your branch.

avatar PhilETaylor
PhilETaylor - comment - 25 Apr 2021

Good catch - thanks. This is why Categories is slightly different to say Articles, as the db table is "reused" for many different reasons.

avatar Bakual
Bakual - comment - 25 Apr 2021

Did a (messed up) PR with some discussion points in it.
I'll have to go watch a movie with my wife now ?

avatar PhilETaylor
PhilETaylor - comment - 25 Apr 2021

Thanks - I'll merge it then Im off for the night too - thanks for your help on these blank slates... next week we can work on the FTP Layer together hahhahahahahhaahhhahah

avatar PhilETaylor
PhilETaylor - comment - 26 Apr 2021

Rebased on 4.0-dev and force pushed to resolve conflicts :)

avatar Quy
Quy - comment - 26 Apr 2021

Tags, private messages, news feeds, etc. are missing titles.

tags

avatar PhilETaylor
PhilETaylor - comment - 26 Apr 2021

This PR is only for Tags and Categories.

avatar PhilETaylor
PhilETaylor - comment - 26 Apr 2021

Im marking this as draft as it makes no sense to test it until the rename of the feature is merged.

avatar PhilETaylor
PhilETaylor - comment - 26 Apr 2021

Lets get #33334 merged and then I will revisit this PR, to change everything to make it mergeable with the new names.

avatar PhilETaylor
PhilETaylor - comment - 27 Apr 2021

PR rebased on 4.0-dev and force pushed after rename from Blank Slate to Empty State globally. Ready for test/merge again now

avatar PhilETaylor
PhilETaylor - comment - 27 Apr 2021

Final screenshots.

Screenshot 2021-04-27 at 17 32 23

Screenshot 2021-04-27 at 17 32 15

avatar Quy
Quy - comment - 27 Apr 2021

The Rebuild button is not disabled and clicking it displays the following warning:

rebuild

avatar PhilETaylor
PhilETaylor - comment - 27 Apr 2021

yup on that currently -thanks

avatar PhilETaylor
PhilETaylor - comment - 27 Apr 2021

Now like this, and I'll work through the others.

Screenshot 2021-04-27 at 19 19 36

avatar Bakual
Bakual - comment - 27 Apr 2021

I actually wouldn't hide those buttons with this PR.
It's unrelated as they also are not hidden when there are no items shown due to active filters or because they're trashed.

So you can hide it, but don't do it with this PR to keep it on one topic.

avatar PhilETaylor
PhilETaylor - comment - 27 Apr 2021

Its a blank slate - empty state - EVERYTHING should be hidden except the NEW and Learn more tasks - everything else goes against the concept of an empty state design.

avatar PhilETaylor
PhilETaylor - comment - 27 Apr 2021

So you can hide it, but don't do it with this PR to keep it on one topic.

Screenshot 2021-04-27 at 19 43 29

Give me 5 mins to complete it :) but this one in this PR can stay as the categories/tags views have not yet been merged :)

avatar Bakual
Bakual - comment - 27 Apr 2021

If you want to hide all buttons, just hide the toolbar completely (like done in modals). The new button is redundant anyway ?

If you add more to this PR, chances get lower that it gets merged soon. The more is in it, the more work is it to test and review.

avatar PhilETaylor
PhilETaylor - comment - 27 Apr 2021

If you want to hide all buttons, just hide the toolbar completely (like done in modals). The new button is redundant anyway

The tool bar looks crap without a New button and just nothing. I did consider hiding the whole tool bar.

If you add more to this PR, chances get lower that it gets merged soon. The more is in it, the more work is it to test and review.

All the other changes are in a different PR - this PR is done and I plan no more changes here.

avatar Bakual
Bakual - comment - 27 Apr 2021

The tool bar looks crap without a New button and just nothing. I did consider hiding the whole tool bar.

Forget that suggestion. Hiding it would also hide the "Options" and "Help" buttons, which would be bad.

avatar Bakual
Bakual - comment - 27 Apr 2021

Actually, the "Rebuild" button works also for cases where Empty State is active. Because it works on the whole table, not only for the selected extension. So I would not hide it.

avatar PhilETaylor
PhilETaylor - comment - 27 Apr 2021

Actually, the "Rebuild" button works also for cases where Empty State is active.

Move that commentary to #33380, but let me check if rebuild is the whole table, or a subset of the table.

edit: rebuild seems to "rebuild the entire nested set tree" gulp.

avatar PhilETaylor
PhilETaylor - comment - 27 Apr 2021

But again, its an EMPTY STATE, you are trying to guide the user to their next step. A users next step on seeing an empty state is NOT to think "I need to rebuild"... so it makes sense to hide it to fulfil the purpose of the state.

On an EMTPY STATE, Options Help and New are all I believe are valid buttons.

avatar Bakual
Bakual - comment - 27 Apr 2021

I actually don't care much about the buttons. I just fear that this PR will get delayed if you pack more stuff into it.

avatar PhilETaylor
PhilETaylor - comment - 27 Apr 2021

Feel free to test it :) Im not adding more to it now

avatar Bakual
Bakual - comment - 27 Apr 2021

Maybe tomorrow, to tired for today :-)

avatar Bakual Bakual - test_item - 28 Apr 2021 - Tested successfully
avatar Bakual
Bakual - comment - 28 Apr 2021

I have tested this item successfully on 4895ce5

I've tested this PR successfully also with my own component. So the categories view also works fine with 3rd party extensions and also with categories that use the component.section format.

Also the tags view works fine.

There are two things I think could still be improved, but it's not a bug by itself.

  • This PR already partly (for com_categories, but not for com_tags) contains changes from #33380. This should be in the scope of the other PR so in case the change doesn't get accepted or delayed we still have a consistent behavior.
  • The messages on the categories view are not consistent with the messages on other views. Where the title for other views is like "No Items have been created yet.", it is "Item Type: Categories" here. And for the message it is the same: While for other views it is a description about the purpose of the item type, for categories it's just "There are currently no categories for this extension."

This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/33286.
avatar PhilETaylor
PhilETaylor - comment - 28 Apr 2021

This PR already partly (for com_categories, but not for com_tags) contains changes from #33380. This should be in the scope of the other PR so in case the change doesn't get accepted or delayed we still have a consistent behavior.

Im actively working on all Empty States and see no reason why they should be delayed. It would be stupid of the maintainers now to start rejecting them now that some have already been merged, because we have been working fast you are right, there is some overlap so that each PR can stand alone and be merged alone. As each is merged, I revisit all the others to ensure al the merge conflicts and dependancies are met.

Where the title for other views is like "No Items have been created yet.", it is "Item Type: Categories" here.

This is because we reuse the language strings - for example for your extension we would not know what to put as the title so its kept generic and reuses the existing language strings.

While for other views it is a description about the purpose of the item type, for categories it's just "There are currently no categories for this extension."

Again this was left generic, because I dont know why you are using categories in your extension. I could say "Categories are a way of categorising your articles" but then it would be wrong for User Notes for example.

So generally totally agree with you - but with the above notes the PR is acceptable I think.

avatar alikon alikon - test_item - 28 Apr 2021 - Tested successfully
avatar alikon
alikon - comment - 28 Apr 2021

I have tested this item successfully on 4895ce5


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

avatar alikon alikon - change - 28 Apr 2021
Status Pending Ready to Commit
avatar alikon
alikon - comment - 28 Apr 2021

RTC


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

avatar Bakual
Bakual - comment - 28 Apr 2021

This is because we reuse the language strings - for example for your extension we would not know what to put as the title so its kept generic and reuses the existing language strings.

Yep I know, but since we already load language strings from the 3rd party component now, we could as well check for a new string instead of the ones we check now. And fall back to a generic one if none is present. It doesn't necessary has to be the existing one.
The same applies to the message strings.

As I wrote, it's not a bug. Just some thoughts how it could be improved further ?

avatar Quy Quy - change - 29 Apr 2021
Labels Added: ?
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 08:34:04
Closed_By drmenzelit
Labels Added: ?
Removed: ?
avatar drmenzelit drmenzelit - close - 30 Apr 2021
avatar drmenzelit drmenzelit - merge - 30 Apr 2021
avatar drmenzelit
drmenzelit - comment - 30 Apr 2021

Thanks

Add a Comment

Login with GitHub to post a comment