Javascript Chat Summary – December 4, 2018

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

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

Agenda: Holiday / WCUS scheduling

Slack Conversation

We agreed to cancel the #core-js meetings for December 11th (post-WCUS travel), December 25th (Christmas), and January 1st (New year). @aduth posted a cancellation notice here: https://make.wordpress.org/core/2018/12/04/javascript-weekly-chats-wordcamp-us-holiday-scheduling/

Agenda: Linting

Slack Conversation

A PR which extracts Gutenberg’s ESlint config to its own package by @gziolo has been merged. It’s set to be published to NPM as @wordpress/eslint-config. Publication is currently blocked by the 5.0 RC freeze, but is expected to land around contributor day together with a post outlining revisions to the JavaScript coding standards prepared by @aduth

We also discussed how to manage custom eslint rules. Some linting rules might not be useful outside of the context of WordPress core or Gutenberg. We decided for now to go the same path as the Jest eslint package. For the time being we will have one package with multiple configs, which will allow consumers to select the configs they need. 

Agenda: 5.0 Script Changes

Slack Conversation

With WordPress 5.0, a few vendor scripts (like lodash) are being included in core. For these scripts in particular, there is a chance for conflict if a plugin or theme registers their own copy of the dependency with the same un-prefixed name. There is a greater likelihood if there is a large version mismatch between the registered scripts.

Different approaches to prevent this were discussed. @aduth is working on a devnote to help integrators prevent these kinds of conflicts from happening.

#javascript, #meeting-notes

JavaScript Chat Summary – October 30th

Below is a summary of the discussion from this week’s JavaScript chat (agendaSlack transcript).

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

Meeting time adjustment

Due to DST and starting next week, the #core-js meeting time will be moved to 14h UTC.

Node 10.x LTS

A new LTS version of Node.JS has been released. As agreed upon on previous meetings, WordPress is going to follow the LTS schedule of Node.JS which means, we’re going to start using this new LTS version in local environments (Gutenberg and WordPress).

The systems team has been also notified to upgrade the WP.org servers to Node 10.13 LTS.

E2E Tests in Core

End 2 End tests are automatic tests simulating user interactions using a browser in a production environment. Gutenberg uses Google Puppeteer and a docker environment to run a suite of various e2e tests that include:

  • Creating and publish content,
  • Writing Flow,
  • Accessibility tests,
  • Extensibility tests.

We discussed during the meeting approaches to make the E2E Test setup and the test suite available for:

  • Plugin Authors:  to setup their own e2e tests,
  • Core: To validate that the Gutenberg integration is working properly and allow other parts of WordPress Core to be tested using this setup. 

Action items

  • Explore making the e2e test setup available as an npm package. cc @gziolo
  • Explore making a package containing the Gutenberg e2e test suite to be able to run it in Core.

Shorter-term, we discussed the possibility of duplicating the tests in Core to validate the Gutenberg integration and package updates. 

If you have some availability and would like to help with any of these items, please let us know in the comments.

#javascript

5.0: JS package inclusion update

News from the #core-js front! The JavaScript packages published on NPM have been included in WordPress core. Initial work on this was done last week by @atimmer. This week we were able to finalize the work after processing some feedback that we had received.

How does it work?

In the 5.0 branch, you can now run npm install && grunt build:js. That will download the NPM packages and build the scripts that need to be registered. Updating a script is a matter of changing its version number in the package.json and running the same command again.

Tasks

We’ve got the following tasks left:

Must haves for RC

Should haves for RC

Nice to haves for Beta, maybe RC

Dev Chat Summary: October 10 (5.0 Week 2)

This post summarizes the dev chat meeting from October 10th (agenda, Slack archive).

