? ? ? Pending

User tests: Successful: Unsuccessful:

avatar Bakual
Bakual
24 Apr 2021

Pull Request for Issue #33279 .

Summary of Changes

  • Moved the repeating parts of the layout to a JLayout which can be used also by 3rd parties.
  • Added permissions checks for the "Add xxx" button. The permissions checks are kept as similar as reasonable to the one for the toolbar button
  • Corrected the link of the "Add xxx" button to point to the respective controller task instead of directly going to the view.
  • Adjusted the language strings for the "_CONTENT" so they only differate in the prefix. This could also be changed to "_ITEMS" but I think basically everything is "content" of some sort as well, not only com_content items. In the end, the name of the string doesn't matter anyway much.
  • Move the "Learn More" string to the joomla.ini file, because this one always is the same.

Testing Instructions

Check the newly introduced blankstate layouts. They should look the same before and after this PR.

Documentation Changes Required

Should be included in the documentation about blankstate layouts when/if/once that exists

avatar Bakual Bakual - open - 24 Apr 2021
avatar Bakual Bakual - change - 24 Apr 2021
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 24 Apr 2021
Category Administration com_banners com_contact com_content com_messages com_newsfeeds com_users Language & Strings Layout
avatar Bakual
Bakual - comment - 24 Apr 2021

One thing I wondered: The "Learn More" link currently opens in the same tab. Maybe it makes more sense to open it in a new tab? Since I guess usually the people going to read the help page don't actually want to leave the admin backend.

avatar PhilETaylor
PhilETaylor - comment - 24 Apr 2021

One thing I wondered: The "Learn More" link currently opens in the same tab. Maybe it makes more sense to open it in a new tab?

@brianteeman will tell you that... IIRC there was as reason we no longer force things into new windows.

avatar brianteeman
brianteeman - comment - 24 Apr 2021

From an accessibility perspective it is OK to open a new window in this case because the content is designed to be read with the web page. This is even an example use case in the WCAG docs

avatar PhilETaylor
PhilETaylor - comment - 24 Apr 2021

Please can you check #33286 which was done at the same time as your great work to see if either of us needs to change much (other than the normal complete refactoring) due to the addition of the extension part.

avatar PhilETaylor
PhilETaylor - comment - 24 Apr 2021

Adjusted the language strings for the "_CONTENT" so they only differate in the prefix. This could also be changed to "_ITEMS" but I think basically everything is "content"

I read it as "the content of the message to be displayed on the screen"

avatar PhilETaylor
PhilETaylor - comment - 24 Apr 2021

@Bakual Please remove the trailing ?> and whitespace at the end of the blankstate.php files

avatar Bakual Bakual - change - 24 Apr 2021
Labels Added: ? ?
avatar Bakual
Bakual - comment - 24 Apr 2021

I've added target="_blank" to the help link so it opens in a new tab.

avatar Bakual
Bakual - comment - 24 Apr 2021

Please can you check #33286 which was done at the same time as your great work to see if either of us needs to change much (other than the normal complete refactoring) due to the addition of the extension part.

I think from a first look of it, it should work fine with this PR

avatar PhilETaylor
PhilETaylor - comment - 24 Apr 2021

Please can you check #33286 which was done at the same time as your great work to see if either of us needs to change much (other than the normal complete refactoring) due to the addition of the extension part.
I think from a first look of it, it should work fine with this PR

The problem I will have it concating two language strings to make the title. Like "Articles :: Categories" while reusing existing language strings. Ive added a note in the line Im concerned about.

avatar PhilETaylor
PhilETaylor - comment - 24 Apr 2021

adding target=_blank gives this horrid icon, its not even inline pixel perfectly...

Screenshot 2021-04-24 at 21 43 16

avatar PhilETaylor PhilETaylor - test_item - 24 Apr 2021 - Tested successfully
avatar Bakual
Bakual - comment - 24 Apr 2021

adding target=_blank gives this horrid icon, its not even inline pixel perfectly...

Didn't even notice this, but you're right. It doesn't look nice. Open for suggestions (could also be done in a separate PR).

avatar PhilETaylor
PhilETaylor - comment - 24 Apr 2021

Didn't even notice this, but you're right. It doesn't look nice. Open for suggestions (could also be done in a separate PR).

Unfortunately that is a global Joomla 4 admin thing... I dont think we can "fix it" quickly or just for this feature, other than now loading into _blank :(

17298b6 25 Apr 2021 avatar Quy Swap
avatar PhilETaylor PhilETaylor - test_item - 25 Apr 2021 - Tested successfully
avatar PhilETaylor
PhilETaylor - comment - 25 Apr 2021

I have tested this item successfully on 17298b6

Awesome work!


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

avatar joomdonation joomdonation - test_item - 25 Apr 2021 - Tested successfully
avatar joomdonation
joomdonation - comment - 25 Apr 2021

I have tested this item successfully on 17298b6


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

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

RTC


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

avatar richard67 richard67 - change - 25 Apr 2021
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2021-04-25 17:49:55
Closed_By richard67
Labels Added: ?
avatar richard67 richard67 - close - 25 Apr 2021
avatar richard67 richard67 - merge - 25 Apr 2021
avatar richard67
richard67 - comment - 25 Apr 2021

Thanks!

avatar PhilETaylor
PhilETaylor - comment - 25 Apr 2021

? ❤️

avatar PhilETaylor
PhilETaylor - comment - 25 Apr 2021

@Bakual I tried them all and text-top was the closest "right" there was, but it still feels hacky...

Screen.Recording.2021-04-25.at.06.55.04.pm.mp4

Add a Comment

Login with GitHub to post a comment