WordPress.org

Make WordPress Core

Opened 10 days ago

Closed 9 days ago

#48447 closed defect (bug) (fixed)

Update WordPress packages with fixes targeted for 5.3 RC3

Reported by: youknowriad Owned by:
Milestone: 5.3 Priority: normal
Severity: normal Version:
Component: Editor Keywords: has-patch dev-feedback commit
Focuses: Cc:
PR Number:

Attachments (2)

packages-update-5-3-rc-3.diff (15.3 KB) - added by youknowriad 10 days ago.
48447-readability-fixes.diff (4.0 KB) - added by azaozz 10 days ago.

Download all attachments as: .zip

Change History (13)

This ticket was mentioned in Slack in #core-editor by youknowriad. View the logs.


10 days ago

#2 @desrosj
10 days ago

  • Keywords commit added

@youknowriad This looks good to me. Feel free to commit to trunk. Just needs an additional sign-off before backporting!

#3 @youknowriad
10 days ago

In 46606:

Block Editor: Bug fixes targetted for WordPress 5.3 RC3.

The list of included fixes is:

Updated packages:

  • @wordpress/api-fetch@3.6.4
  • @wordpress/block-directory@1.0.4
  • @wordpress/block-library@2.9.4
  • @wordpress/core-data@2.7.4
  • @wordpress/data-controls@1.3.4
  • @wordpress/edit-post@3.8.4
  • @wordpress/editor@9.7.4
  • @wordpress/list-reusable-blocks@1.8.4
  • @wordpress/media-utils@1.2.4
  • @wordpress/server-side-render@1.3.4

Props desrosj.
See #48447.

#4 @SergeyBiryukov
10 days ago

In 46607:

Docs: Restore correct placement for duplicate hook reference in render_block_core_latest_comments().

Previously fixed in [46604], accidentally reverted in [46606].

See #48447, #48303.

#5 follow-up: @youknowriad
10 days ago

@SergeyBiryukov The problem is that these files are automatically synced from the packages. everytime someone will perform npm install && npm run build it will be reverted. We should fix these in Gutenberg instead.

#6 in reply to: ↑ 5 @azaozz
10 days ago

Replying to youknowriad:

The problem is that these files are automatically synced...

Right. Seems it would be good to make few "readability improvements" to latest-comments.php. Added 48447-readability-fixes.diff as an example here, will open a low-priority issue for Gutenberg too.

Generally having nested function calls with each param on its own line adds a lot of "vertical bloat" and "indentation bloat" :)

These can be avoided by making the code a bit more "wordy" but the result is quite easier to read. Also if () statements usually signify a new "block" with its own indentation. Usually better to have empty lines around.

Also, for better readability long ternary operators should probably be if () {} ... else {} blocks instead (especially when returning from them).

The six level deep nested array in register_block_core_latest_comments() is also quite "problematic" with some vertical and indentation bloat and uneven/weird white spaces but that's a bug in WPCS that needs fixing upstream (the issue has been open there for over 6 months now!).

Last edited 10 days ago by azaozz (previous) (diff)

#7 @azaozz
10 days ago

Wooow, doing npm install:

updated 10 packages and audited 978269 packages in 22.037s
found 0 vulnerabilities

Didn't realize we use nearly 1 million packages!!! :)

[46606] looks good here, +1 to merge to 5.3.

#8 follow-up: @youknowriad
10 days ago

These changes all look decent but IMO we should treat these files as "vendors" and not touch them at all in Core.

#9 in reply to: ↑ 8 @azaozz
10 days ago

Replying to youknowriad:

Right. Any changes would need to be made upstream (for 5.4). Opened https://github.com/WordPress/gutenberg/issues/18143.

Last edited 10 days ago by azaozz (previous) (diff)

#10 @gziolo
9 days ago

In 46611:

Block Editor: Bug fixes targetted for WordPress 5.3 RC3.

The list of included fixes is:
https://github.com/WordPress/gutenberg/pull/18108
https://github.com/WordPress/gutenberg/pull/18051
https://github.com/WordPress/gutenberg/pull/18106
https://github.com/WordPress/gutenberg/pull/18102
Updated packages:
@wordpress/api-fetch@3.6.4
@wordpress/block-directory@1.0.4
@wordpress/block-library@2.9.4
@wordpress/core-data@2.7.4
@wordpress/data-controls@1.3.4
@wordpress/edit-post@3.8.4
@wordpress/editor@9.7.4
@wordpress/list-reusable-blocks@1.8.4
@wordpress/media-utils@1.2.4
@wordpress/server-side-render@1.3.4

Props desrosj, youknowriad.
Merges [{46606}] to the 5.3 branch.
See #48447.

#11 @gziolo
9 days ago

  • Resolution set to fixed
  • Status changed from assigned to closed
Note: See TracTickets for help on using tickets.