JavaScript chat summary – July 10th

Below is a summary of the discussion from this week’s JavaScriptJavaScript JavaScript or JS is an object-oriented computer programming language commonly used to create interactive effects within web browsers. WordPress makes extensive use of JS for a better user experience. While PHP is executed on the server, JS executes within a user’s browser. chat (agenda, Slack transcript).

Participants: @abdullahramzan, @adamsilverstein, @aduth, @aristath, @atimmer, @gziolo, @herregroen, @hypest, Jorge Costa, @netweb, @omarreiss, @pento, @rheinardkorf, @schlessera, @westonruter, @westonruter

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

wp.hooksHooks In WordPress theme and development, hooks are functions that can be applied to an action or a Filter in WordPress. Actions are functions performed when a certain event occurs in WordPress. Filters allow you to modify certain functions. Arguments used to hook both filters and actions look the same. namespace argument

There was a lengthy discussion about how we should deal with ACF including a wp.hooks library. The version in GutenbergGutenberg The Gutenberg project is the new Editor Interface for WordPress. The editor improves the process and experience of creating new content, making writing rich content much simpler. It uses ‘blocks’ to add richness rather than shortcodes, custom HTML etc. includes a namespace argument on addAction not present in the ACF version.

  • @adamsilverstein mentioned that we could drop the namespace argument, but have the function throw a console warning if it isn’t provided.
  • ACF should be updated for 5.0 anyway, so this could be part of it.
  • This ties right into the discussion we had last week about deprecation strategy.
  • ACF is using a library that a lot of plugins are using, which is based on the wp.hooks proposal on the trac ticket. So there might be a good reason to preserve backwards compatibility.

No final conclusion was reached.

Deprecation Strategy

There weren’t a lot of changes since last week’s chat. wp.hooks could be a good test case for the deprecation strategy. This will be discussed on the wp.hooks issue.


WordPress/packages has been merged into Gutenberg 🎉. Updated packages still need to be published and released to npm. The only PR that still need to be merged is the update to Babel 7. The new version of Lerna makes managing the packages easier.

For ReactReact React is a JavaScript library that makes it easy to reason about, construct, and maintain stateless and stateful user interfaces. Native support a few files need to be refactored. Babel 7 and Jest need to be updated. codecov might need to be relaxed for React native to pass the codecov requirements.

Service Workers

A decision needs to be made on which service workers scopes make sense in a WordPress context. Discussion is happening on this pull request.

@westonruter asks everyone for feedback:

At the moment to me it seems it just makes sense to have two scopes, one for the frontend and one for the wp-adminadmin (and super admin). Please provide feedback there for anyone who has insights.

Coding Standards

The coding guidelines on camelcase have been merged in Gutenberg. The next step is to add those to the WordPress JavaScript standards. There are still some decisions to make about ES2015 standards, but those are for another meeting. The way these can go into WordPress is by first specifying these for Gutenberg and presenting these to the community.