Javascript Chat Summary: Tuesday, November 5, 2019

Below is a 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.

Editor-specific .gitignore entries in Gutenberg

  • Context: https://github.com/WordPress/gutenberg/pull/18257#discussion_r342255694
    • Proposing to add a gitignore entry for VSCode’s “.vscode” local folder
  • Historically we’ve avoided editor-specific entries in the project’s gitignore to avoid opening pandora’s box (proliferation of ignore entries), but is this too rigid a guideline causing friction in new contributor onboarding?
  • Question: Should we allow more of these entries, and if so, which?

@gziolo said that he does not have a strong opinion on this item, but WordPress as a project is strict about it.

@mkaz also does not feels strong either way but said he would probably merge the PR because vscode its perhaps the largest and most popular editor.

@chancethedev shared his perspective as an instructor:

I often include vscode settings in my repos to make things easier for students when running workshops, so ignoring it globally won’t work for me. That said, I can just remember to remove it before I commit so it’s not a HUGE deal, I can just imagine folks slipping up often enough to where it’ll end up in commits from time-to-time and we’ll just have the conversation again.

@aduth and @adamsilverstein asked if the fact that WordPress os strict is written down somewhere?

@gziolo shared the following comment from https://core.trac.wordpress.org/ticket/34345:

IDE-specific .gitignore rules should not be present in a project. They should be managed in the user’s ~/.gitignore_global.

@gziolo added that it does not look like it is a written rule, as he was not able to find it in the docs. So, we can go both ways; we should document it to make it easy for contributors to update patches.

@nerrad said :

I lean towards adding the rule and just evaluating on a case-by-case basis.

It seems to be more dev friendly and avoids unnecessary noise in reviews.

@mkaz asked if there is any downside to adding the rule and @aduth answered:

I don’t think there’s a downside in-and-of-itself, more the slippery slope of how we make these decisions in the future without a well-defined approach.

@adamsilverstein suggested as action item working on some language for HOW we decide.

@mkaz and @gziolo suggested we add 3-5 top popular IDEs. @gziolo said we could also link to docs how to add an IDE to ~/.gitignore_global.

@aduth suggested, and @adamsilverstein supported that we can base it on “X% or greater” of some well-defined data, e.g., https://insights.stackoverflow.com/survey/2019#technology-_-most-popular-development-environments.

@chancethedev said he is joining the docs team specifically for Gutenberg docs, so he is happy to bring this up in the docs meeting today as well.

If you have any thoughts on this, please share them.

Bundling and loaders – extend core to allow SVG components

As part of the open floor, @mkaz introduced the topic by saying: 

For the open floor, I’m interested in the topic above regarding bundling and loaders – trying to extend core to allow SVG components.

Parcel sounds like an interesting option but looks like v2 is not out yet, so would need to wait

@aduth asked clarification on the background of this task and what is trying to be achieved by importing an SVG.

@mkas linked to the ticket https://github.com/WordPress/gutenberg/issues/14628 and said:

Right now the Social Links duplicates the SVG in CSS and PHP to work – we want to figure out some way to get it to a single .svg file

@aduth asked if it’d be feasible to manually shove the SVG into JSX. And asked if not an option to use something like <img src="icon.svg">.

@mkaz answered that the problem for the publishing view is KSES, and linking to images, one loses the ability to color them.

@aduth shared the main questions he thinks we should answer are “Should we do it, and if so, how?” and shared some thoughts :

  • I am conscious of the size inflation, though I think we need to be solving this problem anyways. Could be a way to prompt us to investigate better handling of “large” blocks (opening path for more complex blocks too, like reintroducing Code+SyntaxHighlighting).
  • I guess there is some issue with our build that the Webpack loader might not work? The Babel transform seems less ideal, but also workable.

@gziolo shared the following analysis of what creat react app did:

CRA experiments with Babel macros, but the blocker at the moment is cache invalidation. They had a very solid proposal to inline many types of files, including SVG with Babel macros https://github.com/facebook/create-react-app/issues/3722#issuecomment-458124126.

