User tests: Successful: Unsuccessful:
This reworks the way we hack chosen to pieces. This is done by creating a Joomla instance that extends the chosen instance to place most our hacks in. it should be added that this still requires a hack (we have to expose chosen and it's base class that isn't done by default - which i'm just regex'ing in as part of the build script. However this means we can now use the npm distributed packages without having to be as careful to ensure all our hacks are propagated (note we are now more dependent on chosen internals however so care must still be taken) - as far as I could tell we could only do this if we wrote our own coffeescript to extend the chosen classes and compiled that which is not something I feel comfortable doing.
We're now fully on the stable version of chosen 1.6.1 - the 1.0 migration involved changes in class names and js events - we should note people must refer to these docs
Something to do with the fact that to emulate the j3.x code when creating custom chosen implementations you need to use jchosen
function in jquery rather than chosen
My apologies to the JS community for this abomination.
Status | New | ⇒ | Pending |
Category | ⇒ | Administration com_categories com_config com_modules Templates (admin) Repository JavaScript Front End Libraries |
If you can come up with and implement a concrete alternative for sure for the places we’re using it (category, module positions and tags afaik). But Dimitris spent 2 years trying to find something like that and couldn’t make it work. So I’m doubtful it’s possible at this point.
can you define the exact requirements. otherwise all the work improving a11y is pretty much wasted
Sure so we can split tags and the module/positions categories into two if it helps - because they are largely separate visual elements
If we can find a jquery free solution that would be massive bonus points but not 100% essential
You also know the functionality we have in tags/categories/modules so if you think I'm missing anything here do say - it's been a long time since i touched this part of the codebase
Even if Brian is searching for replacements I'd still like tests on this btw. It doesn't block us finding an alternative. It's just making maintenance easier until we find something else
Choices really does look the best option to me - didn't spot the reference to it in your post when I was searching. Not sure I really understand the part that you say there is an issue with
So as far as I can tell from a first pass yesterday choices only supports adding extra options to text fields - not select fields :( but gonna take a more detailed pass today and see what I can come up with
choices only supports adding extra options to text fields - not select fields
that should be no problem, any input is input
just need to investigate how can handle it with an existing data model, how to adopt
maybe I also try to check, when will get some free time,
I do not very like to have Choosen in j4
I have no problem with anyone researching/working on alternatives. I'm as much down for it as you all are! But for two years now people have said this. And if we can't find anything we need chosen to have styling and be more maintainable than it is in 3. This doesn't block the work any of us do in finding a replacement
something still wrong with the hack,
I tried to test to add a new module position, and new tag in article, but not work
upd: custom module position does not work even without this patch
@wilsonge unless you fix jshjohnson/Choices#163 choices is not suitable for this project. Also you have to redo the AJAX part for the tags and some interesting implementation for the categories.
The idea of having all the fields as custom elements was a way to get away from the event driven architecture (although that's half true as the events are just left for the browser to handle).
BUT the event driven architecture fits the bill for Joomla, unfortunately the front end in this project can not keep up with the next age state driven (actually its the current era, eg: VUE, REACT etc)
Finally you might find https://codepen.io/dgrammatiko/pen/bvOdZp useful
My 2c, since you mentioned me
Labels |
Added:
?
|
Fixed tags (somewhere I missed committing some files doing the class updates) and added the missing class that had stopped module positions working
I have tested this item
now it working :)
@brianteeman all ok here from a11y point of view?
Expectation is that it's not "OK" but it's not going to be worse either as we're not changing any of the HTML output
Ok, so lets get it merged.
Status | Pending | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-09-19 09:21:05 |
Closed_By | ⇒ | laoneo |
Thanks :)
choices only supports adding extra options to text fields - not select fields
@wilsonge unless you fix jshjohnson/Choices#163 choices is not suitable for this project
@wilsonge @dgrammatiko "I believe it can fly"
check #22263
@wilsonge and @dgrammatiko, are you both talking of the same javascript Choices? LOL! I've been following links and reading the conversation from several posts related to changing chosen to choice-js and I am confused if @wilsonge is talking about Choices which is @dgrammatiko is talking about.
Choice and Choices, LOL! which one?
Also, I can't seem to find what @wilsonge.. I mean @Fedik is working merged into the daily update. Chosen is still the script being loaded.
We are both talking about that one yes :)
@wilsonge Awesome! Can't wait for it be merged into the nightly build. Quick question, is it possible for Choices to have two elements that are related to each other? Something like, two elements have the same options but when an option is selected in either one, that option is no longer available in the other?
It got merged over a month ago and is part of alpha5 and any nightly since then.
Confirmed, as of Wednesday, 24 October 2018 02:00:35 UTC nightly build, Joomla update is now working.
Got it! That's why I can't find choices.js anywhere. Thanks!
Can't we just drop it as it's horrendous for a11y?