Language Change NPM Resource Changed ? Pending

User tests: Successful: Unsuccessful:

avatar ceford
ceford
15 Nov 2020

Pull Request for Issue #31385 and related to #31396 .

Summary of Changes

Code to customise site display of Field Groups

Testing Instructions

Create some article fields that are not in a field group.
Edit an article and populate those fields.

Test the default behaviour.

Create one or more field groups, the example I use is Ingredients and Procedure.
The PR has added some extra fields to the Options tab of the Field Group data entry form:
Select Show Title = Yes
Select a render tag.
Add some fields to those groups.
Edit an article and populate the fields

Actual result BEFORE applying this Pull Request

The default behaviour is to show all fields in a single bulleted list with no 'title'.

Expected result AFTER applying this Pull Request

The example I use shows a Recipe with Ingredients as a bulleted list and the Procedure as a numbered list, with titles.

image

Documentation Changes Required

Help screen will need revision

avatar ceford ceford - open - 15 Nov 2020
avatar ceford ceford - change - 15 Nov 2020
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 15 Nov 2020
Category Administration com_fields Language & Strings Front End
avatar brianteeman
brianteeman - comment - 15 Nov 2020

Warning: Use of undefined constant none - assumed 'none' (this will throw an Error in a future version of PHP) in C:\htdocs\joomla-cms\components\com_fields\layouts\fields\render.php on line 91

avatar brianteeman
brianteeman - comment - 15 Nov 2020

If you dont enter a class then it should not output an empty class. Currently you get for example <ul class="">

avatar richard67
richard67 - comment - 15 Nov 2020

@ceford Please use tabs and not spaces to indent code, see PHP CS errors reported by drone: https://ci.joomla.org/joomla/joomla-cms/37579/1/6

avatar brianteeman
brianteeman - comment - 15 Nov 2020

Depending on the options you select they are either ignored or they generate invalid mark

You cannot have the following markup

<p>title</p>
<li>field1</li>
<li>field2</li>

But it gets much worse with other combinations

avatar brianteeman
brianteeman - comment - 15 Nov 2020

Not sure what the show/hide title is supposed to do but I couldnt see it doing anything

avatar brianteeman brianteeman - test_item - 15 Nov 2020 - Tested unsuccessfully
avatar brianteeman
brianteeman - comment - 15 Nov 2020

I have tested this item ? unsuccessfully on 29a934a


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

avatar ceford ceford - change - 15 Nov 2020
Labels Added: ? ?
avatar brianteeman
brianteeman - comment - 15 Nov 2020

Thanks for the fixes - getting better

image

This generates the following

image

I get why you made it do that - p and dl would be invalid but I you should not be able to select an invalid option or combination in the first place. Otherwise users will think it is broken

It's the same when you set title to hide on a dl. The title is not hidden because it would be invalid

avatar ceford
ceford - comment - 16 Nov 2020

Thanks to @brianteeman for obliging me to think about the form behaviour. After wondering how to compose some javascript and poking around I discovered that all I had to do was add a field attribute to the form xml: showon="show_title:1[AND]render_tag:ul,ol,p,div" which I can only describe as absolutely marvelous. My complements to the javascript developers. I wonder if this sort of stuff is documented somewhere?

avatar brianteeman
brianteeman - comment - 16 Nov 2020

I wonder if this sort of stuff is documented somewhere?

https://docs.joomla.org/Form_field#Showon

avatar ashvini77 ashvini77 - test_item - 5 Dec 2020 - Tested unsuccessfully
avatar ashvini77
ashvini77 - comment - 5 Dec 2020

I have tested this item ? unsuccessfully on 092e829

https://tinyurl.com/y5r5ys4z


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

avatar gostn
gostn - comment - 5 Dec 2020

@ashvini77 you can add a screenshot here so user don't have to open a link.

avatar punambaravkar punambaravkar - test_item - 5 Dec 2020 - Tested successfully
avatar punambaravkar
punambaravkar - comment - 5 Dec 2020

I have tested this item successfully on 092e829

Yes, After adding the patch, it works correctly


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

avatar ashvini77
ashvini77 - comment - 5 Dec 2020
avatar vaibhavsTekdi vaibhavsTekdi - test_item - 5 Dec 2020 - Tested successfully
avatar vaibhavsTekdi
vaibhavsTekdi - comment - 5 Dec 2020

I have tested this item successfully on 092e829

It works only if when I save that field group after applying the patch again.


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

avatar ceford
ceford - comment - 5 Dec 2020

The bug occurs when you set up the test groups before applying the patch. To fix it, apply the patch and then open each Field Group in turn and save. That updates the parameters. I have change the code for backward compatibility purposes. You still need to save the Field Groups with the new features to store them. Please test again.

avatar ceford
ceford - comment - 3 Jan 2021

Pity this is stuck in limbo. All tests have passed and the adverse comments resulted from testing procedure.


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

avatar bembelimen
bembelimen - comment - 3 Jan 2021

Nice feature, for sure something for 4.1

avatar ceford
ceford - comment - 3 Jan 2021

Why put this off for 4.1? It was always intended for 4.0.

avatar richard67
richard67 - comment - 4 Jan 2021

@wilsonge Your opinion on this? 4.0 or 4.1?

avatar ceford
ceford - comment - 4 Jan 2021

This came up as a gripe in the forum because switching custom fields from dl to ul in J4 ruined perfectly good article appearance. Put it off to 4.1 and expect a lot more gripes!

avatar brianteeman
brianteeman - comment - 4 Jan 2021

That gripe was already resolved. This adds new functionality

avatar ceford ceford - change - 4 Jan 2021
Labels Added: ?
Removed: ?
avatar bembelimen
bembelimen - comment - 4 Jan 2021

That gripe was already resolved. This adds new functionality

Exactly. It's a really good enhancement but we should stop adding new stuff into 4.0 to get it released. But with a bit of clean up, we'll have it in 4.1.

avatar bembelimen bembelimen - change - 4 Jan 2021
Title
Field group site display enhancement
[4.1] Field group site display enhancement
avatar bembelimen bembelimen - edited - 4 Jan 2021
avatar Krshivam25
Krshivam25 - comment - 25 Nov 2021

@ceford Can you please commit this changes so we can test this again.

avatar ceford
ceford - comment - 25 Nov 2021

Any chance someone else can pick this up? Right now I don't know what to do - too long ago for may failing memory.

avatar ceford ceford - change - 29 Nov 2021
Labels Added: Language Change ?
Removed: ? ?
avatar joomla-cms-bot joomla-cms-bot - change - 29 Nov 2021
Category Administration com_fields Language & Strings Front End Administration com_admin com_categories com_fields com_joomlaupdate com_tags com_templates Language & Strings Templates (admin) NPM Change
avatar ceford
ceford - comment - 29 Nov 2021

I have made a complete pig's ear of the changes requested by Phil. My local repo is in a mess and I don't know how to fix it or revoke my latest commit. Annoyed with myself and ...

avatar ceford ceford - change - 29 Nov 2021
Labels Added: NPM Resource Changed
avatar ceford
ceford - comment - 8 Dec 2021

I am going to have to redo this from scratch starting from a new repo clone.

avatar ceford ceford - change - 8 Dec 2021
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2021-12-08 10:00:15
Closed_By ceford
avatar ceford ceford - close - 8 Dec 2021

Add a Comment

Login with GitHub to post a comment