? ? ? Pending

User tests: Successful: Unsuccessful:

avatar okonomiyaki3000
okonomiyaki3000
5 Mar 2018

Summary of Changes

First of all, this includes CodeMirror 5.35.0 so it's the same as #19809
Additionally, it removes the old option for "Vim Mode" and replaces it with additional choices for key mappings. Vim is still one of them (and will be used if you had previously selected Vim Mode) but now Emacs and Sublime Text are also provided. So, if you're familiar with any of those editors, you can make CodeMirror use similar keys and behave in mostly the same way.

Since it doesn't make much sense to load all key mappings at the same time (you use either zero or one of them), key mapping info will not be loaded unless needed. As a result, the addons file (a bundle of several codemirror plugins) is much smaller now.

Testing Instructions

Use CodeMirror. If you are familiar with Vim, Emacs, or Sublime Text, use one of those key mappings. Notice the change in CodeMirror's behavior.

Expected result

CodeMirror should work as usual. Additional Key Mapping modes should work somewhat like other editors.

Actual result

As expected.

Documentation Changes Required

I guess not.

avatar okonomiyaki3000 okonomiyaki3000 - open - 5 Mar 2018
avatar okonomiyaki3000 okonomiyaki3000 - change - 5 Mar 2018
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 5 Mar 2018
Category Administration Language & Strings JavaScript External Library
avatar okonomiyaki3000
okonomiyaki3000 - comment - 5 Mar 2018

Appveyor is wrong. There is no problem.

avatar infograf768
infograf768 - comment - 7 Mar 2018

restarted Travis as it was failing

avatar zero-24
zero-24 - comment - 8 Mar 2018

Works great (just tested subline syntax examples) but what do you think about a dropdown vs. 4 radio buttons?

avatar brianteeman
brianteeman - comment - 8 Mar 2018

Dont know why but patchtester isnt pulling all the files but looking at the code I agree with @zero-24 - it should be a dropdown

avatar zero-24
zero-24 - comment - 8 Mar 2018

Dont know why but patchtester isnt pulling all the files

Yes i have done a clean install of the branch that solves the issue. ;)

avatar okonomiyaki3000
okonomiyaki3000 - comment - 9 Mar 2018

ok, it can be a dropdown

avatar okonomiyaki3000 okonomiyaki3000 - change - 14 Mar 2018
Labels Added: ? ?
avatar zero-24
zero-24 - comment - 18 Mar 2018

I have tested this item successfully on 115b803

Thanks 👍

Can you please solve the conflicts comming from the merge of the other Codemirror PR?


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

avatar zero-24 zero-24 - test_item - 18 Mar 2018 - Tested successfully
avatar joomla-cms-bot joomla-cms-bot - change - 19 Mar 2018
Category Administration Language & Strings JavaScript External Library Administration Language & Strings JavaScript External Library Front End Plugins
avatar okonomiyaki3000
okonomiyaki3000 - comment - 22 Mar 2018

This should be good to go. There's another update to codemirror but I don't want to make a PR for it until this gets merged.

avatar zero-24
zero-24 - comment - 25 Mar 2018

I have tested this item successfully on 160afb8

Thanks @okonomiyaki3000 👍


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

avatar zero-24 zero-24 - test_item - 25 Mar 2018 - Tested successfully
avatar okonomiyaki3000
okonomiyaki3000 - comment - 10 Apr 2018

Hmm. Still waiting on this, eh?

avatar okonomiyaki3000
okonomiyaki3000 - comment - 23 Apr 2018

Another new version of CodeMirror is out but I won't be updating until this gets merged.
http://codemirror.net/doc/releases.html

avatar Quy
Quy - comment - 23 Apr 2018

For Default value, should it be None or Off?

avatar okonomiyaki3000
okonomiyaki3000 - comment - 23 Apr 2018

Looks like I set the default value to empty string. The default text is 'Default'. CodeMirror's default is actually "default" so maybe I should double check.

