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

LPS-117468 Uses moono-lisa skin #175

Closed
wants to merge 1 commit into from

Conversation

jbalsas
Copy link

@jbalsas jbalsas commented Jul 28, 2020

By default, liferay-ckeditor now uses the moono-lexicon skin that better matches DXP's look and feel. That skin, however, is not meant to be used with AlloyEditor and introduces some conflicting styling.

This PR changes the skin used inside PageEditor AlloyEditor instances back to moono-lisa.

To test:

  • Launch a clean installation of DXP
  • Click the pencil icon to edit the home page (with the Hello World widget in it)
  • Double click on the "Hello World" text to activate AlloyEditor
  • Verify that the editor does not have a background

Screen Shot 2020-07-28 at 09 26 12

@p2kmgcl, can you verify this addresses your issue?

PS: This is a followup of #157

@liferay-continuous-integration
Copy link
Collaborator

To conserve resources, the PR Tester does not automatically run for every pull.

If your code changes were already tested in another pull, reference that pull in this pull so the test results can be analyzed.

If your pull was never tested, comment "ci:test" to run the PR Tester for this pull.

@jbalsas
Copy link
Author

jbalsas commented Jul 28, 2020

ci:test:sf

@jbalsas
Copy link
Author

jbalsas commented Jul 28, 2020

ci:test:relevant

@liferay-continuous-integration
Copy link
Collaborator

✔️ ci:test:sf - 1 out of 1 jobs passed in 2 minutes

Click here for more details.

Base Branch:

Branch Name: master
Branch GIT ID: 0d329acd58e7487eba8f40d6350fa1d737c0ad02

Sender Branch:

Branch Name: LPS-117468
Branch GIT ID: 80930d1955ef52eaa83f8e21aece26b63331551a

1 out of 1jobs PASSED
1 Successful Jobs:
For more details click here.

Copy link
Collaborator

@markocikos markocikos left a comment

Choose a reason for hiding this comment

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

It's curious to me that we need to specify skin in usage, I would expect this to be inherited from BaseAlloyEditorConfigContributor. Why do we allow editors like fragment editor to extend BaseEditorConfigContributor? I would expect we allow extension of either BaseAlloyEditorConfigContributor or BaseCKEditorConfigContributor. There are 32 results for extends BaseEditorConfigContributor, all of them will have no default configuration, including no skin.

The change is a good workaround for now, it fixes the issue, but we should consider restricting our allowed configuration inheritance. Devs should start with an alloyeditor and modify it, instead of starting from zero and modify it to something close enough to alloyeditor to use its resources and skin.

@liferay-continuous-integration
Copy link
Collaborator

✔️ ci:test:stable - 21 out of 21 jobs passed

❌ ci:test:relevant - 76 out of 78 jobs passed in 1 hour 53 minutes

Click here for more details.

Base Branch:

Branch Name: master
Branch GIT ID: 0d329acd58e7487eba8f40d6350fa1d737c0ad02

Copied in Private Modules Branch:

Branch Name: master-private
Branch GIT ID: 2aa558d7587a046d654b60e91d9b21cb5e106df3

ci:test:stable - 21 out of 21 jobs PASSED
21 Successful Jobs:
ci:test:relevant - 76 out of 78 jobs PASSED
76 Successful Jobs:
For more details click here.

Failures unique to this pull:

For upstream results, click here.

@carloslancha
Copy link

Would it be an option to set the skin in alloyeditor.jsp (instead in the ConfigContributor) if no value is passed? In this way we would be creating the default right before calling the editor and there won't be needed to add it on every Contributor.

@jbalsas
Copy link
Author

jbalsas commented Jul 28, 2020

Hey @markocikos, @carloslancha, thanks for the feedback!

Would it be an option to set the skin in alloyeditor.jsp (instead in the ConfigContributor) if no value is passed? In this way we would be creating the default right before calling the editor and there won't be needed to add it on every Contributor.

It wouldn't, since PageEditor renders AlloyEditor directly without the JSP tag, so it'll never go through alloyeditor.jsp. In this case, configuration is the common place for all editors, not the JSP.

The change is a good workaround for now, it fixes the issue, but we should consider restricting our allowed configuration inheritance. Devs should start with an alloyeditor and modify it, instead of starting from zero and modify it to something close enough to alloyeditor to use its resources and skin.

