Make WordPress Core

Opened 3 years ago

Closed 3 years ago

Last modified 13 months ago

#46094 closed defect (bug) (fixed)

Update TinyMCE to 4.9.2

Reported by: iseulde Owned by: iseulde
Milestone: 5.1 Priority: normal
Severity: normal Version:
Component: External Libraries Keywords: has-patch
Focuses: Cc:

Description (last modified by iseulde)

Fixes https://github.com/WordPress/gutenberg/issues/13198.


Also added docs on how to update TinyMCE.

$ svn st
M       src/js/_enqueues/vendor/README.md
M       src/js/_enqueues/vendor/tinymce/plugins/charmap/plugin.js
M       src/js/_enqueues/vendor/tinymce/plugins/colorpicker/plugin.js
M       src/js/_enqueues/vendor/tinymce/plugins/directionality/plugin.js
M       src/js/_enqueues/vendor/tinymce/plugins/fullscreen/plugin.js
M       src/js/_enqueues/vendor/tinymce/plugins/hr/plugin.js
M       src/js/_enqueues/vendor/tinymce/plugins/image/plugin.js
M       src/js/_enqueues/vendor/tinymce/plugins/image/plugin.min.js
M       src/js/_enqueues/vendor/tinymce/plugins/link/plugin.js
M       src/js/_enqueues/vendor/tinymce/plugins/lists/plugin.js
M       src/js/_enqueues/vendor/tinymce/plugins/lists/plugin.min.js
M       src/js/_enqueues/vendor/tinymce/plugins/media/plugin.js
M       src/js/_enqueues/vendor/tinymce/plugins/paste/plugin.js
M       src/js/_enqueues/vendor/tinymce/plugins/paste/plugin.min.js
M       src/js/_enqueues/vendor/tinymce/plugins/tabfocus/plugin.js
M       src/js/_enqueues/vendor/tinymce/plugins/textcolor/plugin.js
M       src/js/_enqueues/vendor/tinymce/plugins/textcolor/plugin.min.js
M       src/js/_enqueues/vendor/tinymce/skins/lightgray/fonts/tinymce.eot
M       src/js/_enqueues/vendor/tinymce/skins/lightgray/fonts/tinymce.svg
M       src/js/_enqueues/vendor/tinymce/skins/lightgray/fonts/tinymce.ttf
M       src/js/_enqueues/vendor/tinymce/skins/lightgray/fonts/tinymce.woff
M       src/js/_enqueues/vendor/tinymce/skins/lightgray/skin.min.css
M       src/js/_enqueues/vendor/tinymce/themes/inlite/theme.js
M       src/js/_enqueues/vendor/tinymce/themes/inlite/theme.min.js
M       src/js/_enqueues/vendor/tinymce/themes/modern/theme.js
M       src/js/_enqueues/vendor/tinymce/themes/modern/theme.min.js
M       src/js/_enqueues/vendor/tinymce/tinymce.js
M       src/js/_enqueues/vendor/tinymce/tinymce.min.js
M       src/wp-includes/version.php

Attachments (3)

46094.diff (2.5 MB) - added by iseulde 3 years ago.
Attempt 1
46094.2.diff (2.5 MB) - added by iseulde 3 years ago.
Reverted src/js/_enqueues/vendor/tinymce/plugins/compat3x/css/dialog.css
46094.3.diff (4.9 MB) - added by iseulde 3 years ago.
Attempt 3

Change History (20)

3 years ago

Attempt 1

3 years ago

Reverted src/js/_enqueues/vendor/tinymce/plugins/compat3x/css/dialog.css

#1 @iseulde
3 years ago

  • Description modified (diff)

#2 @iseulde
3 years ago

  • Description modified (diff)

3 years ago

Attempt 3

#3 @iseulde
3 years ago

Cc @pento and @azaozz for review. Trying to run the Gutenberg e2e tests against core right now.

#4 @iseulde
3 years ago

There are known failures when running the e2e test suite against core. Cc @gziolo. Here I'm trying to figure out if there are any failures introduced.

Without patch

Test Suites: 25 failed, 36 passed, 61 total
Tests: 81 failed, 4 skipped, 174 passed, 259 total
Snapshots: 1 failed, 117 passed, 118 total
Time: 513.817s, estimated 940s
Ran all test suites.

With patch

Test Suites: 26 failed, 35 passed, 61 total
Tests: 83 failed, 4 skipped, 172 passed, 259 total
Snapshots: 4 failed, 114 passed, 118 total
Time: 530.14s
Ran all test suites.

So we have 1 additional failing test suite, 2 more failing tests and 3 more failing snapshots.

undo › should undo typing after non input change

