Template talk:JavaScript

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search

Move proposal on January 9, 2014[edit]

The following discussion is an archived discussion of a requested move. Please do not modify it. Subsequent comments should be made in a new section on the talk page. Editors desiring to contest the closing decision should consider a move review. No further edits should be made to this section.

The result of the move request was: Not moved. EdJohnston (talk) 00:10, 17 January 2014 (UTC)



Template:JavaScriptTemplate:JavaScript navbox – To make room for a new Template:JavaScript that can be used as a wrapper for edit requests to .js pages with source highlighting and background coloring. Examples would look like: (moved below my signature for transcluding reasons) Thanks for your consideration Technical 13 (talk) 05:42, 9 January 2014 (UTC) Technical 13 (talk) 05:42, 9 January 2014 (UTC)

Discussion[edit]

  • Technical 13, would you mind reformatting the nomination so the examples aren't part of the initial statement? It's affecting display at WP:RM. Thanks, BDD (talk) 19:41, 9 January 2014 (UTC)
  • Examples: (moved from above)
This would...
{{JavaScript|remove|
   /* section */
   var section = true;
   if(!section){
      alert("LIES!");
   }
}}
...result in:
   /* section */
   var section = true;
   if(!section){
      alert("LIES!");
   }

or

This would...
{{JavaScript|add|
   /* section */
   var section = true;
   if(section){
      alert("You've spoken the truth!");
   }
}}
...result in:
   /* section */
   var section = true;
   if(section){
      alert("You've spoken the truth!");
   }

Survey[edit]

Support[edit]

  1. As nominator - Technical 13 (talk) 05:43, 9 January 2014 (UTC)

Oppose[edit]

  • Oppose; I think the unadorned name should remain a topic navbox. Powers T 13:19, 9 January 2014 (UTC)

Support/Oppose[edit]

  • It's not an edit request itself (which would still use the main {{Edit protected}} because only admins can edit .js pages (excluding your own in your userspace, but you would need to submit a request for that_). My proposed replacement is a formating template that uses mw:Extension:SyntaxHighlight GeSHi to format JS code samples. Any formating template that uses Lua to format JS code samples would be located at Module:JavaScript. Technical 13 (talk) 07:08, 9 January 2014 (UTC)
  • Thanks for the clarification. Your nomination rationale makes it look like creating an edit request template. Making {{JavaScript}} a JS formatting template is a good idea. However, the green/red option seems mandatory, this should not be the case, if it is to provide generic javascript formatting functionality. Can it just be plain clear if it doesn't specify add or remove? -- 70.50.148.122 (talk) 08:16, 9 January 2014 (UTC)
{{JavaScript|
   /* section */
   var section = true;
   if(!section){
      alert("TEXTALERT");
   }
}}
   /* section */
   var section = true;
   if(!section){
      alert("TEXTALERT");
   }
  • If |1= is not add or remove (or one of any other predefined words), then yes is could be neutral and use the gray color (or no color or any other neutral color like yellow). Technical 13 (talk) 14:57, 9 January 2014 (UTC)
  • Wait, I thought this was a navbox. Are we talking about the move of that navbox, or a protected template edit request? Epicgenius (talk) 19:03, 9 January 2014 (UTC)
  • Thanks. So it's a move discussion after all. In any case, I don't think a rename is needed yet. Epicgenius (talk) 13:52, 10 January 2014 (UTC)
  • I am unclear why a new template's needed. It can be done with the syntaxhighlight tag, as seen in the examples above. Though the background colours are unhelpful I think for syntax highlighted code, which makes the tag even simpler. Perhaps the proposer can point to some discussions where formatted code with brightly coloured backgrounds might have been useful. But even given all that there's nothing stopping you creating a template now, and calling it something else. Then if it gets heavily used and becomes common then there might be a case for it taking the name of this one. Until then oppose.--JohnBlackburnewordsdeeds 22:03, 9 January 2014 (UTC)
  • Sure John. I got the idea for the formatting (with the background colors) from:
