Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent inline hardcoding width property using autogrow plugin #4919

Merged
merged 6 commits into from
Oct 7, 2021

Conversation

KarolDawidziuk
Copy link
Contributor

What is the purpose of this pull request?

Bug fix.

Does your PR contain necessary tests?

All patches that change the editor code must include tests. You can always read more
on PR testing,
how to set the testing environment and
how to create tests
in the official CKEditor documentation.

This PR contains

  • Unit tests
  • Manual tests

Did you follow the CKEditor 4 code style guide?

Your code should follow the guidelines from the CKEditor 4 code style guide which helps keep the entire codebase consistent.

  • PR is consistent with the code style guide

What is the proposed changelog entry for this pull request?

* [#4891](https://github.com/ckeditor/ckeditor4/issues/4891): Fixed: [Autogrow](https://ckeditor.com/cke4/addon/autogrow) prevent impose fixed width size with single direction resize. 

What changes did you make?

Editor container shouldn't impose fixed size with single direction resize, so I've pass null as width parameter in editor.resize() method to prevent this.

Which issues does your PR resolve?

Closes #4891.

@jacekbogdanski jacekbogdanski self-requested a review October 5, 2021 10:38
@sculpt0r sculpt0r self-assigned this Oct 6, 2021
@sculpt0r sculpt0r self-requested a review October 6, 2021 09:05
@sculpt0r
Copy link
Contributor

sculpt0r commented Oct 6, 2021

Rebased on newest major.

Copy link
Contributor

@sculpt0r sculpt0r left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice job! It looks like the bug was introduced by... me 😞 in #4393

Also, your fix seems to be valid for the previous issue 😓

I think it will be good to change our docs for resize method since we can use type other than number or string - which is still valid usage of that method. Also, please look at my inline comments.

plugins/autogrow/plugin.js Outdated Show resolved Hide resolved
tests/plugins/autogrow/autogrow.js Outdated Show resolved Hide resolved
tests/plugins/autogrow/autogrow.js Outdated Show resolved Hide resolved
@KarolDawidziuk
Copy link
Contributor Author

Thanks, @sculpt0r for the review.
I've added the changes that you mentioned and it's ready for another one.

@sculpt0r
Copy link
Contributor

sculpt0r commented Oct 7, 2021

Rebase on newest major

Copy link
Contributor

@sculpt0r sculpt0r left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🎉

However, I have to remove the comment about the height parameter. When you try to pass null there - the editor editable area is simply collapsed. There is no additional conditions for height value ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Autogrow unexpectedly applies fixed width
2 participants