documentation icon indicating copy to clipboard operation
documentation copied to clipboard

Javascript in add-ons. Explain the Plone 6 way.

Open ksuess opened this issue 3 years ago • 1 comments

The upgrade guide mentions already this topic: https://6.docs.plone.org/backend/upgrading/version-specific-migration/upgrade-to-60.html#mockup-and-resource-registry-redone A more detailed "How To" would be helpful. With code and screenshots and examples of add-ons that do it the recommended way.

Placeholder is already there: https://6.docs.plone.org/classic-ui/static-resources.html

Suggested outline

  • What's the purpose of patterns?
  • Show me an example implementation. In which files is it applied? What does the code look like?
  • How do I write a pattern? plonecli, bobtemplates, other?
  • How do I register resources, such as JavaScript, images, and CSS?
  • Do I have to minify or does Plone minify?
  • Where does jQuery fit into patterns?
  • Does module federation affect me?
  • Where would should this chapter be located? In classic-ui or classic-ui/theming?

ksuess avatar Jul 13 '22 08:07 ksuess

This PR could be a starting point: https://github.com/plone/documentation/pull/1275

ksuess avatar Aug 30 '22 17:08 ksuess