The failure here is expected. The non breaking space is replaced by a normal space.

 FAIL  test/e2e/specs/blocks/list.test.js (24.127s)
  ● List › should split indented list item


    Received value does not match stored snapshot "List should split indented list item 1".

    - Snapshot
    + Received

      "<!-- wp:list -->
    - <ul><li>one<ul><li>two</li><li>three</li></ul></li></ul>
    + <ul><li>one</li><li>two</li><li>three</li></ul>
      <!-- /wp:list -->"

      193 | 		await page.keyboard.type( 'three' );
      194 | 
    > 195 | 		expect( await getEditedPostContent() ).toMatchSnapshot();
          | 		                                       ^
      196 | 	} );
      197 | 
      198 | 	it( 'should be immeadiately saved on indentation', async () => {

      at Object.toMatchSnapshot (test/e2e/specs/blocks/list.test.js:195:42)
      at tryCatch (node_modules/regenerator-runtime/runtime.js:62:40)
      at Generator.invoke [as _invoke] (node_modules/regenerator-runtime/runtime.js:288:22)
      at Generator.prototype.(anonymous function) [as next] (node_modules/regenerator-runtime/runtime.js:114:21)
      at asyncGeneratorStep (test/e2e/specs/blocks/list.test.js:9:103)
      at _next (test/e2e/specs/blocks/list.test.js:11:194)

  ● List › should be immeadiately saved on indentation


    Received value does not match stored snapshot "List should be immeadiately saved on indentation 1".

    - Snapshot
    + Received

      "<!-- wp:list -->
    - <ul><li>one<ul><li></li></ul></li></ul>
    + <ul><li>one</li><li></li></ul>
      <!-- /wp:list -->"

      202 | 		await pressWithModifier( 'primary', 'm' );
      203 | 
    > 204 | 		expect( await getEditedPostContent() ).toMatchSnapshot();
          | 		                                       ^
      205 | 	} );
      206 | } );
      207 | 

      at Object.toMatchSnapshot (test/e2e/specs/blocks/list.test.js:204:42)
      at tryCatch (node_modules/regenerator-runtime/runtime.js:62:40)
      at Generator.invoke [as _invoke] (node_modules/regenerator-runtime/runtime.js:288:22)
      at Generator.prototype.(anonymous function) [as next] (node_modules/regenerator-runtime/runtime.js:114:21)
      at asyncGeneratorStep (test/e2e/specs/blocks/list.test.js:9:103)
      at _next (test/e2e/specs/blocks/list.test.js:11:194)

This one is unexpected.

#5 @gziolo
3 years ago

I think @youknowriad found a way to limit the number of failure to a very small subset when testing against 5.0 in the past. I would love him to share his secrets regarding the approach he took. I don't think it was as problematic as 83 tests failed.

#6 @youknowriad
3 years ago

I had a big number of failures, but I tracked each one of them, and all where valid due to the differences between the environments. For example, the demo page is not available on Core, the themes were different at that time, the wp.a11y is different between Core and Gutenberg.

I expected the number to be much lower now though.

#7 @azaozz
3 years ago

46094.3.diff seems to be working properly here in both Classic and Block editors.

Creation of nested/indented lists doesn't work in the List block but works in Classic editor and Classic block.

#8 follow-up: @iseulde
3 years ago

The list plugin is no longer needed by the block editor since https://github.com/WordPress/gutenberg/pull/12667. As long as this PR is included in the same release, I think we're good to update TinyMCE. As far as I can see one test will need to be update in the Gutenberg repo, which is expected.

Further review here would be appreciated! Thanks!

#9 in reply to: ↑ 8 @azaozz
3 years ago

Replying to iseulde:

I think we're good to update TinyMCE.

Yep, as long as the latest Gutenberg (as of today) makes it to 5.1, thinking we are good to go with the TinyMCE update. Patch looks good and I don't see any other problems.

#10 @iseulde
3 years ago

Ok. Looking tomorrow at merging this. Should be merged before beta 2.

#11 @pento
3 years ago

GB12667 will need to be ported to whatever branch you're using to manage the other WordPress 5.1 ports.

@iseulde: I'm fine with this being committed, I'll also need the Gutenberg team to handle porting and producing the packages for core to use.

#12 @iseulde
3 years ago

@pento I added it to the milestone. As far as I know packages have already been updated. Cc @youknowriad.

#13 @iseulde
3 years ago

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

#14 @azaozz
3 years ago

In 44716:

TinyMCE: update alternative icon fonts for older browsers after [44713].

See #46094.

#15 @pento
2 years ago

#46159 was marked as a duplicate.

#16 @SergeyBiryukov
13 months ago

#44778 was marked as a duplicate.

#17 @SergeyBiryukov
13 months ago

#44890 was marked as a duplicate.

Note: See TracTickets for help on using tickets.