? ? ? Pending

User tests: Successful: Unsuccessful:

avatar Anu1601CS
Anu1601CS
7 Jun 2018

Pull Request for Issue #20679

Summary of Changes

As @okonomiyaki3000 Suggested to remove the fullscreen message. I removed it.

Testing Instructions

  1. Set default editor to codemirror in global configuration.

  2. Open com_content and start creating an article. See, that there are no errors in web console.

  3. Open the file administrator/components/com_content/forms/article.xml and the text

<field
name="articletext2"
type="editor"
label="COM_CONTENT_FIELD_ARTICLETEXT_LABEL"
filter="JComponentHelper::filterText"
buttons="true"
/>

after the field with the name articletext

4 . Open file
/administrator/components/com_content/tmpl/article/edit.php

and add the text

<?php echo $this->form->getInput('articletext2'); ?>

after the text

<?php echo $this->form->getInput('articletext'); ?>

Expected result

No error in console.

Fix codemirror as a customelements .
Credit goes to @dgrammatiko joomla/joomla-cms#20679 (comment)

Actual result

/media/vendor/codemirror/mode/text/html/text/html.js:1 Failed to load resource: the server responded with a status of 404 (Not Found)

avatar Anu1601CS Anu1601CS - open - 7 Jun 2018
avatar Anu1601CS Anu1601CS - change - 7 Jun 2018
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 7 Jun 2018
Category Administration Language & Strings JavaScript Repository Front End Plugins
avatar laoneo laoneo - change - 7 Jun 2018
Title
Fix Codemirror as a custom elements
[4.0] Fix Codemirror as a custom elements
avatar laoneo laoneo - edited - 7 Jun 2018
avatar Anu1601CS Anu1601CS - change - 7 Jun 2018
Labels Added: ? ?
avatar Anu1601CS
Anu1601CS - comment - 7 Jun 2018

@dgrammatiko Please take a look in the code I have done some changes.

avatar Anu1601CS
Anu1601CS - comment - 7 Jun 2018

And, also on eslint codestyle issue . Thanks

avatar astridx astridx - test_item - 7 Jun 2018 - Tested successfully
avatar astridx
astridx - comment - 7 Jun 2018

I have tested this item successfully on c8da110


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/20684.

avatar astridx
astridx - comment - 7 Jun 2018

I saw no error in console and the language string is changed like explained. I would only suggest to change the language string into something like this:
"In read only mode, a full screen is not possible"
Because the full screen does not open in read only mode.

If more than one editor is in write mode (no read only) on the page, the F10 key opens the editor where the cursor is currently located.

avatar laoneo
laoneo - comment - 8 Jun 2018

Can you also have a look on the remaining three hound issues?

avatar Anu1601CS
Anu1601CS - comment - 11 Jun 2018

@laoneo Done!

avatar laoneo
laoneo - comment - 11 Jun 2018

@okonomiyaki3000 can you please test this pr as you are the code mirror expert? Thanks.

avatar Anu1601CS
Anu1601CS - comment - 11 Jun 2018

@brianteeman Can you please check language string? Thanks

avatar Anu1601CS Anu1601CS - change - 11 Jun 2018
The description was changed
avatar Anu1601CS Anu1601CS - edited - 11 Jun 2018
avatar brianteeman
brianteeman - comment - 11 Jun 2018

I already have :)

avatar okonomiyaki3000
okonomiyaki3000 - comment - 14 Jun 2018

A few problems still:

  • The theme selector lists all themes twice. Once normally and once as .min.
  • After saving the plugin options, the editor is broken. Console says Uncaught SyntaxError: Unexpected token <
  • When editing a php file, there seems to be something wrong with syntax highlighting and the html part doesn't do things like tag completion. (now that I try it, this might be broken in the J3 version too...)
avatar okonomiyaki3000
okonomiyaki3000 - comment - 14 Jun 2018

Ah, and it's a little out of date. The appearance options tab should show a preview of what the editor will look like with the current settings.

avatar okonomiyaki3000
okonomiyaki3000 - comment - 14 Jun 2018

Oh and why not just remove that silly fullscreen message? I added it in the first place because I was changing the fullscreen hotkey from ctrl-q (seriously, who thought that was a good idea?) to something configurable but I figured that after a while we could remove it. People must have adjusted to the change by now, right?

avatar okonomiyaki3000
okonomiyaki3000 - comment - 14 Jun 2018

You may like to see #20746 for a way to fix my third point above.

