JavaScript Chat Summary – August 28th

Below is a summary of the discussion from this week’s JavaScript chat (agenda, Slack Transcript)

Have a topic for discussion for the next meeting? Leave a suggested edit on next week’s agenda.

Agenda: Preparing for Gutenberg Merge

Slack Conversation

What tasks do we need to complete on the core side to be ready for Gutenberg Merge?

Prior Work

Remaining Tickets


What? Who?
Experiment with the following steps to see how this works:

WordPress side:

– Gutenberg packages stay where they are
– Gutenberg’s PHP (script registration and bootstrapping) move to core.
– Webpack config to alias wp.* to npm dependencies moves to Core’s webpack config.

Gutenberg side:

– Kept as plugin for ease of maintenance, updates.
– Plugin re-register’s the scripts (overriding wp’s registrations)
– No more php bootstrapping in the Gutenberg repository.

Some experimentation could involve consuming packages in WordPress core.

Example: Usage of shortcodes.js could be replaced with @wordpress/shortcodes

edit-post needs to be moved to a package.
Resolve componentsand block-library which have some code that lives outside packages.

Agenda: Hooks

Slack Conversation | Context

The following things were discussed:

  • Standards for naming/namespacing hooks
  • Criteria for adding/accepting a new hook
  • Expanding documentation for available hooks (including inline documentation)
  • “All” hooks.

No clear resolution to the above points was made in the meeting.

Agenda: Babel 7 & Polyfills

Slack Conversation | Context


What? Who?
Decision: Ship packages without any polyfills, then bundle all polyfills in WordPress core.  Documentation will include something like this:

This package assumes that your code will run in an ES2015+ environment. If you’re using an environment that has limited or no support for ES2015+ such as lower versions of IE then using core-js or @babel/polyfill will add support for these methods. Learn more about it in Babel docs.

Agenda: Converting from lodash to lodash-es for distributed packages

Slack Conversation | Context


What? Who?
Continue discussion on the related issue.