There are a lot of cases where the coloring would useful to {{Edit protected}} responders, and a simple template name like this will make it easier for all to remember to use. The template would make it easier to remember how to put it in the syntaxhighlight box (which can be hard for less technical people to remember, heck I even had a hard time remembering it for a while and because of the pattern of keys to type it out was (and still do) always missing characters (I had to add it to my browser's spellcheck dictionary to make sure I had it right)). Using a template for this will also make it easy to add a classname that will quickly allow people to opt out of seeing the formatting (or even just the background color) or modify the formatting to suite their needs. Technical 13 (talk) 15:58, 10 January 2014 (UTC)
A few observations. First that's only two discussions, hardly many. I notice also the syntax there is considerably easier, using 'source', 'background' and colour names not hex, so easier to remember, and also works here.
if ( mw.config.get( 'wgIsProbablyEditable' ) === 'true' || mw.config.get( 'wgCanonicalSpecialPageName' ) === 'Upload' ) {
which leads to perhaps the most important observation – that's Mediawiki, not English WP. So any template introduced here would not have helped with those discussions. I can't think of any case where someone will be rewriting the JS of en.wp on en.wp, so it would be unused. A more general temple, one supporting multiple languages, might be more useful. But then you've just recreated the source tag, giving editors another thing to learn. Better just to use the source tag.--JohnBlackburnewordsdeeds 16:15, 10 January 2014 (UTC)
Your "most important observation" is incorrect... That is right here on the English WP in the MediaWiki: namespace. Also, named colors are not supported by all browsers (albeit most do) and using the source tag is discouraged because as outlined in the Alternative <source> tag section of the extension's instruction page on mediawiki wiki, "...but <syntaxhighlight> avoids conflicts if your source code itself contains <source> (for example XML)". Technical 13 (talk) 16:30, 10 January 2014 (UTC)
You are right, I misidentified it, that is on en.wp, one of very few in the MW namespace. it's maybe the one page, or one of a handful, where editors might be discussing JS code changes. And they've got by so far without using a template (and have used the source tag without problems).
So I stand by what I wrote earlier; there's nothing to stop you creating the template now but with a different name. Then if it becomes widely adopted and editors find the name hard to remember a discussion could be had over whether to move it here or elsewhere. But until then, with no evidence of it being needed and no evidence it has to be at this name, the current template should not be moved.--JohnBlackburnewordsdeeds 17:34, 10 January 2014 (UTC)
The above discussion is preserved as an archive of a requested move. Please do not modify it. Subsequent comments should be made in a new section on this talk page or in a move review. No further edits should be made to this section.

Editors[edit]

Is this meant to be a list of notable editors capable of editing JavaScript (with syntax highlighting, etc.) or editors that are written in JavaScript (or both)? If it is just meant to be JavaScript capable editors, I wonder about how notable some of those are and think the list could be considerably longer or we could try to beef up the notability of listed items. If on the other hand this is meant to be a list of JavaScript-based editors (as the linked comparison article seems to be about), I would say some of those are less appropriate, e.g., although Light Table it is indeed mostly written in JavaScript, the editor portion is actually just CodeMirror (which Brackets also uses). Assuming the latter (JavaScript-based editors), I contend that articles like Brackets should either be added or Light Table be removed. I favor adding Brackets and reorganizing such that both it and Light Table are under CodeMirror since their editor portion is not original.

This also means things like Microsoft Visual Studio and Microsoft Visual Studio Express would be deleted (they are not written in JavaScript) and Visual Studio Code and Visual Studio Team Services (formerly Visual Studio Online) should be organized under Monaco (which does not currently have an article). 50.53.1.33 (talk) 02:04, 25 March 2017 (UTC)

Hello
It seems you and me are working in a lot of common areas. So, I think a belated welcome is in order. :)
The criteria for inclusion is links to articles about editors that can edit JavaScript.
Please note that this template is a navbox. It only includes Wikipedia articles. Notable or not. (If you have concerns about the notability of a specific article, the correct place to discuss it is either its talk page, or WP:AfD. So, no Monaco!
Best regards,
Codename Lisa (talk) 10:26, 26 March 2017 (UTC)