Yeah, this makes total sense... as I said here, I don't think it actually makes sense to be able to use any skin whatsoever with AlloyEditor, but wanted to get this fixed for GA5.

I'll move the configuration to the BaseAlloyEditorConfigContributor, though. That makes total sense! 👍

@jbalsas
Copy link
Author

jbalsas commented Jul 28, 2020

I'll move the configuration to the BaseAlloyEditorConfigContributor, though. That makes total sense! 👍

Ok, scratch that 😂

Not every ConfigContributor targeting AlloyEditor actually extends BaseAlloyEditorConfigContributor, which is where @julien already set the skin value. We cannot set it in BaseEditorConfigContributor directly because it then will affect all editors including those where we want moono-lexicon.

So, I'd say this is the way to go:

  • Get this workaround merged
  • Set skin to to moono-lisa in AlloyEditor and cut a release from there (no rush)
  • Remove the workaround (no rush)

Please, @markocikos, @carloslancha, do you mind double-checking on this and let me know what you think?

Forward if satisfied with my empty promises :)

@liferay-continuous-integration
Copy link
Collaborator

@markocikos
Copy link
Collaborator

Yeah, I agree we should merge this. ✔️

What I suggest as a no-rush task is to change:

public class FragmentEntryLinkEditorConfigContributor
	extends BaseEditorConfigContributor {

to

public class FragmentEntryLinkEditorConfigContributor
	extends BaseAlloyEditorConfigContributor {

... and to modify the configuration to override alloyeditor, instead of duplicating much of configuration, including the skin added in this PR. This is almost certain to break things, and would require some dependencies juggling, as base alloy class in not in portal kernel like base editor class.

@carloslancha
Copy link

carloslancha commented Jul 28, 2020

It wouldn't, since PageEditor renders AlloyEditor directly without the JSP tag, so it'll never go through alloyeditor.jsp. In this case, configuration is the common place for all editors, not the JSP.

True, didn't think about that.

Set skin to to moono-lisa in AlloyEditor and cut a release from there (no rush)

We're setting mono-lexicon as the skin for CKEditor in liferay-ckeditor so makes total sense to do the same but with mono-lisa in AlloyEditor.

@carloslancha
Copy link

ci:test:relevant

@liferay-continuous-integration
Copy link
Collaborator

✔️ ci:test:stable - 21 out of 21 jobs passed

✔️ ci:test:relevant - 78 out of 78 jobs passed in 2 hours 26 minutes

Click here for more details.

Base Branch:

Branch Name: master
Branch GIT ID: 5114630ffc0b18c67c7ef03dfd938f18629fefd9

Copied in Private Modules Branch:

Branch Name: master-private
Branch GIT ID: 2aa558d7587a046d654b60e91d9b21cb5e106df3

ci:test:stable - 21 out of 21 jobs PASSED
21 Successful Jobs:
ci:test:relevant - 78 out of 78 jobs PASSED
78 Successful Jobs:
For more details click here.

@carloslancha
Copy link

ci:forward

@liferay-continuous-integration
Copy link
Collaborator

CI is automatically triggering the following test suites:

  •     ci:test:relevant
  •     ci:test:sf

The pull request will automatically be forwarded to the user brianchandotcom if the following test suites pass:

  •     ci:test:relevant
  •     ci:test:sf
  •     ci:test:stable

@liferay-continuous-integration
Copy link
Collaborator

Skipping previously passed test suites:
ci:test:relevant
ci:test:sf

@liferay-continuous-integration
Copy link
Collaborator

@liferay-continuous-integration
Copy link
Collaborator

All required test suite(s) passed.
Forwarding pullrequest to brianchandotcom.

@liferay-continuous-integration
Copy link
Collaborator

Pull request has been successfully forwarded to brianchandotcom#91914

@liferay-continuous-integration
Copy link
Collaborator

@jbalsas jbalsas deleted the LPS-117468 branch October 30, 2020 17:28
liferay-frontend pushed a commit that referenced this pull request May 26, 2021
**Changes in this version**

[Full changelog](liferay/liferay-ckeditor@v4.16.0-liferay.1...v4.16.0-liferay.2)

### 🔧 Bug fixes

-   fix: remove unneeded styles ([\#176](liferay/liferay-ckeditor#176))
-   fix: update @clayui/css to latest and add more icons ([\#175](liferay/liferay-ckeditor#175))
-   fix: add null check ([\#168](liferay/liferay-ckeditor#168))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants