WordPress.org

Make WordPress Core

Opened 9 months ago

Closed 8 months ago

#45330 closed defect (bug) (fixed)

Gutenberg editor with hebrew language does not render correctly.

Reported by: websupporter Owned by: SergeyBiryukov
Milestone: 5.0 Priority: normal
Severity: normal Version: 5.0
Component: Editor Keywords: has-patch fixed-5.0
Focuses: Cc:

Description

I switched to a RTL language to test a bit. When I open the settings, the settings are rendered on the right side and destroy basically the view.

https://i.postimg.cc/1XH1p4MV/hebrew-bug.gif

This happens on WordPress 5.0-beta3-43883 but not with WordPress 4.9.8 and the plugin activated.

Attachments (2)

45330.patch (1.8 KB) - added by websupporter 9 months ago.
updates grunt and adds the suffix
45330.2.patch (1.7 KB) - added by websupporter 9 months ago.
no need to run minify also for -rtl.css, they are catched by *.css anyway.

Download all attachments as: .zip

Change History (9)

#1 @websupporter
9 months ago

When SCRIPT_DEBUG is set to true this error does not occur.

If I understand this correctly, the wp-admin/load-styles.php replaces RTL only for minified scripts:

<?php
        if ( $rtl && ! empty( $style->extra['rtl'] ) ) {
                // All default styles have fully independent RTL files.
                $path = str_replace( '.min.css', '-rtl.min.css', $path );
        }

But there are no minified styles yet in the whole wp-includes/css/dist folder. So I think basically adding those will solve the issue.

Last edited 9 months ago by websupporter (previous) (diff)

@websupporter
9 months ago

updates grunt and adds the suffix

#2 @websupporter
9 months ago

This patch adds a new grunt job cssmin:dist which runs after webpack:devProdTarget, so we minify the styles, which come from the packages.

In the second step, this patch adds the $suffix to the path to the styles. This way we have the .min.css.

This now can be replaced by rtl.min.css in the _wp-admin/load-styles.php_

#3 @websupporter
9 months ago

  • Keywords has-patch added

#4 @ocean90
9 months ago

  • Milestone changed from Awaiting Review to 5.0

@websupporter
9 months ago

no need to run minify also for -rtl.css, they are catched by *.css anyway.

#5 @pento
9 months ago

In 43905:

Build Tools: Minify the package CSS when building.

CSS coming from the @wordpress packages wasn't being minified in the build. This had the noteable side effect of causing RTL CSS to not be loaded when SCRIPT_DEBUG was set to false.

Props websupporter.
See #45330.

#6 @pento
9 months ago

  • Keywords fixed-5.0 added

#7 @SergeyBiryukov
8 months ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 44252:

Build Tools: Minify the package CSS when building.

CSS coming from the @wordpress packages wasn't being minified in the build. This had the noteable side effect of causing RTL CSS to not be loaded when SCRIPT_DEBUG was set to false.

Props websupporter.
Merges [43905] to trunk.
Fixes #45330.

Note: See TracTickets for help on using tickets.