-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[4.0][com_fields] Fix draggable sorting #30094
Conversation
I have tested this item 🔴 unsuccessfully on b44e874 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30094. |
Is sorting an issue with Fields only or with other components too? |
Can you provide a screenshot of the fields so I can see what you are trying to do? |
For the first field, there are no other fields without a field group assigned to sort against. For the Click on the Filter Options. |
It could be related to this issue #23905. This PR fixes the dragging to the bottom only. |
Is the latest screenshot a result of this PR? |
No - the screenshots were without the patch. But with the patch it makes no difference - I can drag anything to the bottom of the list but only a group member upwards to within its group. |
I would not expect to be able to sort into a group. Just as you can not sort into a category etc |
But articles, users and contacts don't offer sorting by category! |
I am still baffled! With the patch applied, referring to my illustration above, I can drag any member of the More Info group up or down within its group. I can drag any field to the bottom of the list as illustrated. If I drag the ungrouped item or the Flower data group item to the bottom of the list I can't drag it up again. Is this the desired behaviour? Or even desirable behaviour? I am revising the Help screens for Fields and Field Groups so I really need to understand it all myself. As I see it, the Field Group order just controls the Tab order in the data entry form and has no effect in the front end. The Field order affects the order within the data entry tab and the display order in the front end. Is that right? |
By way of illustration, I just removed the patch and decided to put the Fields in the correct order. I had to move each one individually to the bottom of the list. Not too tedious with 5, but imagine doing it with 10 or 20 and making a mistake. This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30094. |
No. It also controls the order in the front end
Yes |
That seems to be not the case. In a fresh test these are my field groups: And the Latin name field is not in a group so appears in the Fields tab. This is my Fields order: And this is the front end rendering: So the front-end order seems to be controlled only by the Field order.
Agree! |
Use Filter Options to select the desired field group to display applicable fields. With this PR, you can drag and drop within the group and not to the bottom only. In other words, filter the list to exclude fields not relevant to the field group so you don’t have to interact with them. |
That does not make sense. The Select Field Group drop-down list does not contain No Field Group and if I select Flower Data I cannot move it with respect to More Data. So I repeat: the order shown in the Fields list is the order displayed in the front end. We really need to be able to move any field up or down irrespective of field group. |
No we dont - that makes no sense and defeats the objective of grouping the fields.
And that is correct. With this PR the code is working correctly as designed and exactly how it is working in joomla 3 |
I have tested this item ✅ successfully on 7bc66cc This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30094. |
1 similar comment
I have tested this item ✅ successfully on 7bc66cc This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30094. |
OK - I rethink my use of Fields and Field Groups to use them as designed, and document accordingly. Sorry for being such a pain! |
…outs * '4.0-dev' of github.com:joomla/joomla-cms: (612 commits) [4.0] Smart Search: Fixing ordering, order direction and disabled button (joomla#29474) [4.0] Generate routed Modal links for iframes when not on the root (joomla#30007) [4.0] Get menu directly in com_tags menu route helper (joomla#30039) Remove collapse when resizing from mobile to desktop (joomla#30132) [4.0] Wrap component output in `main` element to make Cassiopeia more accessible (joomla#29870) [4.0] Webauthn gmp warning (joomla#29731) [4.0] Refactor to return early, remove if depths and throw NotAllowed (joomla#29694) [4.0] CLI help text (joomla#29811) Feature/draggable typo fixes (joomla#29987) [4.0] Removing unnecessary workaround in finder indexer (joomla#30037) [4.0] Optimizing Smart Search for larger content (joomla#30008) [4.0] Fix js ajax for pre update checker (joomla#29980) [4.0] Cassiopea: Fixing modals custom-select fields display (joomla#30097) [4.0][com_fields] Fix draggable sorting (joomla#30094) [4.0] Correct incorrect @return documentation (joomla#30092) [4.0] Menu items modal: adding missing filters (joomla#30087) short to long php open tags with echo (joomla#30089) Use new Toolbar (joomla#30085) [4.0] Center status/date created headers (joomla#29249) [4.0] Fix Cassiopea searchtools alignment in modals (joomla#30077) ... # Conflicts: # administrator/components/com_templates/src/View/Template/HtmlView.php # installation/sql/postgresql/base.sql # libraries/src/Application/AdministratorApplication.php # libraries/src/Application/SiteApplication.php
* Fix draggable sorting * Semicolon
Hey guys, I know its old but it still doesnt work properly for me. I am on J4.1.5 and I can only drag all the way down + it doesnt save it. Resets position on reload... |
Closes #30073.
Summary of Changes
Fix draggable sorting
Testing Instructions
Go to Content > Fields
Create fields
Click Ordering header
Drag rows to sort
Create field groups
Click Ordering header
Drag rows to sort
Assign fields to field groups
Drag rows to sort within field groups
Actual result BEFORE applying this Pull Request
Sortable in last position only
Expected result AFTER applying this Pull Request
Sortable in any positions