User tests: Successful: Unsuccessful:
Pull Request for Issue # .
The categories accordion implemented in this PR #33052 won't work properly when the menu item created to display categories tree when the sub-category has image or description and one of the two settings below set to show:
If image or description is being show, button.nextElementSibling
will point to wrong div tag (you can see it by reading the code at https://github.com/joomla/joomla-cms/blob/4.0-dev/components/com_content/tmpl/categories/default_items.php#L34-L53
This PRs solve it by adding an attribute to the button to allow getting ID of the category and use it to get the right div which contains children categories of that category
I also made small modification to build/media_source/com_categories/joomla.asset.json to define preset so that we can call usePreset to load both JS and CSS in a single line of code.
Status | New | ⇒ | Pending |
Category | ⇒ | Repository NPM Change JavaScript Front End com_content |
Labels |
Added:
?
NPM Resource Changed
|
Thanks @RickR2H. This changes JS file, so I think the easiest way to test is update your installation to update package generated by this PR https://ci.joomla.org/artifacts/joomla/joomla-cms/4.0-dev/35093/downloads/46491/Joomla_4.0.0-rc7-dev+pr.35093-Development-Update_Package.zip (or run npm command, but to be honest, I haven't tried that method myself)
I have tested this item
Patch works! Had to run "npm ci" again after applying the patch.
Not the nicest layout as the category image id displayed after the toggler. But this is something for a new PR I guess...?
Not the nicest layout as the category image id displayed after the toggler. But this is something for a new PR I guess...?
Yes. I do not have good frontend skill to make it nicer, so I just fix the js bugs here. Thanks for testing :).
@RickR2H how did you get an image? I see the description but no image.
I have tested this item
result
As soon as this PR gets merged I'll try to take a look to fix the layout.
@joomdonation look like a nice side project
Status | Pending | ⇒ | Ready to Commit |
RTC. Hope maintainer will merge it so that we can work on the layout fixes and apply the same fix for other components.
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2021-08-13 14:26:47 |
Closed_By | ⇒ | wilsonge | |
Labels |
Added:
?
Removed: ? |
Thanks!
@joomdonation layout change added and ready for testing
When I apply the patch I get an error:
The requested page can't be found.
There is no "com_categories.shared-categories-accordion" asset of a "preset" type in the registry.