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

Added identifying attribute to the Magic Line plugin #1453

Merged
merged 7 commits into from
Jan 22, 2018
Merged

Added identifying attribute to the Magic Line plugin #1453

merged 7 commits into from
Jan 22, 2018

Conversation

jacekbogdanski
Copy link
Member

@jacekbogdanski jacekbogdanski commented Jan 15, 2018

What is the purpose of this pull request?

New feature

Does your PR contain necessary tests?

All patches which 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

What changes did you make?

Added data-cke-magic-line="1" attribute to the Magic Line line element.

Closes #1441

@f1ames f1ames self-requested a review January 15, 2018 16:15
Copy link
Contributor

@f1ames f1ames left a comment

Choose a reason for hiding this comment

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

Not sure if it is only the matter of manual tests, but it fails on IE8:

image

CHANGES.md Outdated
@@ -7,6 +7,7 @@

New Features:

* [#933](https://github.com/ckeditor/ckeditor-dev/issues/1441): [Magic Line](https://ckeditor.com/cke4/addon/magicline) line element can now be identifiable using `data-cke-magic-line="1"` attribute.
Copy link
Contributor

Choose a reason for hiding this comment

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

Wrong issue number here. Please also remember that new entry should be added on the end of existing list.

Copy link
Contributor

Choose a reason for hiding this comment

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

Another thing is that this fix is targeting major (next major is 4.9.0) so the changelog entry should be put under CKEditor 4.9 not CKEditor 4.8.1.

</textarea>

<script>
CKEDITOR.replace( 'editor1', {
Copy link
Contributor

Choose a reason for hiding this comment

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

The editor could have a slight bigger height so it is easier to test.

image

@@ -0,0 +1,67 @@
<textarea cols="80" id="editor1" name="editor1" rows="10">
Copy link
Contributor

Choose a reason for hiding this comment

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

For indentation tabs should be used (check .editorconfig), however this whole file uses spaces, please fix this.

extraPlugins: 'magicline',
magicline_color: 'blue',
allowedContent: true
});
Copy link
Contributor

Choose a reason for hiding this comment

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

Should be } );. Also indentation is wrong here, should be:

CKEDITOR.replace( 'editor1', {
	extraPlugins: 'magicline',
	magicline_color: 'blue',
	allowedContent: true
} );

allowedContent: true
});

CKEDITOR.addCss( 'span[data-cke-magic-line="1"] { border-top: solid 1px red !important; } ' +
Copy link
Contributor

Choose a reason for hiding this comment

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

Also here the 2nd, 3rd and 4th line should be just indented by one tab, don't try to align it with the CSS string from the first line.

CKEDITOR.replace( 'editor1', {
extraPlugins: 'magicline',
magicline_color: 'blue',
allowedContent: true
Copy link
Contributor

Choose a reason for hiding this comment

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

I think instead of blocking ACF, you could just attach proper plugins to the editor, so you will have:

@bender-ckeditor-plugins: wysiwygarea, basicstyles, elementspath, magicline,toolbar, table, list, magicline, div, horizontalrule

and then editor config will need only magicline_color: 'blue'.

@bender-ui: collapsed
@bender-ckeditor-plugins: wysiwygarea, basicstyles, elementspath, magicline

1. Hover the cursor over the editor and find a magic line pop-up.
Copy link
Contributor

Choose a reason for hiding this comment

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

Calling it magicline pop-up may be a little misleading, I would go with something like:

  1. Hover over different editor elements in a way that magic line is visible.

and basically this one step is enough. Then you will have Expected and Actual:

Whole magic line element is red/blue.

@jacekbogdanski jacekbogdanski requested a review from f1ames January 16, 2018 13:09
Copy link
Contributor

@f1ames f1ames left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@f1ames f1ames merged commit 7ecc15b into major Jan 22, 2018
@f1ames f1ames deleted the t/1441 branch January 22, 2018 11:21
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.

2 participants