Macros struggle with the cache invalidation for the dependent files. See the comment in create-react-app https://github.com/facebook/create-react-app/commit/11737bc78676868e76ce5d0c04ddbb5c758d3908#diff-b1524f1e1ccabdb327a12f23b432b20bR13.

Related Babel issue which might resolve this issue in the future: https://github.com/babel/babel/issues/8497.

@mkaz said Parcel 2 sounds like a potential option for the future. Then, asked if we want to add SVGR support to wp-scripts without it in core Gutenberg, relevant PR https://github.com/WordPress/gutenberg/pull/18243. @gziolo answered that we use a custom config in Gutenberg, so it should be fine.

#core-js, #javascript, #meeting-notes

REST API Meeting Agenda for Nov 7

The REST API weekly component chat will occur this week at November 7, 2019 18:00 UTC in the #core-restapi Slack channel.

Please note: We have not changed the UTC time for this meeting. If your country has recently adjusted for daylight savings time, this may be a different hour than the past few months.

Agenda Items:

  • Continue discussion from WordCamp US around a canonical authentication solution and begin tasking out work towards that effort
  • Discuss priorities for the 5.4 development cycle
  • Discuss needed documentation improvements
  • Open Floor

All agenda items are welcome, from all teams and contributors; please post them as comments below or let us know by joining the meeting.

#agenda, #rest-api

Core editor chat summary November 6th, 2019

This post summarizes the weekly editor chat meeting agenda here. Held on Wednesday, 6th November 2019 held in Slack, moderated by @karmatosed, notetaker: @itsjusteileen.

Weekly Priorities

WordPress 5.3RC4

WordPress 5.3 is currently scheduled to be released on November 12 2019, but we need your help to get there—if you haven’t tried 5.3 yet, now is the time!

November Gutenberg Priorities

Priorities for the coming month are categorized into these three headings: 

  • Block Content Areas,
  • Menu Navigation Block, and 
  • Tightening up existing interactions

For more details, consult this recent post.

Task Coordination

Note: Anyone reading this summary outside of the meeting, please drop a comment in the post summary, if you can/want to help with something.

@karmatosed

  • Catchup after WCUS: so many good conversations about the editor!
  • Navigation block and catching up on reviews is my top priority.

