Make WordPress Core

Opened 2 months ago

Closed 2 months ago

Last modified 2 months ago

#59456 closed defect (bug) (fixed)

Editor: Don't enqueue edit site stylesheet in iframe

Reported by: mamaduka's profile Mamaduka Owned by: hellofromtonya's profile hellofromTonya
Milestone: 6.4 Priority: normal
Severity: normal Version: 6.3
Component: Editor Keywords: gutenberg-merge has-patch commit
Focuses: Cc:

Description

Syncs changes from https://github.com/WordPress/gutenberg/pull/54254.

The edit-site stylesheet is meant to style UI, not editor content. Loading it in the iframe slow it down, and it can potentially clash with editor content rules.

Change History (4)

This ticket was mentioned in PR #5309 on WordPress/wordpress-develop by @Mamaduka.


2 months ago
#1

  • Keywords has-patch added

Note: This is probably better to merge after packages are synced, because without CSS changes from the PR the site editor produced as console warning.

index.js:148 wp-edit-site-css was added to the iframe incorrectly. Please use block.json or enqueue_block_assets to add styles to the iframe.

Gutenberg PR: https://github.com/WordPress/gutenberg/pull/54254
Trac ticket: https://core.trac.wordpress.org/ticket/59456

#2 @hellofromTonya
2 months ago

  • Keywords commit added
  • Owner set to hellofromTonya
  • Status changed from new to reviewing

The patch is ready for commit. Self-assigning to prepare the commit.

#3 @hellofromTonya
2 months ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 56736:

Editor: Remove 'wp-edit-site' stylesheet enqueue from iframe.

Removes enqueuing the 'wp-edit-site' stylesheet from the iframed assets in _wp_get_iframed_editor_assets().

The global $pagenow is also removed as it is no longer used within the function.

References:

Props ellatrix, jorgefilipecosta, Mamaduka, mukesh27.

Follow-up to [56047], [53160].
Fixes #59456.

Note: See TracTickets for help on using tickets.