avatar Quy
Quy - comment - 24 Apr 2018

With this patch applied, the editor does not display properly. Does not matter which KeyMap is selected. Tested with v3.8.8 dev.

19833

avatar Quy
Quy - comment - 24 Apr 2018

For the plugin configuration, it is not b/c if previously enabled with the old option. You will have to reselect vim with the new option, otherwise, it will default to Default.

avatar okonomiyaki3000
okonomiyaki3000 - comment - 24 Apr 2018

No, I guess I was not setting it to empty string. I don't know why I thought I was. Actually, I don't see any issue with the code but let me test it a bit and get back to you.

avatar okonomiyaki3000
okonomiyaki3000 - comment - 24 Apr 2018

@Quy I could not duplicate your issue. I will rebase with the latest staging but I don't really see why it should make any difference. I don't believe there have been any other changes to CodeMirror.

avatar okonomiyaki3000
okonomiyaki3000 - comment - 24 Apr 2018

Yeah, no such issue. Could you tell me which browser you're using and whether there are any messages in your javascript console?

avatar Quy
Quy - comment - 24 Apr 2018

Sorry false alarm. It is working now.

avatar zero-24
zero-24 - comment - 24 Apr 2018

Sorry false alarm. It is working now.

@Quy so we can move this to RTC now?

avatar zero-24
zero-24 - comment - 24 Apr 2018

and please @brianteeman do your en-GB review here so we can move forward :)

avatar Quy
Quy - comment - 24 Apr 2018

Couple of observations:

  • It is not obvious what Default does. I suggested None or Off to imply key mapping is disabled.

  • When configuring the plugin initially, the new option will not select vim if the old option is On. You have to reselect vim with the new option.

If these are non issues, then ok to be RTC.

avatar okonomiyaki3000
okonomiyaki3000 - comment - 25 Apr 2018

It is not obvious what Default does. I suggested None or Off to imply key mapping is disabled.

But it is not 'none' or 'off'. It is CodeMirror's default. It does have some keys mapped by default. For example, Ctrl-D deletes a line, Ctrl-Z is undo, etc. Changing to a different one overwrites this. So then, with Sublime key mapping, Ctrl-D doesn't delete a line but duplicates your current selection to the next matching string. And so on.

When configuring the plugin initially, the new option will not select vim if the old option is On. You have to reselect vim with the new option.

Hmm. That's not the way I thought I coded it and it's not the way it worked when I tested it. Let's both check again.

avatar Quy
Quy - comment - 25 Apr 2018

To reproduce.

  • Enable Vim Keybinding
  • Apply patch
  • Edit CodeMirror plugin
  • Key Map is set at Default when it should be Vim
avatar okonomiyaki3000
okonomiyaki3000 - comment - 25 Apr 2018

@Quy Ah, yes. You're right about that. In fact, if you were to use CodeMirror without going to the settings first, you'd still have Vim but it's true that the settings reset to default. Well, really the only way to fix that is to modify the form data in onContentPrepareData which doesn't even get fired on editor plugins so it would require adding a content plugin just for this one thing... I think not worth it.

avatar Quy
Quy - comment - 25 Apr 2018

Yes. It is not worth it. It can be a one-time quick fix by setting the new option.

avatar Quy
Quy - comment - 25 Apr 2018

I have tested this item successfully on 1b102a2


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

avatar Quy Quy - test_item - 25 Apr 2018 - Tested successfully
avatar Quy Quy - change - 25 Apr 2018
Status Pending Ready to Commit
avatar Quy
Quy - comment - 25 Apr 2018

RTC


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

avatar zero-24 zero-24 - alter_testresult - 25 Apr 2018 - zero-24: Tested successfully
avatar mbabker mbabker - change - 29 Apr 2018
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2018-04-29 14:48:13
Closed_By mbabker
Labels Added: ?
avatar mbabker mbabker - close - 29 Apr 2018
avatar mbabker mbabker - merge - 29 Apr 2018

Add a Comment

Login with GitHub to post a comment