Skip to content
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

Fix plone 4 / 5 language selector dropdown #121

Merged
merged 8 commits into from Jan 10, 2020

Conversation

@Nachtalb
Copy link
Member

Nachtalb commented Dec 18, 2019

Instead of relying on Plon's dropdown js which actually doesn't even work with our language selector HTML we no define our own. The JS we use is a stripped-down and adjusted version of the default one.

@Nachtalb Nachtalb requested a review from 4teamwork/plone Dec 18, 2019
@Nachtalb Nachtalb self-assigned this Dec 18, 2019
@Nachtalb Nachtalb force-pushed the ne/fix-plone5-languageselector branch from 34615c2 to 2fed8b7 Dec 18, 2019
@jone
jone approved these changes Dec 19, 2019
Copy link
Member

jone left a comment

Does the JavaScript work out of the box? I remember we discussed that there is a problem.

@Nachtalb

This comment has been minimized.

Copy link
Member Author

Nachtalb commented Dec 19, 2019

As discussed there still seems to be a problem on plone 4 but plone 5 works out of the box.

@Nachtalb Nachtalb force-pushed the ne/fix-plone5-languageselector branch from 2fed8b7 to 7a38dfc Dec 19, 2019
@Nachtalb Nachtalb changed the title Fix language selector for plone 5 Fix plone 4 / 5 language selector dropdown Dec 19, 2019
@Nachtalb Nachtalb force-pushed the ne/fix-plone5-languageselector branch from d2a539c to 993d7b0 Dec 19, 2019
@Nachtalb Nachtalb requested review from jone and busykoala Dec 19, 2019
Copy link
Member

jone left a comment

Please add a changelog entry.

ftw/subsite/browser/resources/dropdown.js Outdated Show resolved Hide resolved
ftw/subsite/browser/resources/dropdown.js Outdated Show resolved Hide resolved
@Nachtalb Nachtalb force-pushed the ne/fix-plone5-languageselector branch from 993d7b0 to 79557e7 Dec 20, 2019
@Nachtalb Nachtalb requested a review from jone Dec 20, 2019
@djowett-ftw

This comment has been minimized.

Copy link

djowett-ftw commented Dec 20, 2019

Heyho, I'm late to the party, but wondering what didn't work here? I note that we currently duplicate the id 'portal-languageselector' from Plone. (just wondering)

@Nachtalb

This comment has been minimized.

Copy link
Member Author

Nachtalb commented Dec 20, 2019

The DOM is different from the default Plone one. We use accessibility focused HTML tags with aria labels. Because of that, the default plone dropdown js does not work because it looks for specific tags instead of just classes.

@jone
jone approved these changes Dec 20, 2019
@tinagerber tinagerber force-pushed the ne/fix-plone5-languageselector branch from 40a5a47 to 94633fe Jan 9, 2020
@tinagerber

This comment has been minimized.

Copy link
Contributor

tinagerber commented Jan 9, 2020

I optimized it for use with izug (mobile), please have another look.

@tinagerber tinagerber requested a review from 4teamwork/plone Jan 9, 2020
@jone
jone approved these changes Jan 10, 2020
Copy link
Member

jone left a comment

👍

@tinagerber tinagerber force-pushed the ne/fix-plone5-languageselector branch from 94633fe to 624e31d Jan 10, 2020
@tinagerber

This comment has been minimized.

Copy link
Contributor

tinagerber commented Jan 10, 2020

Rebased onto latest master

@tinagerber tinagerber merged commit 8cbac47 into master Jan 10, 2020
2 checks passed
2 checks passed
CI Governor: test-plone-4.3.x.cfg Task #494905 succeeded
Details
CI Governor: test-plone-5.1.x.cfg Task #494906 succeeded
Details
@tinagerber tinagerber deleted the ne/fix-plone5-languageselector branch Jan 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.