avatar laoneo
laoneo - comment - 14 Jun 2018

@Anu1601CS can you have a look on the two first issues from @okonomiyaki3000. Thanks.

avatar Anu1601CS
Anu1601CS - comment - 14 Jun 2018

@laoneo I will take a look on it.

avatar Anu1601CS
Anu1601CS - comment - 16 Jun 2018

A few problems still:

The theme selector lists all themes twice. Once normally and once as .min.
After saving the plugin options, the editor is broken. Console says Uncaught SyntaxError: Unexpected token <
When editing a php file, there seems to be something wrong with syntax highlighting and the HTML part doesn't do things like tag completion. (now that I try it, this might be broken in the J3 version too...)

@okonomiyaki3000 Can you please share the testing instruction?

And, what you want to do in fullscreen message ?

avatar okonomiyaki3000
okonomiyaki3000 - comment - 16 Jun 2018

The theme selector is in the plugin settings in the appearance tab. It's just a list of themes.

If you run the editor with ever having saved any options, it works. When you open the plugin settings and then save, all pages with codemirror on them will have errors.

To see the syntax highlighting issue, just open any php file with code mirror.

For the fullscreen message, I just think we don't need it at all. It doesn't make much sense. If we need to put instructions for using CodeMirror there, we should have a lot more than just that one item but why should we? We don't list instructions for other things.

avatar Anu1601CS
Anu1601CS - comment - 22 Jun 2018

@okonomiyaki3000 As you suggested #20746 to fix mode, it works fine and syntax highlight is also good. But, one problem is still present, if two codemirror editor is present in a same page, then we are only able to toggle last codemirror to fullscreen ( only one codemirror makes toggle) .

avatar Anu1601CS
Anu1601CS - comment - 22 Jun 2018

@okonomiyaki3000 Seems like i found solution of fullscreen.
And, should i remove fullscreen message for both ?

af85063 22 Jun 2018 avatar Anu1601CS fix
avatar Anu1601CS Anu1601CS - change - 22 Jun 2018
The description was changed
avatar Anu1601CS Anu1601CS - edited - 22 Jun 2018
avatar Anu1601CS Anu1601CS - change - 22 Jun 2018
The description was changed
avatar Anu1601CS Anu1601CS - edited - 22 Jun 2018
avatar okonomiyaki3000
okonomiyaki3000 - comment - 22 Jun 2018

I'm not really the one to ask. I never liked the message at all. I'm sure someone must have asked me to put it there but it was so long ago... So, personally, I'd love to see it gone. If nobody else objects...

avatar astridx astridx - test_item - 22 Jun 2018 - Tested successfully
avatar astridx
astridx - comment - 22 Jun 2018

I have tested this item successfully on f663276


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/20684.

avatar astridx
astridx - comment - 22 Jun 2018

I saw no error in console. I saw no full screen message. I like it, that there is no full screen message. I think it is confusing if there is more than one editor on a page. If people see the text "click F10 to open full-screen" more than one time, they will be wondering which editor will be opened.

If more than one editor is in write mode (no read only) on the page, the F10 key opens still the editor where the cursor is currently located. I think this is OK, because so people who know this feature from the past, can still use it.

avatar dgrammatiko dgrammatiko - test_item - 22 Jun 2018 - Tested successfully
avatar dgrammatiko
dgrammatiko - comment - 22 Jun 2018

I have tested this item successfully on f663276


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/20684.

avatar Anu1601CS Anu1601CS - change - 22 Jun 2018
The description was changed
avatar Anu1601CS Anu1601CS - edited - 22 Jun 2018
avatar Anu1601CS Anu1601CS - change - 22 Jun 2018
The description was changed
avatar Anu1601CS Anu1601CS - edited - 22 Jun 2018
avatar Anu1601CS
Anu1601CS - comment - 22 Jun 2018

Thanks @dgrammatiko

avatar franz-wohlkoenig franz-wohlkoenig - change - 22 Jun 2018
Status Pending Ready to Commit
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 22 Jun 2018

Ready to Commit after two successful tests.

avatar laoneo laoneo - change - 22 Jun 2018
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2018-06-22 14:39:43
Closed_By laoneo
Labels Added: ?
avatar laoneo laoneo - close - 22 Jun 2018
avatar laoneo laoneo - merge - 22 Jun 2018
avatar laoneo
laoneo - comment - 22 Jun 2018

Nice one, thanks all involved.

Add a Comment

Login with GitHub to post a comment