5.0 planning

  • See @pento’s WordPress 5.0 for Contributors and Committers post:
    • “If you’re an experienced contributor or committer who has time available during the WordPress 5.0 release cycle, and want to be able to make meaningful contributions towards making WordPress 5.0 awesome” … “Please reply to this post with information about your availability, what components of WordPress you have experience in, and (if you haven’t got involved with Gutenberg yet) what you feel has been getting in the way.”
    • In that post are some direct actions you can take to help contribute to 5.0, otherwise please review and comment if you’ll be around during the 5.0 release cycle… thanks!
  • Also see review @pento‘s 5.0 commit/branch details if you plan to contribute during the 5.0 release cycle
  • @pento: if you have time to help, please review tickets in the 5.0 milestone to determine whether to keep it in 5.0 (Gutenberg-related), or move to 5.0.1 (other bug fix) or 5.1 (other feature)
  • @kadamwhiterequest for help testing Lazily Evaluate Translation Strings (#41305) with input requested by the end of this working week to help remove the blocker to further Gutenberg localization work
  • Plans for an updated readme.html to be committed with contributions open until RC
  • @chanthaboune: collecting blocker items and dates across team reps, will post listing to Make/Core, if you have items to add to the listing please ping @chanthaboune directly
    • @matt: 5.0 baseline and goal is 4.9.8 + Gutenberg, thus a lot of things that may have been considered blockers in past major releases are probably going to be reclassified as “nice to have”
  • @matveb: last JS package included in the Gutenberg 4.0 RC, on track and could be ready for end of the week

Updates from focus leads and component maintainers

General announcements

  • See @matt‘s post for details on the Gutenberg Phase 2 Leads, @alexislloyd (design and product) and @youknowriad (technical)
    • Phase 2 is about thinking outside the box, namely the post and page box, to allow Gutenberg to handle entire-site layouts. We will replace widgets with blocks, so any block will be able to be used in any registered “sidebar” for legacy themes, and we will upgrade “menus” to a navigation block.
    • Phases 3 and 4 of Gutenberg at WordCamp US in December.
  • @audrasjb: a11y team reorganizing, will discuss during next week’s meeting
  • @chanthaboune: as teams identify new/updated team reps, please follow notes on team rep orientation

Next meeting

The next meeting will take place on October 17, 2018 at 20:00 UTC in the #core Slack channel. Please feel free to drop in with any updates or questions. If you have items to discuss but cannot make the meeting, please leave a comment on this post so that we can take them into account.

#5-0, #a11y, #core, #core-editor, #core-js, #core-media, #core-php, #core-restapi, #dev-chat, #gutenberg, #summary, #team-reps

Technical overview of Gutenberg integration

To better understand how we can integrate Gutenberg into WordPress, it’s crucial to know how the Gutenberg plugin is organized.

JavaScript Packages

The Gutenberg plugin is mostly a JavaScript application composed of several packages. Each one of these packages is:

  • Generic and available as an npm package.
  • The Gutenberg Plugin registers each package as a WordPress script.
  • The Gutenberg Plugin makes the public API of each package available in the wp global variable.
  • If a package is dependent on another one, it consumes it as a global variable and adds it as a dependency of the WordPress registered script.
  • A package can have one or multiple CSS stylesheets.

For example:

A @wordpress/components npm package is registered in the plugin as a wp-components WordPress script; its API is available in the wp.components global variable; and depends on @wordpress/element.

In turn, @wordpress/element‘s script is wp-element and is consumed by @wordpress/components in the bundled script as wp.element.

Bootstraping the editor’s page

To display the editor’s page we call wp.editPost.initializeEditor from the higher-level wp-edit-post package. This function takes as arguments the post to be edited and some editor settings.

This call is made when loading the edit.php page localizing the required arguments and enqueuing the wp-edit-post script.

REST API endpoints

Once the editor’s page rendered, all the communication with WordPress happens using REST API calls. In addition to the regular REST API endpoints to fetch, update and delete taxonomies, posts, etc., Gutenberg adds new REST API endpoints that include:

  • Autosaving endpoint.
  • Reusable Blocks endpoint.
  • Root endpoint for site settings.

Many other tweaks have been necessary in existing endpoints (taxonomies, embeds, permalinks, post search, etc) and most of these have been merged in the previous 4.9.* releases.

MetaBoxes

To support MetaBoxes, Gutenberg hooks initially render the content of the MetaBoxes in a hidden DOM node rendered using a PHP script. We also hook into the post.php call to persist the MetaBoxes save call.

Summary

So, as a high-level picture, the Gutenberg plugin is composed of:

  • JavaScript scripts and styles.
  • A PHP file to bootstrap the editor in edit.php.
  • REST API endpoints.
  • PHP utilities to parse, register and render blocks on the front-end.
  • PHP script to inject the MetaBoxes into the page and hooks to save the MetaBoxes.

Integration Process

In previous JavaScript meetings, we discussed the packages integration approach:

Since the JavaScript scripts are built as reusable npm packages, we’ll consume them in WordPress like any other npm package:

  • Adding a dependency in Core’s package.json.
  • Exporting the wp.* globals in enqueue scripts inside WordPress Core.
    • Example: wp.components = require( '@wordpress/components' );
  • Moving the script registration corresponding to each package into wp-includes/script-loader.php.

Scripts like wp.shortcodewp.a11y.speakwp.utils.WordCount can be replaced by their corresponding npm packages. This has already been proposed for the shortcode package and should continue for other packages.

The work being done in #core-js meetings to align the JavaScript guidelines (code style) between Gutenberg and Core would result in a formal @wordpress/eslint-preset package that should be used as a replacement for the current JSHint config.

The REST endpoints should be moved to the regular REST endpoints location in WordPress Core wp-includes/rest-api/endpoints.

The PHP utilities and classes should be moved to wp-includes.

Some minor tasks are also left to do in the Gutenberg repository:

  • Drop the Gutenberg name from all the PHP APIs still using it.
  • Finalize the block-library and edit-post packages:
    • HTML Block and Freeform block to be moved to the npm packages.
    • The creation of the edit-post package.

Test Suite

The e2e tests are crucial to avoid regression when making updates to WP-Admin. The e2e test infrastructure and the tests themselves should be moved to WordPress Core and their stability can be considered a metric for the success of the integration process.

Unit tests, in general, live next the code being tested. For packages, these will stay in the Gutenberg repository and, for the files moved to Core, the tests will follow.

What about the Gutenberg Plugin?

After WordPress 5.0 is released, the Gutenberg plugin will continue to exist. Its purpose will be changed to the development and the maintenance of the WordPress npm packages, including the editor itself, and will also serve to develop the second phase (site customization) of the Gutenberg project. Plugin updates will continue to be released during the 5.0 cycle.

The PHP part of the plugin won’t be needed anymore, as the plugin will just register new versions of the scripts of the packages to replace the ones already registered by Core.

Dev Chat Summary: September 26th (4.9.9 week 7)

This post summarizes the dev chat meeting from September 26th (agenda, Slack archive).

4.9.9 and 5.0 updates

  • @schlessera: just about time to begin work on the 5.0 release cycle
    • @antpb and I will step back as release leads and wind down the 4.9.9 release
    • Over the next couple of weeks we will start coordinating the transition to ease into 5.0 release cycle
    • Will review the work that teams are already in the middle of and determine how best to proceed
    • Announcing this change as soon as possible to provide a longer transition period to smoothly transport as much work over as possible
  • @chanthaboune: “I lead the open source teams at Automattic and am a full time sponsored volunteer to the WordPress Project.”
    • We will reach out to team reps, discuss what you’ve been working on, and what we can do to keep things moving forward so that we can make sure everyone is heard as we settle in for 5.0
    • Current understanding is that @matt is leading 5.0 and any other leads are yet to be determined
  • @jorbin: concern with canceling 4.9.9 due to upcoming PHP7.3 release, some things need to be done to make sure WordPress runs fine on this new version of PHP, I want to ensure the version of WordPress in use on December 13th is compatible with PHP7.3, a very small scoped 4.9.9 may still be needed from myself and ideally @sergeybiryukov @pento @schlessera as well
  • @desrosj: #44416 and #44771 appear to be the open PHP 7.3 compatibility tickets in Trac
  • @pento: seems possible to wrangle a small 4.9.9 release with PHP 7.3 related bug fixes, while 5.0 is ramping up
  • @matveb: Gutenberg leads are near ready to start planning merge proposal for Gutenberg, currently focused on finishing the core Gutenberg tasks, @youknowriad has made a proposal for how JS packages could work
  • @youknowriad: recommend iterative merge vs. a big merge proposal, technical proposal on how this would work was shared in #core-js meetings
  • @sergeybiryukov: some new hooks or enhancements already backported to the 4.9 branch, will need to determine whether or not that should be reverted
  • @jeffpaul: in summary… (1) it appears like a possible agreement with @jorbin @pento (and possibly others who’ve been “voluntold” but yet to confirm) to work on a 4.9.9 focused solely on PHP 7.3 support and (2) @chanthaboune will review existing 4.9.9 work with team reps to see how that should be handled with the 5.0 cycle likely starting shortly

Updates from focus leads and component maintainers

  • The Editor / Gutenberg team released v3.9 last week including the ability to create reusable templates of blocks and exporting them to a JSON file
  • The JavaScript team posted this week’s meeting summary and specifically called for help looking for npm maintainers, so please let them know if you’re interested and available. Related to that, @youknowriad shared #44987 and is looking for review there.

General announcements

  • @psykro continues to look for review and feedback on the alternate devchat proposal
  • @joyously: Theme Review Team discussing what to allow theme authors to put in the admin, possibly allowing themes the same interface as plugins do with a readme.txt file and a View Details link to enhance the theme documentation, change logs, screenshots, upsells. Will look to have discussion in Core Trac ticket or Make/Themes post (and cross-post to Make/Core).

Next meeting

The next meeting will take place on October 3, 2018 at 20:00 UTC in the #core Slack channel. Please feel free to drop in with any updates or questions. If you have items to discuss but cannot make the meeting, please leave a comment on this post so that we can take them into account.

#4-9-9, #5-0, #core, #core-editor, #core-js, #dev-chat, #gutenberg, #summary

JavaScript Chat Summary – September 25th

Below is a summary of the discussion from this week’s JavaScript chat (agendaSlack transcript).

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

Packages

Shortcode in Core

(Slack Conversation)

@youknowriad proposed a pretty exciting change which would allow to consume the existing @wordpress/shortcode npm packge in WordPress core. It’s ready for testing and gathering feedback.

Issue: https://core.trac.wordpress.org/ticket/44987

Once it lands in core, it will enable further integrations with the packages like @wordpress/a11y, @wordpress/api-request, @wordpress/wordcount, etc. This is going to pave the way to integrate Gutenberg in core.

Call for npm maintainers

(Slack Conversation)

We have only 6 team members which are able to publish updated npm packges to npm. We would love to extend this group to have more flexibility and better coverage when people take time off. 

We also discussed that we should start publishing updates to packages on regular basis like once a week. Preferably before the weekly JS chat.

@noisysocks volunteered to help with the upcoming release 🎉 Let us know if you are willing to join the group.

Open Floor

Update on Mobile Gutenberg 

(Slack Conversation)

Kudos to @hypest for adding tests for Mobile Gutenberg in Gutenberg’s Continues Integration job. This is the first step towards merging those two repositories together and bring their development process even closer. It will help us prevent introducing changes which would break the mobile project.

#javascript #core-js

Dev Chat Summary: September 19th (4.9.9 week 6)

This post summarizes the dev chat meeting from September 19th (agenda, Slack archive).

4.9.9 planning

  • @westonruter: highlighted this discussion about the scope of HTTPS support to target in 4.9.9
    • Looking for wider visibility on those items to get thoughts on what makes sense to include in 4.9.9
    • Relates to umbrella ticket #28521
  • @audrasjb: Accessibility team has a spreadsheet where we sort all the tickets on the focus a11y in order to facilitate lead’s work (see this week’s meeting notes)
  • Bug scrubs not scheduled yet, when they are it’ll be posted to Make/Core

Updates from focus leads and component maintainers

  • @kadamwhite from the REST API team wants to propose the inclusion #41305 in 5.0
    • This covers altering how we evaluate translation strings, originally with the intent of deliberating a performance improvement to the REST API. In discussions about how Locale can be applied to REST API responses for Gutenberg this issue resurfaced, because the current order of operations precludes evaluating string translations based on a passed flag (required to permit the API to provide translations in a user’s locale). To support these localization needs and to improve overall performance at the same time, we intend to milestone this ticket for 5.0.
    • @schlessera: There are two proposed solutions in the above ticket: one that fixes REST API schema translations only, and one that generally optimizes translations (REST API component team’s strong recommendation). The latter is highly preferable, but includes breaking changes for edge cases (as noted in the ticket), so might need a check against plugins first. We otherwise would like more eyes on the forthcoming patch to validate the approach and to help test it.
  • The Editor / Gutenberg team released v3.8 last week including “full screen” mode, improved mechanisms for styling blocks from a theme perspective, and exposes the custom post type used to store reusable blocks from the block inserter as a way to manage saved blocks in bulk.
  • The JavaScript team published notes from their last meeting including documentation of available Gutenberg scripts, reducing exposure of Moment.js in the `wordpress/date` module, and a couple announcements on introducing a formal asynchronous data flow as part of `wordpress/data` and the new `wp-polyfill` script added to Gutenberg.

General announcements

  • @psykro posted about alternate devchat options. Please give that a review and feedback, as ideally we get to a conclusion during next week’s devchat.
  • @whitneyyadrich & @dkotter looking for eyes on / update to Gutenberg issue#7762 as they are running into an issue where they need to be able to insert and manipulate media attachments within the Classic Block, but that’s not currently possible
    • Also imagine this being a bigger issue when migrating sites over to Gutenberg and all their existing content will be thrown into that block. There’s currently not a great way for them to modify/add to that content, if they need to do things with images.
    • Will review with Gutenberg team in next #core-editor weekly chat

Next meeting

The next meeting will take place on September 26, 2018 at 20:00 UTC in the #core Slack channel. Please feel free to drop in with any updates or questions. If you have items to discuss but cannot make the meeting, please leave a comment on this post so that we can take them into account.

#4-9-9, #a11y, #accessibility, #core, #core-editor, #core-https, #core-js, #core-restapi, #dev-chat, #gutenberg, #javascript, #summary

Dev Chat Summary: August 08, 2018 (4.9.9 Week 1)

This post summarizes the weekly dev chat meeting held Wednesday, August 08, 2018 (agenda | Slack archive).

👉🏼💥 Release Lead Nominations 💥👈🏼

It’s time to select release leads for our 4.9.9 maintenance release. Hooray! If you’d like to nominate someone, or yourself, add a comment to this post. Don’t be shy, y’all.

What does a release lead do? Here are some good resources: 

🔥 Hot Tip 🔥 You don’t have to be an engineer to be a release lead.

4.9.8 Release Feedback

  • Check the goodies in the maintenance release post, if you haven’t.
  • Big thanks to @pbiron, @joshuawold, @sergeybiryukov, @psykro and Mission Control. 🙌🏼
  • @pbiron plans to post a retrospective similar to this in the next week or two.
  • Overall, the Try Gutenberg callout has been effective in getting people to use Gutenberg and find bugs. Active users jumped from 20k to 100k in just a few days. 
  • The support team reports via @clorith things have been pretty quiet since the release. More info inbound on wider areas of focus for support, so stay tuned.
  • There are some reported issues to jump on:

4.9.9 Planning

  • We’re all going proceed as if we’re doing a 4.9.9 maintenance release, so keep working on the growing list of tickets here.
  • However, as of today, we aren’t committed to a 4.9.9 maintenance release. Why?
    • There is not a rush to get a maintenance release the door
    • We don’t have committed leads yet (see above)
    • So far, we don’t have any significant issues from 4.9.8 that require attention

Focus Lead and Component Maintainer Updates

REST API

  • The REST API meeting is today – August 9, 2018 – at  17:00 UTC. Welp, this already happened.
  • The key agenda items are: 
    • Prioritize register_meta improvements for 5.0
    • Review API-related Gutenberg tickets
    • Selecting and prioritizing additonal backlog tickets for 5.0

JavaScript

Gutenberg

Thank you to all who gave us feedback so far! The feedback is being processed and iterations are underway. 

Open Floor

Post counts on on shared taxonomy terms 

Via @davecpage. There are multiple tickets open related to this:

These are all related to the taxonomy component, and we’ll currently slate them for release in 4.9.9.

General Announcements

Dev Chat Coordination: The Sequel

@jeffpaul is ill and will hopefully return next week. Until he’s at full strength, @joemcgill@audrasjb@antpb and I will continue to run dev chat.

Next Meeting

The next meeting will take place on Wednesday, August 15, at 20:00 UTC in the #core Slack channel. Please drop in with any updates or questions. If you have items to discuss, drop a comment on next week’s agenda post, so we can take them into account.

Dev Chat Summary: June 27th (4.9.7 week 6)

This post summarizes the dev chat meeting from June 27th (agenda, Slack archive).

4.9.7 planning

  • Confirmed @pbiron and @joshuawold as co-release leads with @sergeybiryukov and @psykro as co-deputies
  • Likely focus for 4.9.7 to be “Try Gutenberg” prompt and privacy fixes
  • Release timing for 4.9.7 will be confirmed amongst release leads and shared when ready
  • Consensus that release leads have previous contribution experience (not necessarily Core contributions), also helpful that a lead or deputy has commit access
  • Aiming to expand roster of individuals who have experience leading releases, so one approach is pairing “new” leads with “experienced” ones though other candidates could feasilby be experienced enough to not require a co-lead
  • Though no defined process exists on selecting or confirming leads, if someone has concerns about a nominated lead they can directly talk with @jeffpaul if they’re not comfortable speaking up during the devchat though ideally concerns are more transparent or at least leverages a group and not a single entity to coordinate concerns appropriately

Updates from focus leads and component maintainers

  • The Gutenberg team released v3.1 and published release notes as to the updates included
  • The JavaScript team published notes from their meeting where they discussed sunsetting the packages repository, an alternative to wp.apiRequest, a deprecation strategy, data module improvements, the build process, and inline docs. Many thanks to them for continuing to share notes from their chats
  • Reminder to focus leads and component maintainers to try and publish meeting notes from your chats to help socialize what’s happening across the different teams in #core.

Devchat coordination

  • @jeffpaul will be offline most of July, so @joemcgill, @audrasjb, and @antpb will help coordinate devchats (collecting agenda items and publishing an agenda, running the actual devchat meeting, and publishing a devchat summary). post-devchat note: @whitneyyadrich also volunteered to assist with devchat coordination

General announcements

  • @jeffpaul: some comments lately about security issues and the security team, reminder about responsible security disclosures, people’s views will be better received if they’re formed as offering solutions to problems rather than continuing to point out problems
    • @paragoninitiativeenterprises: recent security advisory showed longer ETA than expected, security team needs more resources (e.g., personnel) and it falls upon the community to ensure the security team has the manpower it needs
    • @jeffpaul: anyone who feels they have the ability and interest to contribute to WordPress Security should reach out to @aaroncampbell
  • Effort from .ORG to contact hosts with large amounts of WordPress installs to help manually update sites from 4.9.3, current count hovering over a million sites but down significantly, still working with some groups (e.g., Google search console team) to try to get more people updated

Next meeting

The next meeting will take place on July 4, 2018 at 20:00 UTC in the #core Slack channel. Please feel free to drop in with any updates or questions. If you have items to discuss but cannot make the meeting, please leave a comment on this post so that we can take them into account.

#4-9-3, #4-9-7, #core-js, #dev-chat, #gutenberg, #security, #summary