Skip to content

CodeMirror 5.0#6150

Merged
wilsonge merged 1 commit intojoomla:stagingfrom
okonomiyaki3000:CodeMirrorUpdate
Mar 17, 2015
Merged

CodeMirror 5.0#6150
wilsonge merged 1 commit intojoomla:stagingfrom
okonomiyaki3000:CodeMirrorUpdate

Conversation

@okonomiyaki3000
Copy link
Copy Markdown
Contributor

CodeMirror 5.0 is out and here it is. Please see http://codemirror.net/ for details. Basically, it might work on mobile now.

Also:

  • I'm minifying the mode files now which probably doesn't make that much difference but anyway...
  • Minified files are now *.min.js and *.min.css, uncompressed is *.js and *.css. Previously, the compressed version was simply *.js, *.css with uncompressed marked with '-uncompressed' which was kind of ugly.

@infograf768
Copy link
Copy Markdown
Member

The formatted name -uncompressed is specially used when debug is on. One should not get rid of it.

@dgrammatiko
Copy link
Copy Markdown
Contributor

@infograf768 I think @okonomiyaki3000 has covered nicely this option

$ext = JFactory::getConfig()->get('debug') ? '.js' : '.min.js';

same thing goes for css, so no real worries for dropping the -uncompressed

@infograf768
Copy link
Copy Markdown
Member

Why would we? imho, better normalize.

@Fedik
Copy link
Copy Markdown
Member

Fedik commented Feb 23, 2015

JHtml::_('script') will detect automatically debug mode, for uncompressed and for .min.js

so this $ext = JFactory::getConfig()->get('debug') ? '.js' : '.min.js'; do no need, just enough JHtml::_('script', 'pathto/script.min.js')

@okonomiyaki3000
Copy link
Copy Markdown
Contributor Author

For some time now, JHtml::script and JHtml::stylesheet have been able to swap .min.js and .min.css for their non-min counterparts when debug is on. So you basically have the option to use the .min way or the -uncompressed way. I'm choosing .min because it just seems like the better way of doing it (and it's kind of a defacto standard anyway).

The line of code that @DGT41 mentions is not using JHtml::script so I'm choosing the extension in a more direct way but I intend to remove this in the near future anyway.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

See this change right here? Can't use JHtml::script for this. This string is a pattern used by CodeMirror to autoload the mode files. They all exists in both min and normal forms so we select which one we want and use it. Prior to this change, there was no minified version so it was not an issue.

@brianteeman
Copy link
Copy Markdown
Contributor

This needs to be testes and merged quickly as this fixes a major issue with CodeMirror in the template manager (you can't type / )


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

@Fedik
Copy link
Copy Markdown
Member

Fedik commented Mar 5, 2015

test show that it works (also type / fixed)
but I see milestone 3.5 😃

@brianteeman
Copy link
Copy Markdown
Contributor

yes the milestone was before the serious bug was discovered

On 5 March 2015 at 19:09, Fedir Zinchuk notifications@github.com wrote:

test show that it works
but I see milestone 3.5 [image: 😃]


Reply to this email directly or view it on GitHub
#6150 (comment).

Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
http://brian.teeman.net/

@FrankyDE
Copy link
Copy Markdown

Without patch:
tested on iPad front and back-end everything works, so I am not sure if I can actually test the patch.
tested on iPhone 6 works fine too.
Side-Note: Code Mirror does not generate closing tag "

" if you use Swipe as a (non standard) keyboard, default keyboard works fine.

After Patch: Everything seems to work correctly

Test MacBook Pro: Successful
Test iPad Air 2 Successful
Test iPhone 6 Successful

@brianteeman
Copy link
Copy Markdown
Contributor

@FrankyDE one easy test you can do is before the patch try to type a / it wont work. After the patch it will

@tecpromotion
Copy link
Copy Markdown
Contributor

Test successfully. Works as expected.


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

@zero-24
Copy link
Copy Markdown
Contributor

zero-24 commented Mar 14, 2015

RTC based on testing! Thanks!


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

@brianteeman brianteeman added the RTC This Pull Request is Ready To Commit label Mar 14, 2015
@FrankyDE
Copy link
Copy Markdown

thanks Brian, I tested that now without the patch and "/" does not display it simply vanishes.
Bug confirmed in iPad

Patch tested successful ! :-) #happy

wilsonge added a commit that referenced this pull request Mar 17, 2015
@wilsonge wilsonge merged commit 605f280 into joomla:staging Mar 17, 2015
@wilsonge wilsonge added this to the Joomla! 3.4.1 milestone Mar 17, 2015
@wilsonge wilsonge removed this from the Joomla! 3.4.2 milestone Mar 17, 2015
@zero-24 zero-24 removed the RTC This Pull Request is Ready To Commit label Oct 14, 2015
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.

10 participants