@getdave

  • merging experimental `LinkControl
  • merging new link UI into the experimental Nav Menu Block 
  • Removing experimental flag soon, view progress dashboard is constantly updated with issues and PRs
  • Merged `DimensionControl` and `ResponsiveBlockControl` for creating Block Controls that require per-viewport “responsive” settings
  • Adding to the Group Block. Would love some eyes on this soon. 

@andraganescu

@bartczyz Taking on Special characters in permalink not being properly converted 

@copons started PRs for Site Description block: 

@nerrad — requesting review for PR that exposes a simple api for wrapping react elements for new feature: Introduce __experimentalCreateInterpolateElement. While I recognize this is not a complete solution, I think it provides an api for working with interpolated elements that also solves the need for i18n in those contexts.

@tellthemachines working on:

  • reviewing nav-related PRs
  • reviewing/testing the font size picker PR
  • picking up PR #13203 Responsive View Controls in Gutenberg

@noisysocks doing some work on replacing the NUX dot tips with a welcome guide modal.

@gziolo worked on Storybook integration

  • Playground awaiting review PR #18191
  • Progressing with explorations for Patterns API for blocks
  • Proposal for an experimental API PR #18270 
  • API integrated with the Columns block PR #18283
  • Will continue with Patterns API integrating proposed API with more blocks and extract common logic as an initial screen for blocks that define `patterns`

@nukaga

  • PR #18162 Updates columns index.js adding translatable (i18n) where a series of sentences displaying “lorem ipsum” was not translatable.
  • Looking at PR #15827 Twitter URL Embed automatically in Preformatted Blocks. Bug confirmed by @nerrad and ready to be picked up for work.

Open Floor

@pbrocks proposes picking up with adding SASS/PostCSS to wp-scripts process

@noahtallen looking for discussion and feedback about the block template API in his comment on Github.

@jesserh asking for review on PR#18164 to define allowed blocks per column

Announcing the new #core-css Slack channel

As a result of discussion in the last core dev chat we now have a brand new Slack channel dedicated to all things CSS!

Why do we need it/what is it for?

As a place to discuss CSS architecture and tooling, propose and maintain standards, ask questions and educate on best practices.

We have a ton of CSS in Core, and some of it is really old. Not that being old is in itself a bad thing 😁 but we might not need to support IE6 anymore, so some of those styles could use a bit of an upgrade. Having a dedicated CSS channel will help drive and focus efforts to improve our codebase for the benefit of all users and contributors.

In addition to that, we have a whole heap of CSS in Gutenberg, which, although more modern, needs care and maintenance too. 

There’s also something I perceive as a visibility issue. For instance, there’s a bit of a discussion going on in the GitHub repo around whether we should adopt CSS-in-JS tooling. It came up a few weeks ago in #core-js, and although to some extent it makes sense to discuss JS-based approaches in the JS channel, there’s a lot more at stake here than just the JS side of it. Not all contributors to the CSS parts of the codebase are JS devs, and not all of them are in the JS channel. It might be good to pull issues like that one into a CSS forum so we can get more diversity of input and opinions on them. 

Last but not least, CSS is transversal to Core and Gutenberg, and I hope a shared channel will help keep that wider scope in mind when we think of the changes we need to make on either side ❤️

Come and be part of the discussion in #core-css!

Dev Chat Summary: November 6, 2019 (5.3 week 12)

This post summarizes the weekly dev chat meeting from November 6th 2019 (agenda / Slack archive).

Announcements

WordPress version 5.3 Release Candidate 4 was released on Tuesday 5th. Everyone please help by testing out the RC.

Upcoming Releases – 5.3

@joyously asked where to look to see how translations are going for WordPress 5.3. @mapk shared the link to the project summary on Translate.

@collet raised some issues discovered on Twenty Twenty:

  • One issue related to nested rules in full-width Group & Cover blocks: 965.
  • Four issues related to column block: 960, 961, 962 and 963.
  • One issue related to nested blocks on starter content: #959
  • Also mentioned a pull request (701) that would be a worth inclusion in 5.3

@johnbillion answered Twenty Twenty can be updated independently of core. It’s ultimately up to the team behind the theme to decide if any of these bugs need to go into Twenty Twenty before 5.3 is released, or whether they can wait until a patch release of the theme.

@anlino will take a look at fixes for the columns issues today and tomorrow. Hopefully he can get those fixes before 5.3 final release. If there isn’t time to get them tested and merged properly, at least we’ll have the fixes good to go post-release.

The issues will be discussed in Twenty Twenty GitHub repository and in the core-themes and core-editor Slack channels to see what can land in time for final release of 5.3.

@collet also mentioned an issue related to the About page. In the about page. it’s said that “Heading blocks now offer controls for text and background color”. However, there is no control to change the background color inside the editor. It doesn’t appear to be related to Twenty Twenty. It needs to be updated in the About page.

Finally, @mikeschroder asked for more testing concerning a recent post published on Make/Core: Use of the “wp_update_attachment_metadata” filter as “upload is complete” hook

Open floor

@isabel_brison asked if a core-css channel could be created on Make WordPress Slack team to discuss CSS stuff. Given the amount of positive reactions, the Slack channel was immediately created by @peterwilsoncc 💥🕺💃

@mpcube asked for a review on ticket #48506. Discussion to continue in the proper ticket.

Move Dev chat meeting time (end of daylight saving time)

@audrasjb asked for a final decision about moving the dev chat meeting time with end of daylight savings time (DST). The meeting attendees agreed to move it from 20:00 UTC to 21:00 UTC starting on Wednesday 13th November. The New Contributor Meeting will also move from 19:00 UTC to 20:00 UTC.

These notes were taken by @audrasjb and proofread by @davidbaumwald

#5-3, #css, #devchat, #twentytwenty

Dev Chat Agenda for November 7, 2019 (5.3 week 12)

Here is the agenda for the weekly meeting happening later today: Wednesday, November 6, 2019, 08:00 PM UTC.

Agenda

  • Announcements
    • Highlighted posts
    • Move Dev chat meeting time (end of daylight saving time)
  • Recap from WordCamp US Contributor Day
  • Upcoming Release Discussions
  • Calls from component maintainers
  • Open Floor

If you have anything to propose for the agenda or specific items related to those listed above, please leave a comment below.

This meeting is held in the #core channel. To join the meeting, you’ll need an account on the Making WordPress Slack.

#5-3#agenda#devchat

Editor Chat Agenda: 6 November.

Note taker: @mikeschroder

This is the agenda for the weekly editor chat scheduled for Wednesday, 6 November, 2019, 09:00 AM EDT.

This meeting is held in the #core-editor channel in the Making WordPress Slack.

  • Weekly Priorities
  • Task Coordination
  • Open Floor

If you have anything to share for the Task Coordination section, please leave it as a comment on this post.

If you have anything to propose for the agenda or other specific items related to those listed above, please leave a comment below.

#agenda#core-editor#editor-chat

Use of the “wp_update_attachment_metadata” filter as “upload is complete” hook

As previously mentioned in Updates to Image Processing in WordPress 5.3 and Introducing handling of big images in WordPress 5.3, there have been changes in image post-processing after upload.

In WordPress 5.3, the image metadata is saved after each intermediate size is created to allow the processing of images to happen over multiple requests. This means the wp_update_attachment_metadata filter is run repeatedly while the image sub-sizes are being created. This fulfills the intended use of the filter, to let plugins “filter” the metadata before saving it to the database. It runs on all metadata updates, like when editing an attachment post, in wp_ajax_crop_image(), or to update the ID3 data for audio files.

However, some plugins are using the wp_update_attachment_metadata filter as an “upload is complete” hook (#48451). The changes in 5.3 are great for plugins that benefit from processing smaller amounts of information/images at a time, but may trigger more overhead/unneeded processing for plugins that bulk process images using that filter. A better hook to use for these cases is wp_generate_attachment_metadata.

An alternative solution may be to add context (by adding another parameter) to the wp_update_attachment_metadata filter.

The most likely plugins to be affected are those that use wp_update_attachment_metadata to do additional post-processing of uploaded files. After a plugin repo search, some examples of plugins that do this are Smush Image Compression and Optimization, WP Offload Media Lite for Amazon S3, DigitalOcean Spaces, and Google Cloud Storage, EWWW Image Optimizer, ShortPixel Image Optimizer, Compress JPEG & PNG images, Imagify – WebP & Image Compression and Optimization, a3 Lazy Load.

It would be ideal if the authors of potentially affected plugins could test and update them, if necessary, to continue working well in WordPress 5.3 or share any difficulties encountered on #48451.

Core-Privacy office hours agenda for 6 November 2019

The #core-privacy team had a great WordCamp US, with a brilliant talk from @riankinney on CCPA as well as a burst of effort on contributor day.

To keep that momentum going, we would like to run a full office hours at our usual time this Wednesday, 6 November, at 1900 UTC in our Slack channel. All are welcome.

Our loose agenda includes:

#core-privacy

Join the Gutenberg Customization Conversations 🎨

As we head towards the end of the year, two last projects surface as the culmination of the Gutenberg Customization phase. If you are interested in contributing, or want to join the ongoing discussions, this post outlines what the main focuses are and the threads to follow.

Full Site Editing.

Over the past eight months activity has focused on refining the editor experience, converting widgets to blocks, defining block areas, creating a new navigation block, introducing global blocks like site title, and several new tools to improve the customization capabilities of blocks. The idea is for all these elements to come together in an editor mode that comprehends the full structure of a site, including its global elements and dynamic pages.

Label “[Feature] Full Site Editing” in the repository for more details.

Block Patterns.

While blocks are powerful visual tools to achieve many different designs, it can take time and knowledge to combine them properly to achieve the most pleasing results. Since Gutenberg already supports block templates, it should be possible to offer users designs and patterns that are already assembled for them — made of various existing blocks — which users can then customize to their will with familiar tools. Part of this work includes exposing relevant APIs so these can be more easily developed and discovered.

You can also join the weekly meetings held in the #core-editor channel in the Making WordPress Slack, every Wednesday at 13:00 UTC.

Thanks for the help!

#gutenberg