I have a two part question here. First, an internal reviewer found some issues with a Plone 5 site we are building that stem from core Plone code (or third party packages bundled with it - half are minor changes that involve a change to select2 js, which leads to my second question later). They are spread out among different Plone modules, and so far it looks like if the issues were to be addressed it would require changes to plone.app.z3cform, CMFPlone, and maybe mockup to name a few. So, assuming there is interest in addressing the accessibility issues my coworker found, is it better to create an issue on each individual github project or is there a more centralized place to post everything together.
The second question comes from my lack of experience with requirejs and I want to be sure I'm on the right track. A dev came up with some changes to select2.js (same version as Plone 5.0.5 is using - 3.5.1) and I think I have a solution for actually using that in Plone, but I would greatly appreciate if someone with more experience could point out any incorrect assumptions on my part. Basically, since select2.js is integrated with requirejs instead of served to the browser as a distinct file, I've got some compiling to do. For background, I've got a package called ims.dermis that holds all of our skins/cosmetics policies so I want to add it to that.
I see that there is a select2 resource so I will certainly want to update the js for that. I have a plone:static directory as ++plone++ims so
<records prefix="plone.resources/select2" interface='Products.CMFPlone.interfaces.IResourceRegistry'> <value key="js">++plone++ims/components/select2/select2.js</value> <value key="css"> <element>++plone++static/components/select2/select2.css</element> </value> </records>
And after some trial and error it appears I wanted to recompile the plone bundle? I turned on dev js in the resources registry for that bundle, built the js, extracted the code from portal_resources and put it into my package's static directory so I could add this to registry.xml
<records prefix="plone.bundles/plone" interface='Products.CMFPlone.interfaces.IBundleRegistry'> <value key="merge_with">default</value> <value key="resources"> <element>plone</element> </value> <value key="enabled">True</value> <value key="jscompilation">++plone++ims/compiled/plone-compiled.min.js</value> <value key="csscompilation">++plone++static/plone-compiled.css</value> <value key="last_compilation">2017-01-18 00:00:00</value> <value key="stub_js_modules"> <element>jquery</element> </value> </records>
Again, that seems to use my version of select2.js. I'm not completely sure why, but I think the chain connection is as follows. The "plone" bundle uses the "plone" resource and compiles ++resource++plone.js into plone-compiled.js. Looking at plone.js, it includes "mockup-patterns-select2" in the require. The "mockup-patterns-select2" resource lists the js file "++resource++mockup/select2/pattern.js" from the mockup package, and that pattern.js has "select2" in the define, which I assume will now use my updated resource. Is that correct? It's quite a complicated change to update a few lines in the select2.js file, but I don't see a better way to do it.