-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Incorrect rendering of the color button on first opening #4687
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fix itself looks good 👍🏻 However there are some issues with tests (see inline comments).
plugins/colorbutton/plugin.js
Outdated
@@ -192,6 +192,9 @@ | |||
// The block should not have scrollbars (https://dev.ckeditor.com/ticket/5933, https://dev.ckeditor.com/ticket/6056) | |||
block.element.getDocument().getBody().setStyle( 'overflow', 'hidden' ); | |||
|
|||
// First render of panel have a scrollbar, but it shouldn't (https://github.com/ckeditor/ckeditor4/issues/4247) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In case of references to GH issues, we use just an issue number preceded by hash:
// First render of panel have a scrollbar, but it shouldn't (https://github.com/ckeditor/ckeditor4/issues/4247) | |
// First render of panel have a scrollbar, but it shouldn't (#4247). |
'test background color items not draggable': testElementsNotDraggable( 'BGColor' ), | ||
|
||
// (#4247) | ||
'test panel should not have a scrollbar': function() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In fact you check here if the overflow: hidden
is applied correctly, not the scrollbar itself, so maybe:
'test panel should not have a scrollbar': function() { | |
'test panel should have styles that prevent scrollbar appearance': function() { |
removeButtons: 'BGColor' | ||
removeButtons: 'BGColor', | ||
// Config due to #4247 | ||
language: 'pl' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of modifying the existing manual test, please create a new one. The main benefit of it will be the fact that there will be the clear procedure how to reproduce the issue and what to check if it still exists.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! I've got only one small remark about the description of manual test.
@bender-ui: collapsed | ||
@bender-ckeditor-plugins: wysiwygarea, toolbar, colorbutton, colordialog, sourcearea | ||
|
||
1. Click **Text Color** or **Background Color** button. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Current procedure suggests that the test can be done only for the one button. But it's better to test both of the buttons. So I propose to make the first step (with expected and unexpected sections) for Text Color button and then the second step like:
2. Repeat the procedure for the **Background Color** button.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I've just fixed some inconsistent indentation in manual test.
I'll wait with merging until master
branch is unfrozen.
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
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.
What is the proposed changelog entry for this pull request?
What changes did you make?
Removing scroll bar, that was cousing width calculation problem in the first render.
Which issues does your PR resolve?
Closes #4247.