For some reason the Seven theme is hiding the resize icon for CKEditor, here is the culprit code starting at line 142 from ckeditor-dialog.css file:

.cke_reset_all .cke_resizer {
  display: none;
}

I do understand theming is all about styling, but what it is not logical here is that a user spend a whole chuck of time debugging why the resize is not working, thinks that CKEditor is not well configured, re-configure what already was properly configured, and then find out the problem is a CSS line of code.

Theme shouldn't hide configuration output, specially not an admin theme.

Comments

altrugon created an issue. See original summary.

altrugon’s picture

Here goes a patch for it.

altrugon’s picture

Title: Resize icon for CKEditor hidden » Display resize icon for CKEditor on Seven theme
altrugon’s picture

Status: Active » Needs review
benstjohn’s picture

Status: Needs review » Reviewed & tested by the community
echoz’s picture

Version: 8.2.0-rc2 » 8.2.x-dev

That was easy, thanks @altrugon !
Patches should be against dev, and since there were no changes in that file, the patch should apply.

altrugon’s picture

I used on the ticket the Drupal version where I found the bug, but then I created the patch against the dev branch (I checked the bug existed here too ;) ). I'll make sure to change versions next time I upload a patch, wasn't aware of this.

ressa’s picture

Thanks @altrugon. What would be the easiest way to implement this temporarily, until the patch is incorporated? Perhaps inserting the style via a custom module?

tstoeckler’s picture

Status: Reviewed & tested by the community » Needs review

So this was introduced in #2090937: Seven theme: style CKEditor-native dialogs to match Drupal-native dialogs and - I assume - that specific styling was meant to disable the resize icon on dialogs (see the screenshots in that issue). So someone needs to test that that in fact does not re-appear with this patch. Setting back to needs review for that.

tstoeckler’s picture

thpoul’s picture

Component: Seven theme » ckeditor.module
Status: Needs review » Needs work
Issue tags: +Needs subsystem maintainer review

...that specific styling was meant to disable the resize icon on dialogs...

That is correct!

Since #2239419: Include CKEditor's AutoGrow plug-in removed resize but only since 8.3.x, I propose to make the .cke_reset_all .cke_resizer selector more specific for 8.2.x which won't cause any regression afterwards.

Moving this to the ckeditor issue queue where it actually belongs and setting back to NW.

altrugon’s picture

Component: ckeditor.module » Seven theme
Status: Needs work » Reviewed & tested by the community

@ressa I'm applying the patch through composer.json like this:

{
    ...
    "extra": {
        "patches": {
          "drupal/core": {
            "Display resize icon for CKEditor on Seven theme": "https://www.drupal.org/files/issues/drupal-seven-theme-display-resize-ckeditor-icon-2820200-1.patch"
          }
        }
    }
}

@tstoeckler, @thpoul: You should remove the resize icon (or any other feature) through the CKEditor configuration not through CSS, this is not what CSS is for. I understand that some people could prefer auto-grow feature (I personally hate it) so you configure your CKEditor properly and then you get your feature, but if in the other case you want to disable it and you do it through the CKEditor configuration, you obviously expect to see the results there.

Perhaps is just me, but there is a clear separation between configuration and style on this scenario.

thpoul’s picture

Component: Seven theme » ckeditor.module
Status: Reviewed & tested by the community » Needs review

@altrugon This issue is about #2090937: Seven theme: style CKEditor-native dialogs to match Drupal-native dialogs causing the resize icon to be hidden not only for the dialogs but also for the ckeditor itself. This affects only 8.2.x since #2239419: Include CKEditor's AutoGrow plug-in removed the resize plugin in favor of the autogrow.

I propose to make the .cke_reset_all .cke_resizer selector more specific for 8.2.x which won't cause any regression afterwards.

Also please don't RTBC an issue with your own patch. I have pinged Wim Leers (the maintainer of ckeditor.module) to give feedback. Setting back to NR and to it's proper component.

ressa’s picture

Thanks for sharing your solution @altrugon. I have now added it to my make file. If any else also want to apply the patch in a make file, here is how:

# Core project
projects:
  drupal:
    version: ~
    patch:
      - "https://www.drupal.org/files/issues/drupal-seven-theme-display-resize-ckeditor-icon-2820200-1.patch"
altrugon’s picture

Component: ckeditor.module » Seven theme

