User tests: Successful: Unsuccessful:
If you go to the template style and try to select which menu items etc that the style will be applied to then the wording is "Toggle selection".
The reality is that it does not toggle the selection but does either "select all" or "select none".
This PR corrects that so the toggle really does toggle the state of the checkboxes.
(Although the code is different in j3 the problem exists there as well so I can backport it if required @HLeithner @zero-24)
The same problem with the toggle not being a toggle exists in other places but again as the code is different in each place I will address those in their own PR.
To test don't forget to do npm i
or node build.js --compile-js
Status | New | ⇒ | Pending |
Category | ⇒ | JavaScript Repository NPM Change |
Labels |
Added:
NPM Resource Changed
?
|
hm, actually there no issue with functionality, it supposed to work as it works now.
Your changes will make much more complicated to Select/Deselect all.
There only the label may a bit confusing, but we cannot easily switch it between "Select All/ Unselect All", that why it named with general string "Toggle".
Or we need to have 1-2 more buttons:
Select All / Deselect All / Toggle All
@Fedik It is not a toggle currently. Even though the value of the string is "toggle" and the key of the string is "invert" so clearly the original intent was for this to be a toggle. You will also see that the toggle string when used in com_finder for filters works correctly as a toggle and not a select all.
So if you want a select/deselect all then that is a separate and NEW issue that should have its own PR. This PR is fixing the bug that Toggle/Invert is not working correctly
I understand your expectation, but I do not agree with suggested fix, because in reason I wrote.
So if you want a select/deselect all then that is a separate and NEW issue that should have its own PR
Currently it not an issue, but this will be a new issue if your patch will be merged, I think it need to be fixed at once, somehow.
Otherwise the patch introduce degradation in functionality.
We can agree to disagree then. From my perspective this PR fixes a bug in expected behaviour of what a toggle will do. Think of it as a new user and not an experienced user who knows that when it says red it actually means green. Anything else is out of scope for this PR
Actually I think it a bug because the description of the button says "toggle" and not "select all" (an extra button that can do this would be useful if this get merged)
I'm also open for a backport to j3
Not just the text which could have been an error but the language key is explicit.
Will backport it tomorrow
If you want, please leave it just for 4.0,
The behavior 10+ years old, and changing it in last versions of j3 (especially without additional button), I not think it a good idea.
People are used to it. That what I think.
@HLeithner someone else will have to do the backport. its jquery and i dont get it
Ok thanks @brianteeman
I would certainly not backport this to J3 and also not merge this in J4.
I agree with @Fedik that whatever the label, we are used to Unselect or Select All via the button.
The "original intention" was plain wrong and counterproductive.
A real toggle as proposed in this PR is totally useless and confusing.
Anyone using a lot of menus would have to anyway go over all items to figure what is now selected or unselected...
Let's just change the label for the purists or make it 2 buttons, or indeed add a Select and Unselect all buttons BUT in the same PR. Otherwise, if not done, this will stay forever...
I have tested this item
For the reasons stated above I consider this PR "AS IS" as counterproductive.
It's a bug. The code originally was a toggle. A mistake when it was converted from mootools to jQuery resulted in the bug. That bug was replicated when converted to vanilla.
It was a welcome bug as the feature is counterproductive.
If one really wants to Toggle as suggested add a Select and Unselect all buttons BUT in the same PR. Otherwise, if not done, this will stay forever...
Otherwise, if not done, this will stay forever...
That is your personal opinion
the feature is counterproductive.
I guess you need to change the behaviour of the toggle everywhere else that it is used then as everywhere else the toggle works as a toggle.
How do you explain to the users that here when it says toggle it doesnt really mean toggle
Priority | Medium | ⇒ | Low |
It is quite crazy that you are refusing to allow a bug to be fixed!!
I have tested this item
The button now works as a toggle and checks/unchecks as expected.
@brianteeman can you pushes a change to GitHUb to generate prebuilt packages from Joomla CMS Bot please
I have tested this item
Tested and work!
Thanks to @roland-d who create the pakage for us :D
I have tested this item
Good
Thanks to @roland-d for the pakage
Status | Pending | ⇒ | Ready to Commit |
RTC
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2020-05-02 16:11:27 |
Closed_By | ⇒ | wilsonge | |
Labels |
Added:
?
|
I have to say I'm not convinced that toggle really is the useful functionality here as opposed to a select all/deselect all. But clearly that was the original intention so merging as a fix
Thanks
(Note toggle selections in com_finder for the filters works correctly already)