Filtering nested REST response _fields in WP 5.3

WordPress 4.9.8 introduced the ability to limit the fields included in the JSONJSON JSON, or JavaScript Object Notation, is a minimal, readable format for structuring data. It is used primarily to transmit data between a server and web application, as an alternative to XML. objects returned from the REST APIREST API The REST API is an acronym for the RESTful Application Program Interface (API) that uses HTTP requests to GET, PUT, POST and DELETE data. It is how the front end of an application (think “phone app” or “website”) can communicate with the data store (think “database” or “file system”) https://developer.wordpress.org/rest-api/., for example specifying

/wp/v2/posts?_fields=id,title,author

to return a list of posts with only id, title & author fields in situations where we don’t need all of the data contained in other fields like content or media (see #38131). Since 4.9.8 we’ve made further improvements to skip computing fields we did not explicitly request when _fields is present, saving time on the server in addition to slimming down the JSON response object.

In WordPress 5.3 we are adding the ability to filterFilter Filters are one of the two types of Hooks https://codex.wordpress.org/Plugin_API/Hooks. They provide a way for functions to modify data of other functions. They are the counterpart to Actions. Unlike Actions, filters are meant to work in an isolated manner, and should never have side effects such as affecting global variables and output. by nested fields. Previously we could only request top-level properties like content or meta, which would return the full content object (with raw and rendered properties when using an edit context) or the object containing all metaMeta Meta is a term that refers to the inside workings of a group. For us, this is the team that works on internal WordPress sites like WordCamp Central and Make WordPress. values. We can now specify a nested path such as content.raw and the REST API will skip computing the rendered content, a useful performance boost for applications like 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. https://wordpress.org/gutenberg/ which only require that underlying raw post content.

Now that we can register complex array or object meta, we may similarly ask for only a few of many registered meta fields, or certain properties within a complex object, using a query such as this:

?_fields=meta.meta-key-1,meta.meta-key-2,meta.meta-key-3.nested-prop

(Note that this specific meta example depends on bugfix #48266, which will ship as part of RC1.)

Thank you @timothyblynjacobs, @dlh, @danielbachhuber, and @rmccue for assisting with the development of this useful feature!

#5-3, #dev-notes, #rest-api

REST API Chat Summary, Oct 11

This post summarizes the REST APIREST API The REST API is an acronym for the RESTful Application Program Interface (API) that uses HTTP requests to GET, PUT, POST and DELETE data. It is how the front end of an application (think “phone app” or “website”) can communicate with the data store (think “database” or “file system”) https://developer.wordpress.org/rest-api/. component team chat on Thursday, October 11 (agendaSlack transcript) and the bugbug A bug is an error or unexpected result. Performance improvements, code optimization, and are considered enhancements, not defects. After feature freeze, only bugs are dealt with, with regressions (adverse changes from the previous version) being the highest priority. scrub on Tuesday, October 16 (Slack transcript).

Updates on 5.0 priority tickets

As with last week, the meeting worked off of this post listing REST API priority tickets as an agenda. We aim to have all major 5.0-related REST API tickets landed by Thursday, to allow time Friday for final adjustments as we move into the betaBeta A pre-release of software that is given out to a large group of users to trial under real conditions. Beta versions have gone through alpha testing in-house and are generally fairly close in look, feel and function to the final product; however, design changes often occur as part of the process. stage.

In Progress

  • Progressively load data through pagination when assembling large collections for 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. https://wordpress.org/gutenberg/ dropdowns, to prevent memory errors (gutenberg#6694): @kadamwhite is working on a patchpatch A special text file that describes changes to code, by identifying the files and lines which are added, removed, and altered. It may also be referred to as a diff. A patch can be applied to a codebase for testing.. (This ticketticket Created for both bug reports and feature development on the bug tracker. does not cover any UIUI User interface changes; those are tracked separately.)
  • Post says updated when it’s a page (#3315): @earnjam has opened a pull request addressing the issue.
  • Autosaves support (#43316): @adamsilverstein is driving, and will also look into gutenberg#6556 related to autosaves.
  • Introduce a controller for searching across post types (#39965): patch is in final review.
  • Improve media titles when creating from filename (#44789): @dryanpress is working on a patch as of Oct 11.
  • Introduce WP_Block_Type, WP_Block_Type_Registry, WP_REST_Block_Renderer_Controller, and WP_REST_Blocks_Controller classes (#45097 and #45098): @desrosj has a patch in progress.
  • Localizing REST API responses: #44758 moved into milestone, support from core contributorsCore Contributors Core contributors are those who have worked on a release of WordPress, by creating the functions or finding and patching bugs. These contributions are done through Trac. https://core.trac.wordpress.org. versed in localization is strongly requested to evaluate #41305. #38218 may be a necessary compromise, though #41305 is the preferred approach given its additional benefits.
  • Saving Metadata fails if value contains slashes (#42069): waiting for final sign-off from @boonebgorges
  • More descriptive REST API error messages (#10492): needs direction on wording. Lowest priority of open issues.

Resolved Tickets

  • PHPPHP The web scripting language in which WordPress is primarily architected. WordPress requires PHP 5.6.20 or higher notices should be disabled for REST API responses (gutenberg#10476): thank you @earnjam and @danielbachhuber!
  • Theme-supports data is now exposed through the REST API for privileged users at the /wp/v2/themes?status=active endpoint (gutenberg#10518 / #45016): we have also added conditional loading to the Gutenberg classes to prevent conflicts between the coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. and pluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party controllers.
  • Permalink templates are now exposed on the posts controller (#45017
  • An action is now fired after items are completely inserted/updated (#42864)

A full list of recently completed tickets can be seen in this post.

Punted Tickets

  • Support post locking through the REST API (#44862): The current solution using the existing locking functionality is sufficient for 5.0; more discussion is needed to identify a way to represent this state in a RESTful manner.

Thank you to every contributor who has helped move these tickets forward in such a short period of time. We will have our next weekly meeting tomorrow, October 18 17:00 UTC, and have scheduled additional bug scrubs through the end of the month.

Additional REST API bug scrubs scheduled through October

Meeting notes for the October 11 REST APIREST API The REST API is an acronym for the RESTful Application Program Interface (API) that uses HTTP requests to GET, PUT, POST and DELETE data. It is how the front end of an application (think “phone app” or “website”) can communicate with the data store (think “database” or “file system”) https://developer.wordpress.org/rest-api/. component chat will be posted by Tuesday, but one item we discussed was @danielbachhuber‘s request to run one additional bugbug A bug is an error or unexpected result. Performance improvements, code optimization, and are considered enhancements, not defects. After feature freeze, only bugs are dealt with, with regressions (adverse changes from the previous version) being the highest priority.-scrub meeting each week for the next several weeks.

As noted in the REST API outstanding Gutenberg/5.0 issue list post and the notes from last week’s meeting, we have a number of outstanding tasks that need developer attention, and @danielbachhuber is requesting that developers commit to addressing bugs with a one- to three-day turnaround time after taking an issue. (If this is not possible—and it isn’t, for some of these bigger issues—that is alright; but it helps keep things moving if we check in on that schedule). Adding one additional bug scrub each week lets us evaluate our progress and commitments, and reassign in-flight bugs as contributor availability requires.

Upcoming REST API meetings through the end of October:

The Tuesday bug scrubs have been moved up 1-2 hours from the time of the normal weekly meeting to better accommodate European contributor schedules. We encourage all interested developers to attend any and all of these meetings as you are able, we will be excited to help you find a useful ticketticket Created for both bug reports and feature development on the bug tracker. to move us towards 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. https://wordpress.org/gutenberg/ and 5.0!

Edit: All meetings will be held in the #core-restapi slackSlack Slack is a Collaborative Group Chat Platform https://slack.com/. The WordPress community has its own Slack Channel at https://make.wordpress.org/chat/. channel!

REST API Chat Summary – October 4

Below is the summary for the REST APIREST API The REST API is an acronym for the RESTful Application Program Interface (API) that uses HTTP requests to GET, PUT, POST and DELETE data. It is how the front end of an application (think “phone app” or “website”) can communicate with the data store (think “database” or “file system”) https://developer.wordpress.org/rest-api/. meeting on Thursday, October 4 (Slack Transcript).

As announced previously, @danielbachhuber is stepping up to coordinate work on REST API improvements for 5.0 / 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. https://wordpress.org/gutenberg/. Daniel has prepared a running list of Gutenberg-related API tickets in this post, which we used as an agenda for the meeting.

Gutenberg-Related Ticketticket Created for both bug reports and feature development on the bug tracker. Scrub

Blocked Tickets

  • #44862, communicating edit lock via the REST API: @timothyblynjacobs has volunteered to work on a solution. Prior discussion of this functionality dates back to REST API issue 2225.
  •  Gutenberg#8449, TaxonomyTaxonomy A taxonomy is a way to group things together. In WordPress, some common taxonomies are category, link, tag, or post format. https://codex.wordpress.org/Taxonomies#Default_Taxonomies. metaMeta Meta is a term that refers to the inside workings of a group. For us, this is the team that works on internal WordPress sites like WordCamp Central and Make WordPress. box does not respect user’s language (coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. ticket #44758: REST API does not respect user localeLocale A locale is a combination of language and regional dialect. Usually locales correspond to countries, as is the case with Portuguese (Portugal) and Portuguese (Brazil). Other examples of locales include Canadian English and U.S. English.), depends on #41305 for a robust solution. I have posted separately calling for review on the proposed patch for #41305.
  • #43998, permitting unbounded requests when requesting all authors/categories/etc for use e.g. in dropdowns: this should eventually be solved with UIUI User interface/UXUX User experience improvements such as @adamsilverstein‘s PR #7385 but that may be infeasible for 5.0. An alternative to permitting unbounded requests would be to modify the frontend data layer to (invisibly to the consuming component) recursively iterate over paginated data and return a merged response object, yielding the same final client-side response without risking memory errors on the backend, but I have not had bandwidth to propose this. If you’re interested, contact me in SlackSlack Slack is a Collaborative Group Chat Platform https://slack.com/. The WordPress community has its own Slack Channel at https://make.wordpress.org/chat/.. The issue is shelved for now.
  • #43887, exposing Gutenberg data version in APIAPI An API or Application Programming Interface is a software intermediary that allows programs to interact with each other and share data in limited, clearly defined ways. responses: what constitutes a data version depends on the final merged form of Gutenberg so this is deferred for now and will be revisited later in the 5.0 cycle.

“Next” Tickets

  • #45016, exposing theme_supports data via the REST API: @desrosj has volunteered to pick this up to implement a bare-bones theme controller exposing the information Gutenberg needs. Gutenberg#6539 may need to be addressed in tandem.
  • Gutenberg#3315, page says “post updated” when it’s a page: we discussed adding a labels property to the /wp/v2/types response objects, but a PR is open on the Gutenberg repo and current discussion is directed there.
  • Gutenberg#8757, support default title and content when creating new posts: @mnelson4 has proposed a PR.
  • #43316, supporting autosaves: we would like to land this in the next couple days, if anybody wants to work on a final patchpatch A special text file that describes changes to code, by identifying the files and lines which are added, removed, and altered. It may also be referred to as a diff. A patch can be applied to a codebase for testing..
  • All participants were encouraged to review other tickets from the list in Daniel’s post, and chime in on any tickets which have a patch and are noted as ready-to-commit, to ensure any outstanding issues are surfaced before patches land.

Other Issues

  • #39953 is provisionally good to land, but has not been merged yet pending review of other milestoned REST API tickets and a call from @pento or other 5.0 shot-caller on whether it should be included.

If you have bandwidth to assist with REST API development over the coming weeks, please reach out to myself and @danielbachhuber and we will work with you to find a good issue for you to help with! If you are interested in a ticket listed above and your name is not the name of the person I mentioned who is working on it, that’s OK! Reach out to them and put your heads together, and we’ll be able to land these all the faster. Any and all assistance is welcome, and if you don’t have time to prepare a patch yourself, we always need help testing and reviewing existing patches.

Agenda for October 11 Chat

The next REST API meeting will be this Thursday, October 11, 2018 at 17:00 UTC in the #core-restapi slack channel. We will be checking in on how the tickets above have progressed, and reviewing any new priority issues. See you there!

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 committercommitter A developer with commit access. WordPress has five lead developers and four permanent core developers with commit access. Additionally, the project usually has a few guest or component committers - a developer receiving commit access, generally for a single release cycle (sometimes renewed) and/or for a specific component. 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 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. https://wordpress.org/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 bugbug A bug is an error or unexpected result. Performance improvements, code optimization, and are considered enhancements, not defects. After feature freeze, only bugs are dealt with, with regressions (adverse changes from the previous version) being the highest priority. fix) or 5.1 (other feature)
  • @kadamwhiterequest for help testing Lazily Evaluate Translationtranslation The process (or result) of changing text, words, and display formatting to support another language. Also see localization, internationalization. Strings (#41305) with input requested by the end of this working week to help remove the blockerblocker A bug which is so severe that it blocks a release. to further Gutenberg localization work
  • Plans for an updated readme.htmlHTML HyperText Markup Language. The semantic scripting language primarily used for outputting content in web browsers. to be committed with contributions open until RC
  • @chanthaboune: collecting blocker items and dates across team reps, will post listing to Make/CoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress., if you have items to add to the listing please pingPing The act of sending a very small amount of data to an end point. Ping is used in computer science to illicit a response from a target server to test it’s connection. Ping is also a term used by Slack users to @ someone or send them a direct message (DM). Users might say something along the lines of “Ping me when the meeting starts.” @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 JSJS JavaScript, a web scripting language typically executed in the browser. Often used for advanced user interfaces and behaviors. 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

  • The Gutenberg / Editor team published Gutenberg 4.0-RC
  • The REST APIREST API The REST API is an acronym for the RESTful Application Program Interface (API) that uses HTTP requests to GET, PUT, POST and DELETE data. It is how the front end of an application (think “phone app” or “website”) can communicate with the data store (think “database” or “file system”) https://developer.wordpress.org/rest-api/. team posted their meeting notes including Gutenberg-related tickets that are blocked, “next” tickets, and note on review still needed for #39953. Otherwise @kadamwhite @danielbachhuber are looking for folks with bandwidth to assist with REST API development over the coming weeks, so ping them if you have interest and availability
  • The PHPPHP The web scripting language in which WordPress is primarily architected. WordPress requires PHP 5.6.20 or higher team posted their meeting notes including the Update PHP page and WSOD protection
  • The Media team posted their meeting notes including 5.0 milestoned tickets and related action items
  • The 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. https://www.javascript.com/. team posted their meeting notes including preparations for 5.0, the annotations APIAPI An API or Application Programming Interface is a software intermediary that allows programs to interact with each other and share data in limited, clearly defined ways. in Gutenberg, and a generic data store API

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 blockBlock Block is the abstract term used to describe units of markup that, composed together, form the content or layout of a webpage using the WordPress editor. The idea combines concepts of what in the past may have achieved with shortcodes, custom HTML, and embed discovery into a single consistent API and user experience. will be able to be used in any registered “sidebarSidebar A sidebar in WordPress is referred to a widget-ready area used by WordPress themes to display information that is not a part of the main content. It is not always a vertical column on the side. It can be a horizontal rectangle below or above the content area, footer, header, or any where in the theme.” for legacy themes, and we will upgrade “menus” to a navigation block.
    • Phases 3 and 4 of Gutenberg at WordCampWordCamp WordCamps are casual, locally-organized conferences covering everything related to WordPress. They're one of the places where the WordPress community comes together to teach one another what they’ve learned throughout the year and share the joy. Learn more. US in December.
  • @audrasjb: a11yAccessibility Accessibility (commonly shortened to a11y) refers to the design of products, devices, services, or environments for people with disabilities. The concept of accessible design ensures both “direct access” (i.e. unassisted) and “indirect access” meaning compatibility with a person’s assistive technology (for example, computer screen readers). (https://en.wikipedia.org/wiki/Accessibility) 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 SlackSlack Slack is a Collaborative Group Chat Platform https://slack.com/. The WordPress community has its own Slack Channel at https://make.wordpress.org/chat/. 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, #accessibility, #core, #core-editor, #core-js, #core-media, #core-php, #core-restapi, #dev-chat, #gutenberg, #summary, #team-reps

Media Meeting Recap – October 4

Overview

This post is a summary of the latest weekly Media component meeting, which took place in the #core-media SlackSlack Slack is a Collaborative Group Chat Platform https://slack.com/. The WordPress community has its own Slack Channel at https://make.wordpress.org/chat/. channel, on Thursday, October 4, 2018 at 18:00 UTC The purpose of these meetings are to move priority tasks forward, provide feedback on issues of interest, and review media focused issues.

Attendees:
@joemcgill @danielbachhuber @mikeschroder @sergeybiryukov @pfiled @antpb

Transcript: Read on Slack

WordPress 5.0

This meeting focused entirely on the WordPress 5.0 milestone Gutenberg Issues. We reviewed each of the 18 remaining issues to determine:

  • is the issue a must have for 5.0?
  • what are next steps to getting the issue solved?

Things are looking good! This meeting resulted in remaining 5.0 issues being brought from 18 down to 11. We will focus work in the next week on Gallery backwards compatibility and Media Tabs which will help solve out more of the 5.0 milestone issues. Let’s get right into the issues discussed!

Featured Image dialogue missing “Mine”, “Uploaded to this post”, “Unattached” filters

It was agreed that this was a nice-to-have bugfix.


Consider feature parity for “Image Details” TinyMCE functionality

`attachment_fields_to_edit` filterFilter Filters are one of the two types of Hooks https://codex.wordpress.org/Plugin_API/Hooks. They provide a way for functions to modify data of other functions. They are the counterpart to Actions. Unlike Actions, filters are meant to work in an isolated manner, and should never have side effects such as affecting global variables and output. is not respected in the image fields in the media modal in GB. Which means if you need to add in a required field to an image, it won’t show up in the Gutenblock sidebarSidebar A sidebar in WordPress is referred to a widget-ready area used by WordPress themes to display information that is not a part of the main content. It is not always a vertical column on the side. It can be a horizontal rectangle below or above the content area, footer, header, or any where in the theme.. Since this ticketticket Created for both bug reports and feature development on the bug tracker. is focused around everything missing from Image Details, it would be great to get someone with agency/build experience to help. Any feedback would be much appreciated. 


Insert Link to image needs “open in new tab” option

There is already a fix ready to go. Just needs a refresh and we can merge. @antpb has tested the PR and all is working well. Currently getting Design final feedback and will get a second review on the code : https://github.com/WordPress/gutenberg/pull/9520


Support for existing Media tabs

Crucial to 5.0. There are some challenges…

As @joemcgill stated in the meeting: “The old media button opened a modal using the `wp.media.view.MediaFrame.Post` frame, which provided workflows for any kind of media you wanted to embed from a single modal. 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. https://wordpress.org/gutenberg/, we are opening specific frames using `wp.media.view.MediaFrame.Select` which are optimized to the type of blockBlock Block is the abstract term used to describe units of markup that, composed together, form the content or layout of a webpage using the WordPress editor. The idea combines concepts of what in the past may have achieved with shortcodes, custom HTML, and embed discovery into a single consistent API and user experience. you’re inserting. So it wouldn’t make any sense to include an extra menu item for an image source within the video block, for example. The `Select` frame doesn’t include the same menu area by default anyway. IMO, this is all a good thing, but what we need to do is provide either

a) a way for third parties to register their content area based on media type, which we then display in the modals for the correct blocks.

b) assume that integrators will provide their own block interfaces that are specific to the media source.

The former would be my preference.”


Uploading messages for media shouldn’t stack

@joemcgill said “I agree with the approach on the ticket. Nice to have, not a blockerblocker A bug which is so severe that it blocks a release..”
We are removing the 5.0 milestone so we can stay focused on the major blockers. We can circle back to these as we finish the merge critical tasks.


Gallery Block doesn’t apply the ‘post_gallery’ filter, causing incompatibility with WP Gallery Custom Links

Gallery: figure out way to fallback to shortcode

Both of the above issues could be solved with ServerSideRender. We could have a theme support option that can fallback to ServerSideRender. This would ensure that we hit the post_gallery filter. We could communicate out to developers that the option is available and their way to get Gutenberg ready would be to set the option. We can keep gallery as is and depend on the theme support to set the type.

@danielbachhuber mentioned “Just to drop another idea: we could fall back to `ServerSideRender` _only_ if a `post_gallery` callback was detected.”

Daniel’s suggestion seems to be the best path forward. @antpb will be working on these in the coming week.


Media Library doesn’t update after dragging image onto Image block

This seems high priority for 5.0 as the drag and drop feature breaks after first use. I’d need to do some digging into drag/drop events to really understand how to fix this. Any thoughts around?

@joemcgill said “Yup. So, this is a result of the main drag/drop interface using totally different plumbing that the media modal.
The dropzone and file uploader use the REST APIREST API The REST API is an acronym for the RESTful Application Program Interface (API) that uses HTTP requests to GET, PUT, POST and DELETE data. It is how the front end of an application (think “phone app” or “website”) can communicate with the data store (think “database” or “file system”) https://developer.wordpress.org/rest-api/., whereas the media modal uses the old ajax-action.
When you upload a new file through the media library, the attachment gets added to the backbone collection that the library uses and the library persists. We need to either always fetch a fresh collection when opening the media modal or listen for other upload events and refresh the collection passively.”

Agreed all around that this is a need to be fixed.


Images → Gallery transform fails for ID-less images

This will be moved out of the 5.0 milestone as it is not a blocker.
@joemcgill mentioned “I don’t think that the gallery block supports external images at all, unless I’m wrong. So that would be an enhancementenhancement Enhancements are simple improvements to WordPress, such as the addition of a hook, a new feature, or an improvement to an existing feature. (IMO). In the mean time, I wonder if we can add some logic that only supports that transform _if_ all selected images include IDs. That would at least eliminate the bad UXUX User experience” We can circle back to this issues after merge critical issues are cleared.


“upload_files” capability and Image relative blocks

This is a must have: Seems the bulk of the work is being done here: https://github.com/WordPress/gutenberg/pull/9301. This PR is in need of a refresh. @antpb will finish this one out


Image Block: when using a small image enlarged pixelated version is flashed on page load/refresh

This issue was no longer valid. Closed.


Image block needs to handle variety of sources

This was recently given the low priority tagtag A directory in Subversion. WordPress uses tags to store a single snapshot of a version (3.6, 3.6.1, etc.), the common convention of tags in version control systems. (Not to be confused with post tags.), so we should remove it from the 5.0 milestone as it is not a blocker. We can circle back later.


<img/> tags missing attribute filter

@joemcgill stated “Gutenberg uses a different markup structure entirely with a different filtering process. I think we would be better off writing upgrade notes that explains how to do this correctly going forward, but am open to solutions that allow back-compat of the previous filter if we can come up with an approach.” It was agreed that this was the best path forward. We are certainly open to discussion around the decision.


Insert from URL missing when adding an image

@joemcgill said “I didn’t realize that both cases were being addressed (this and the upload_files caps check) in the same PR.
Not sure about the approach there, but I do think we should try and support inserting from URLURL A specific web address of a website or web page on the Internet, such as a website’s URL www.wordpress.org if we can.” We’ll need to see if this can be split in two tasks.


Images alt attribute in an editing context

This seems pretty important. It should be fairly simple to set a default alt if none is passed back from the media modal.

@joemcgill said “Yup. Let’s keep it as a must have. I’m happy to work on that one.”


Gallery: choosing thumbnail size

@joemcgill said “This is similar to the other image enhancements we were looking into. It’s quite important for responsive images that we’re selecting the best image size for the layout. If the gallery block is still inserting “full” size images, then this is really bad for page speed performance and should be addressed.
I’m less concerned about choosing explicit intermediate sizes (e.g., medium, large, etc) but we shouldn’t be using full unnecessarily.
Related: I think we need to go through https://github.com/WordPress/gutenberg/issues/6177 and break it into distinct actionable issues and see what could be milestoned. That issue contains too many items, IMO.”


Next Meeting

The next #core-media meeting is set for Thursday, October 11, 2018 at 18:00 UTC See you there!

#core-media, #media, #summary

#core-media

WordPress 5.0 for Contributors and Committers

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. https://wordpress.org/gutenberg/ is a big project, and many WordPress contributors have limited hours in which they can contribute. This makes getting up to speed on the scope of Gutenberg a daunting (if not insurmountable, at least in the WordPress 5.0 timeline) task. With this phase of the Gutenberg project setting the stage for the future of WordPress development, I’m sure you’re wanting to get involved in whatever way you can, so my goal is to help you get up to speed as quickly as possible. Every one of you has different skills, availability, and experience with the Gutenberg project, so the Gutenberg and WordPress 5.0 teams need your help to prioritise what information you need.

If you’re an experienced contributor or committercommitter A developer with commit access. WordPress has five lead developers and four permanent core developers with commit access. Additionally, the project usually has a few guest or component committers - a developer receiving commit access, generally for a single release cycle (sometimes renewed) and/or for a specific component. 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, you’re exactly who I need to hear from.

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 the mean time…

While we’re sorting out which tasks are available, please read Gutenberg’s Getting Started documentation, and get a Gutenberg environment up and running. The helper scripts in the Gutenberg repo use Docker, but if you already have an environment you prefer, there’s no need to switch: just make sure you have Node 8.x (or higher), and the latest NPM installed.

There are a few places where you can start straight away, depending on which components are of particular interest to you:

I’m also putting in a special request for folks to help with triaging TracTrac An open source project by Edgewall Software that serves as a bug tracker and project management tool for WordPress. reports:

  • Open tickets in the 5.0 milestone need to be reviewed, most of them should be moved to the 5.0.1 or 5.1 milestones.
  • Closed tickets in the 5.0 milestone need to be reviewed, and reopened if the need to be ported to the 5.0 branchbranch A directory in Subversion. WordPress uses branches to store the latest development code for each major release (3.9, 4.0, etc.). Branches are then updated with code for any minor releases of that branch. Sometimes, a major version of WordPress and its minor versions are collectively referred to as a "branch", such as "the 4.0 branch".. If they don’t need to be in 5.0, there are two options:
    • If they should be in a 5.0.x release, move them to the 5.0.1 milestone, and reopen them for porting after 5.0 is released.
    • If they can wait until 5.1, move them to the 5.1 milestone. If they need changes due to the milestone move (eg, inline documentation needs to be updated to the new version), reopen them.
  • Open tickets in the 4.9.9 milestone will mostly be moved to the 5.0.1 milestone, though there may be some that are appropriate for 5.0.
  • Closed tickets in the 4.9.9 milestone will probably need to be reopened and moved to the 5.0 or 5.0.1 milestones.

These are just a few areas you can explore to get started. If there’s a different area you’d like to be contributing to, please say so, and we’ll see what we can find!

#5-0

Dev Chat Summary: October 3rd (5.0 Week 1)

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

5.0 planning

  • See @matt‘s post on plan for 5.0 and leads across the critical focuses involved in the release
  • See also @youknowriad‘s post on the technical overview of Gutenberg integration for specifics on how 5.0 could progress
  • See also @pento‘s post on the proposed release schedule
    • Current release date is November 19th, could be pushed as late as November 27th if needed.  If more time is needed, then we’ll move the release to January 22, 2019.
  • @pento: intention is to have 5.0 out (including some small fixes to ensure compatibility) before PHPPHP The web scripting language in which WordPress is primarily architected. WordPress requires PHP 5.6.20 or higher 7.3 is released. If 5.0 delays significantly, then there will be a 4.9.9 release with just the PHP 7.3 compatibility fixes.
  • @joen: fast approaching UIUI User interface freeze, likely by RC if not by BetaBeta A pre-release of software that is given out to a large group of users to trial under real conditions. Beta versions have gone through alpha testing in-house and are generally fairly close in look, feel and function to the final product; however, design changes often occur as part of the process. 1 (October 19th), though bugs and testing feedback might force us to have to make changes
  • @matveb: feature freeze during betas, towards end of the month, based on work remaining in Make/Core update
  • Twenty Nineteen theme will be included in 5.0 with discussions in #core-themes, though the 5.0 release won’t be delayed if the theme evolves slowly, development will take place on GitHubGitHub GitHub is a website that offers online implementation of git repositories that can can easily be shared, copied and modified by other developers. Public repositories are free to host, private repositories require a paid subscription. GitHub introduced the concept of the ‘pull request’ where code changes done in branches by contributors can be reviewed and discussed before being merged be the repository owner. https://github.com/ with @kjellr publishing a post on the topic shortly
  • @laurelfulford creating TracTrac An open source project by Edgewall Software that serves as a bug tracker and project management tool for WordPress. tickets for bundled theme updates
  • @chanthaboune still following up with component teams to discuss concerns on shift from 4.9.9 to 5.0
  • @pento still working to determine the 5.0 release branchbranch A directory in Subversion. WordPress uses branches to store the latest development code for each major release (3.9, 4.0, etc.). Branches are then updated with code for any minor releases of that branch. Sometimes, a major version of WordPress and its minor versions are collectively referred to as a "branch", such as "the 4.0 branch". in SVNSVN Subversion, the popular version control system (VCS) by the Apache project, used by WordPress to manage changes to its codebase., likely not viable to work from trunk for 5.0, may branch 5.0 from 4.9 and work there, a Make/CoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. post will come once that’s determined
  • @matt: open to having 5.0.x releases that are like the 4.9.x releases that bring in some larger updates or improvements we push off (e.g., servehappy the WordPress PHP education initiative)
  • @youknowriad: will continue updating 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. https://wordpress.org/gutenberg/ documentation in the plugin (they’re markdown files) while making it clear in the Handbook which version you’re looking at:
    • Is it the integrated version into Core (the default)
    • Is it the handbook for the updates coming to Core (the current version in the pluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party)
    • A version selector could also be integrated
  • @lonelyvegan: list of documentation issues noted in GitHub repo
  • @matveb: note plan to reorganize handbook to give more visibility to vision/guidelines
  • @danielbachhuber: collecting REST API-related issues for 5.0, any help on them would be greatly appreciated
  • @jorbin: 400+ open tickets in the 5.0 milestone needing a bugbug A bug is an error or unexpected result. Performance improvements, code optimization, and are considered enhancements, not defects. After feature freeze, only bugs are dealt with, with regressions (adverse changes from the previous version) being the highest priority. scrub
  • Help appreciated on tickets labeled as Needs Testing or Needs Technical Feedback
  • @desrosj: can help write dev notesdev note Each important change in WordPress Core is documented in a developers note, (usually called dev note). Good dev notes generally include: a description of the change; the decision that led to this change a description of how developers are supposed to work with that change. Dev notes are published on Make/Core blog during the beta phase of WordPress release cycle. Publishing dev notes is particularly important when plugin/theme authors and WordPress developers need to be aware of those changes.In general, all dev notes are compiled into a Field Guide at the beginning of the release candidate phase. needed
  • @joemcgill: ideally Gutenberg goes through feature merge process to ensure security/a11yAccessibility Accessibility (commonly shortened to a11y) refers to the design of products, devices, services, or environments for people with disabilities. The concept of accessible design ensures both “direct access” (i.e. unassisted) and “indirect access” meaning compatibility with a person’s assistive technology (for example, computer screen readers). (https://en.wikipedia.org/wiki/Accessibility)/etc. reviews

Updates from focus leads and component maintainers

  • The PHP team shared notes from last week’s meeting including the Update PHP page and WSOD protection. You can catch them again next week on Monday, October 8th at 15:00 UTC in #core-php.
  • @kadamwhite: thanks to @schlessera for patchpatch A special text file that describes changes to code, by identifying the files and lines which are added, removed, and altered. It may also be referred to as a diff. A patch can be applied to a codebase for testing. on #41305 to help properly localize the front-end using REST APIREST API The REST API is an acronym for the RESTful Application Program Interface (API) that uses HTTP requests to GET, PUT, POST and DELETE data. It is how the front end of an application (think “phone app” or “website”) can communicate with the data store (think “database” or “file system”) https://developer.wordpress.org/rest-api/., otherwise this is ready for testing
  • @aduth: no 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. https://www.javascript.com/. meeting this week, but we will resume Tuesday in #core-js (see agenda in our previous week’s recap), suggestions for topics welcome!
  • The Editor team will continue using the #core-editor channel and weekly meetings at the same time on Wednesdays to continue progress on Gutenberg tasks

General announcements

Next meeting

The next meeting will take place on October 10, 2018 at 20:00 UTC in the #core SlackSlack Slack is a Collaborative Group Chat Platform https://slack.com/. The WordPress community has its own Slack Channel at https://make.wordpress.org/chat/. 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, #core, #dev-chat, #summary

4.9.8 Bug Scrub Summary: July 26

This post summarizes the 4.9.8 bugbug A bug is an error or unexpected result. Performance improvements, code optimization, and are considered enhancements, not defects. After feature freeze, only bugs are dealt with, with regressions (adverse changes from the previous version) being the highest priority. scrub meeting from July 26th (Slack archive).

TL;DR

  1. 4.9.8 RC2 has been released.
  2. We are on target for final 4.9.8 release on Tuesday July 31st as originally scheduled that includes the Try Gutenberg callout, and we have a number of fallback plans should that not happen.

Agenda

  • Identify and discuss any new issues or problems that may have surfaced as a result of testing the 4.9.8 betas and RC1. If no issues occur, we’ll move to a RC2 after the meeting, if yes we’ll work through them during the meeting and then decide next actions.
  • Update on the Try 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. https://wordpress.org/gutenberg/ callout / Gutenberg readiness
  • Quick straw emoji poll on moving forward with release next week.

4.8.9 Betas and RC1 Testing

During the meeting several people shared that they conducted significant testing and did not discover any problems.

One person reported that in RC1 the Try Gutenberg callout was not completely dismissable: if a user dismissed it, the next time that user went to the Dashboard the callout appeared again.  This problem had already been identified and a fix for it had already been committed for inclusion in RC2.

Since no other problems were reported, it was decided to go ahead with the release of RC2, which happened right after the bug scrub.

Update on the Try Gutenberg callout / Gutenberg readiness

@danielbachhuber, a member of the Gutenberg team, joined us to give an update on Gutenberg readiness from his perspective.

He shared that the Gutenberg team has been working through a number of issues that have been identified as “Try Gutenberg blockers”, which are defined as:

The issue causes some amount of data transformation that would be non-trivial to recover from at scale (particularly if revisionsRevisions The WordPress revisions system stores a record of each saved draft or published update. The revision system allows you to see what changes were made in each revision by dragging a slider (or using the Next/Previous buttons). The display indicates what has changed in each revision. are disabled).

The most recent list of such blockers is at https://github.com/WordPress/gutenberg/issues/7147 and the Gutenberg team has been working from a Try Callout milestone.

Daniel then reported that

It’s looking likely that we’ll have a Gutenberg v3.4 release at some point in the next few days.

That Gutenberg release will address the blockers referenced above.

He also reported that the Gutenberg team is prepared to quickly release Gutenberg v3.4.1 and v3.4.2, etc, as new problems are reported resulting from the increased usage of Gutenberg because of the callout.

Big props to @danielbachhuber for that update and his input on other questions raised during the scrub!

Quick straw emoji poll on moving forward with release next week

Before the straw poll, there was a discussion of what should happen IF it was decided to puntpunt Contributors sometimes use the verb "punt" when talking about a ticket. This means it is being pushed out to a future release. This typically occurs for lower priority tickets near the end of the release cycle that don't "make the cut." In this is colloquial usage of the word, it means to delay or equivocate. (It also describes a play in American football where a team essentially passes up on an opportunity, hoping to put themselves in a better position later to try again.) the callout to 4.9.9: specifically, whether an RC3 that did not contain the callout would be needed and how long that RC3 should be available before releasing 4.9.8 Final without the callout.

There was some support for doing an RC3, to ensure that the revert of the callout was clean.  As to how long RC3, if it were needed, should be out before final was released, two alternatives were suggested:

  1. Have RC3 available for testing for 1 week, which would delay the final release of 4.9.8 by 1 week.
  2. Allow RC3 testing for 1-2 days, which would allow final to be released within the same week as originally scheduled.

No decision was made on those alternatives, but the release co-leads will announce which alternative is most ideal should the need for RC3 arise (see @pento‘s suggestion below).

We then moved on to the following straw poll:

Straw poll: How do you feel about having the Try Gutenberg callout in 4.9.8 release on Tuesday? I’ll add 3 emojis, feel free to vote accordingly on each one. (Please note, this doesn’t denote a decision, just seeing where folks are landing)
👍 👎 ❓

The final result of the poll (as of the writing of this post) was:

13 👍
6 👎
1 ❓

Note: the straw poll is still open and the community is encouraged to cast your votes.

Those voting 👎 were asked to share their reasoning and what it would take to turn their vote into 👍.

The main reasons fell into 2 categories:

  1. Agencies (or others that manage large numbers of sites) not yet being ready to roll out Gutenberg
  2. Hosting companies needing more time to prepare for a Gutenberg rollout

During the ensuing discussion, it was clarified that the inclusion of the callout does not force users, nor agencies nor hosting companies, to roll out Gutenberg with 4.9.8 (which changed a few, but not all, votes to 👍).

While it didn’t come up during the discussion, it should be noted that the changes to the callout between RC1 and RC2 provide a hook to give hosting companies (and agencies) more control over the callout.

Update: discussion after the scrub

After the scrub, @pento shared his thoughts on the topics covered during the scrub (he was unable to join the scrub, a worldwide team definitely lends itself to async communication).

The most important (IMHO) of those thoughts are:

As we’re about to put Gutenberg in front of a lot of sites with existing content, it’s a reasonable assumption that folks will try out the blockBlock Block is the abstract term used to describe units of markup that, composed together, form the content or layout of a webpage using the WordPress editor. The idea combines concepts of what in the past may have achieved with shortcodes, custom HTML, and embed discovery into a single consistent API and user experience. editor, find that it doesn’t quite work for them yet, and switch back to the classic editor. It’s not a bad thing if this happens, these folks will be able to give us insight into the myriad of WordPress configurations that exist out there, and how they interact with the block editor.

At this stage, Gutenberg will be ready for the current 4.9.8 release schedule. The remaining issues in the Try milestone are either nearing completion, relatively simple (or non-invasive) to implement, or stretch goals. However, it’s good to have a plan for if this changes.

Should something happen to delay clearing the Try milestone, someone from the Gutenberg crew (probably me) will keep the release leads informed on what’s happening, how much time is needed, and what our recommendations are. Again, it would ultimately be up to the release leads to decide their course of action.

In response to a follow-up question, @pento said:

If Gutenberg was not quite ready come Tuesday, I would be inclined to delay a little. We have the option of delaying 1-2 days, or delaying a week: both of those options have merits and drawbacks. My primary concern is that we’ve announced, then pulled, the Try callout twice, I don’t think there’s any benefit (and there’s significant drawback) of doing it a third time.

If we did need to pull the callout, however, I don’t think we’d need an RC3, we didn’t do an extra RC the last two times. The callout is quite self contained, it’s pretty simple to revert.

We really appreciate the work everyone has done to help bring this release together. It’s been a tremendous opportunity to support and help make sure all the pieces can fall into place at the right time. Thanks to everyone who has been helping get this release ready!

#4-9-8

Dev Chat Summary: June 20th (4.9.7 week 5)

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

4.9.7 planning

  • Leads nominated so far: @sergeybiryukov able to help as deputy (e.g., committing, backporting); @danieltj, @tristangemus, @pbiron, and @danielbachhuber open to help contribute during 4.9.7
  • Potential focus for 4.9.7 so far “Try 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. https://wordpress.org/gutenberg/” prompt and privacy fixes
  • Release timing for 4.9.7 will be determined after a release leadRelease Lead The community member ultimately responsible for the Release. is named
  • No confirmed interest in release leads from other team reps and component maintainers or from WCEU, but #design team likely in future minor releases
  • Looking to increase diversity in release leads by asking for nominations or suggestions outside just devchat and summary posts, please share any ideas you have on this… thanks!
  • For those with interest and availability, please review the Releasing Minor Versions handbook page and the Release leads feedback on 4.9.5 post
  • Will look to make decision on 4.9.7 release leads in next week’s devchat

Devchat coordination

  • @jeffpaul will be offline most of July, so we’ll need someone to help coordinate/run devchats
  • So far @joemcgill, @audrasjb, and @antpb have graciously offered their time, hoping for 1-2 more people to help to help share the load
  • If you’re open to collecting agenda items and publishing an agenda, running the actual devchat meeting, and/or publishing a devchat summary then please comment here or pingPing The act of sending a very small amount of data to an end point. Ping is used in computer science to illicit a response from a target server to test it’s connection. Ping is also a term used by Slack users to @ someone or send them a direct message (DM). Users might say something along the lines of “Ping me when the meeting starts.” @jeffpaul if you’re able to help out… thanks!

Updates from focus leads and component maintainers

  • The Gutenberg team would like to encourage testing of the next few releases as they get closer to feature complete
  • The 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. https://www.javascript.com/. team shared an update on the process of adding inline docsinline docs (phpdoc, docblock, xref), so if you’re interested and able to contribute please check it out. They also posted a summary of their meeting covering documentation, polyfills, and deprecation strategy for WP JSJS JavaScript, a web scripting language typically executed in the browser. Often used for advanced user interfaces and behaviors. code.

Next meeting

The next meeting will take place on June 27, 2018 at 20:00 UTC in the #core SlackSlack Slack is a Collaborative Group Chat Platform https://slack.com/. The WordPress community has its own Slack Channel at https://make.wordpress.org/chat/. 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-7, #core, #core-js, #dev-chat, #gutenberg, #summary