@thpoul I did not RTBC my own ticket, I know you are not suppose to do that. What happened there is that the select box had already that status selected on my browser because I had the tab opened and the only thing I did was reload. Perhaps this is a bug on the ticket report where the values of the select boxes are not properly re-load :(

PS: I had to manually change the status on the select box now, definitely this is a repeating behaviour (bug)

altrugon’s picture

Component: Seven theme » ckeditor.module

You see what I'm talking about, even the component changed. Setting it back to what you had.

wim leers’s picture

Component: ckeditor.module » Seven theme

#2090937: Seven theme: style CKEditor-native dialogs to match Drupal-native dialogs was in the Seven theme component, so then this should also be.

This should be reviewed by people closely involved in that issue. Left a comment there pointing to this issue.

bkosborne’s picture

Ughhh I just spent a lot of time on this. At first I thought the resize plugin was simply not shipped with our version of CKEditor since the icon was not there and because there's no "resize" plugin folder in core/assets/vendor/ckeditor/plguins/, but apparently when you download an optimized version of CKEditor it adds in the plugin files to the main JS file if it can. I tried creating my own plugin integration to add it which of course was not working because it's actually already registered.

Here's a patch that makes the selector more specific to the dialog box, which I'm sure is what was actually intended.

bkosborne’s picture

Priority: Normal » Major

I wonder if it's appropriate to bump this to major since it affects user experience so dramatically? The default window height for the editor is so small and it's infuriating being unable to resize it.

thpoul’s picture

StatusFileSize
new35.39 KB
new46.1 KB

Thank you @bkosborne!!

+1 for #18 from me as it addresses the issue I mentioned at #11 and #13 and therefore could go at RTBC. Attaching screenshots from the manual testing I did which correctly shows the icon at the CKEditor body instance but not at the dialog.

One nit I propose is a to add a todo to remove this css rule when 8.3.x is shipped as it won't have the resize plugin per #2239419: Include CKEditor's AutoGrow plug-in

Editor
Dialog

fietserwin’s picture

Status: Needs review » Reviewed & tested by the community

I can also confirm that this patch solves the problem at hand. Let's get this in fast, saving hours of frustration for site builders.

wim leers’s picture

This looks like a very sane solution.

We can't add tests; Drupal core needs visual regression testing to catch this.

andypost’s picture

rtbc +1

PS: bartik already works fine

dman’s picture

Another x minutes wasted by the team here as we all pointed fingers and tried to remember the last time we saw it, or was it always like this in D8, or has it been made optional somewhere, or are we all just going mad...

Thanks for the fixes, thanks @altrugon . Putting it into our composer.json for now, I guess :-}

ressa’s picture

It would be really great if this patch could get included in 8.2.3, if that's possible.

Status: Reviewed & tested by the community » Needs work
dman’s picture

Status: Needs work » Reviewed & tested by the community

That's just an unrelated testbot infra fail by the looks of things.
Leave this RTBC.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed 892272e to 8.3.x and c10b035 to 8.2.x. Thanks!

  • alexpott committed 892272e on 8.3.x
    Issue #2820200 by altrugon, bkosborne, thpoul: Display resize icon for...

  • alexpott committed c10b035 on 8.2.x
    Issue #2820200 by altrugon, bkosborne, thpoul: Display resize icon for...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

vgutekunst’s picture

i have no resize icon in Drupal 8.3.1 and 8.3.2 Whats wrong with the commit?

ressa’s picture

My initial thought as well, but at least the CKEditor plugin Auto Grow is now active. Try to add a lot of text in the Body field, and you should see it expand accordingly. Not sure if the resize icon will ever return ...

vgutekunst’s picture

Hi ressa,

yeah i know but the icon should appear too because after a long text the max. height of the editor is reached and the autogrow stops ;-/

echoz’s picture

We also need it usually when toggling to "source". That css is still there but does nothing whether deleted or present.

This must have happened with an update to ckeditor, although it looks like the public ckeditor does still have the resize icon.

I for one, want it back, but perhaps this should be a new issue.

vgutekunst’s picture

is there a solution or a new issue in the meanwhile?

sime’s picture

This commit http://cgit.drupalcode.org/drupal/commit/?id=892272e at #28 didn't fix the issue, it simple hid something else. Please

I accept on face value that autogrow not working is a separate bug (I'm seeing the same issue at #32), but we do still need the resize for "source" etc.

sime’s picture

Update, fresh install, autogrow is working for me, so I've created this issue for the "source" mode problem.
https://www.drupal.org/node/2901137

dqd’s picture

Somehow I do not get it. I now have many big body texts to scroll for ages because there is no option no more to limit the vertical view of the input field. This is a nightmare... How to enable rezise and count of rows to show for body text now?

effulgentsia’s picture

How to enable ... count of rows to show for body text now?

I opened an issue for that: #2996315: Set autogrow_minHeight to the height of the textarea.