User talk:Remember the dot/Archive/2015

Size 35 Font
The font is huge, like size 30.


 * Firefox version 35 (the latest version)
 * Firefox Safe-mode (no extensions/plugins)
 * My Preferences: all default (reset except for Syntax Highlighter)

This happens in all edit boxes.

&mdash; Cp i r al  Cpiral  18:21, 22 January 2015 (UTC)


 * I can't reproduce the problem. What is your operating system? (Ideally I'd like to know your complete User-Agent information.) What MediaWiki skin do you use? Does the problem occur even when the syntax highlighter is unchecked in your preferences? Does the problem occur in other web browsers? —Remember the dot (talk) 18:48, 22 January 2015 (UTC)


 * , have you tried pressing  to reset your zoom level to default?  Otherwise, your  and are often very useful bits of information to offer in such bug reports. :) —   19:57, 22 January 2015 (UTC)

It was the zoom level. Thank you for getting my highlighter back! It was also my browser settings. Firefox Options-->Content-"Default font"-Advanced-settings has two settings, and they were mismatched.

HOWEVER ...

Please note that a behavioral issue with the highlighter was discovered here, isolated by changing only one variable: whether Syntax Highlighter was on or off. When on, the highlighter's zoom level differs from the level of the Firefox browser if the browser was already zoomed in, before the edit box appears. In effect it seems to perhaps double the zoom.

To recreate the highlighter zoom problem (Mozilla/5.0 (Windows NT 6.1; WOW64; rv:35.0) Gecko/20100101 Firefox/35.0, screen resolution 1560 x 1440): The discrepancy is obvious: Syntax Highlighter makes the text too large.
 * 1) Set Firefox font size to 16 (Options-->Content, Default font)
 * 2) Set  to "Browser Default"
 * 3) Zoom in several times.
 * 4) Start the edit box.

AND

This happens only when Syntax Highlighter is on: That scenario — edit-zoom-back-edit, a simple back and forth — is very telling of the Syntax Highlighter zoom problem.
 * 1) Reset the zoom, and set the browser default font size to a too-small size.
 * 2) Start the edit box. The edit box font will be too small.
 * 3) Zoom in several times until the font size in the edit box seems large enough.
 * 4) Go back one page, back to the page you want to edit.
 * 5) Start the edit box again.

Another workaround was to change the Wikipedia default "Edit Area Font Style" to "Serif Font" or "Sans Serif Font". Then the size of the font in the edit box matched that of the rest of the edit page.

Unaware, I'd been browsing with my zoom on and not knowing of "Default font" or "Monospace", the two terms that both Firefox and Wikipedia use to refer to settings. That's how I got here to report the highlighters zoom behavior. I only found the reported behavior when I zoomed in even more than usual.

Again, thank you both. &mdash; Cp i r al  Cpiral  00:53, 23 January 2015 (UTC)


 * I still can't reproduce the problem. The text with the syntax highlighter and the text without the syntax highlighter are exactly the same size at any zoom level. Maybe you could post before-and-after screenshots of what you're seeing? Also, what is your DPI? —Remember the dot (talk) 04:36, 24 January 2015 (UTC)


 * My DPI is set at 100%. I'll wait before sending screenshots, OK?


 * I gave two scenarios that reproduce a problem on my machine (described above), even while my problem was solved by browser settings. I understand you to say both scenarios produced no surprise when you walked through them.  I assume your Firefox advanced font settings allow the server to set the font, and that your WP Prefs are set to Default or Monofont.

Please consider a new piece of information: the problem occurs after a delay (noticable on a slow machine) equivalent to loading a style sheet specification. Rewording scenario #2:
 * 1) I start the edit box.
 * 2) I zoom in many times. Font in edit box is zooming in sync, and when I zoom back, it stays in sync as expected.
 * 3) But when I'm in zoom mode at the edit box and then go back a page and start the edit box again, the problem occurs: font in edit box becomes larger after a delay reminiscent of an instance of the application of a CSS stylesheet.

Please try that, but since neither of us "has" the problem, the font-too-large problem is not important now. I just wonder if it may become important later... Happy editing!

&mdash; Cp i r al  Cpiral  07:10, 26 January 2015 (UTC)

DotsSyntaxHighlighter: bug report
Hello, I would like to report a bug when using DotsSyntaxHighlighter.

Using: Firefox 36.0; appearance: vector (default); gadget "Reference Tooltips", "CharInsert", "refToolbar" and the "Form for filing disputes" (probably the default values) — Preceding unsigned comment added by Wikini (talk • contribs) 13:12, 23 March 2015 (UTC)

With tables
The following lines are not parsed correctly:

Without tables
An other way to see this bug is with the following line (as can be seen by editing this section):

The beginning of italic text and the rest of the italic text.

The beginning of italic text and the rest of the italic text.

.}} stopped working.

I have a several such color disabled, eg: syntaxHighlighterConfig = { boldOrItalicColor : "", wikilinkColor: "", headingColor: "", signatureColor: "", tableColor: "#E6F2FF", entityColor: "", }

but the empty codes seem to now be ignored. As a test, I set headingColor to cyan, saved the .js and edited a page - sure enough the headings were cyan. When I reverted to my original  the heading are back to being highlighted grey - whereas a couple of days ago they were not highlighted at all (which is what I want).

So far as I know nothing as changed on my PC or Wikipedia preferences. Has a recent change to your code done something?

The problem occurs on any non-trivial en.wikipedia.org article.

My user agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:25.5) Gecko/20150607 PaleMoon/25.5.0. (I get the same result if I use User Agent Overrider to tell PaleMoon to pretend to be: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:28.0) Gecko/20100101 Firefox/28.0)

MediaWiki skin: MonoBook

Gadgets enabled:

Browsing Watchlist Editing Appearance
 * Focus the cursor in the search bar on loading the Main Page
 * Open external links in a new tab/window
 * Reference Tooltips: Roll over any inline citation to see reference information, instead of having to jump away from the article text.
 * FormWizard. A wizard for creating and expanding project pages.
 * Geonotice: Display notices on your watchlist about events in your region.
 * Display green collapsible arrows and green bullets for changed pages in your Watchlist, History and Recent changes
 * Syntax highlighter, make syntax stand out colorfully in the edit box. Works best in Firefox and works almost all of the time in Chrome and Opera.
 * HotCat, easily add / remove / change a category on a page, with name suggestion [example]
 * wikEdDiff, improved diff view between article versions (not needed if wikEd is used)
 * Add an [edit] link for the lead section of a page
 * Change UTC-based times and dates, such as those used in signatures, to be relative to local time.
 * Display diffs with the old yellow/green colors and design
 * Disable animations in the interface
 * Show radio buttons to switch between views of certain content, such as some maps

monobook.css

/* Based on post at: https://en.wikipedia.org/w/index.php?title=Wikipedia:Village_pump_%28technical%29&diff=497544745&oldid=497543091 */ .mw-special-Watchlist div#content{ background: white; } /* Other examples of syntax: .mw-special-Watchlist div#content a:visited{ background: black; } .mw-special-Watchlist div#content a:link{ background: green; } .mw-special-Watchlist div#content a:link{ color: orange; } */ .mw-special-Watchlist div#content a:visited{ color: purple; } /* Stop the animation/transition of pop-up dialog boxes in Visual Editor Source: https://en.wikipedia.org/w/index.php?title=Wikipedia:VisualEditor/Feedback&diff=620990753&oldid=620989803#Stop_the_animation_please */ .oo-ui-window, .oo-ui-window-frame { transition: none !important; }

monobook.js

popupFixDabs=true; popupPreviews=false; LocalComments = { dateDifference: false, dateFormat: 'ymd', timeFirst: false, twentyFourHours: true, dayOfWeek: false, dropDays: 0, dropMonths: 0 }; // used by WP:LOCALISE // wikEd customisations. // References: https://en.wikipedia.org/wiki/User:Cacycle/wikEd_customization, https://en.wikipedia.org/wiki/User:Cacycle/wikEd.js var wikEdConfig = {}; wikEdConfig.frameCSS = { '.wikEdList': , '.wikEdLinkName': , '.wikEdLinkText': ''}

Browser extensions: Adblock Latitude 3.0.2, Element hiding helper for Adblock Plus 1.3.2.1-signed, Pale Moon Commander 1.7.0, User Agent Overrider 0.2.4.-signed.

Your help would be appreciated. Thanks Mitch Ames (talk) 12:35, 8 July 2015 (UTC)


 * Augh, sorry! I introduced this bug by mistake a couple of days ago . It is now fixed . I will have to be more careful in the future. —Remember the dot (talk) 17:30, 8 July 2015 (UTC)


 * Fix confirmed. Thanks for the quick response. Mitch Ames (talk) 11:07, 9 July 2015 (UTC)

Nob-braking space character highlight
Hi. Is it possible to add an optional highlighting of the non-braking space to the script? A short description of why would I need it follows. Now in ukwiki we are using the symbol's mnemonic in order to put it in wiki-text where needed per our typography. The main argument why we use the mnemonic instead of the actual Unicode symbol is that you can't distinguish the non-braking space from just ordinary space while editing. On the other hand there are users who are opposed to the mnemonic since it supposedly scares newbie editors without HTML knowledge. I believe that giving the first group of people a chance to see the actual Unicode non-braking space could turn the discussion's tides as we already have your script as a gadget. Perhaps your script already supports custom highlights - please kindly point me how to do it in the case. Thank you in advance. -- ᛒᚨᛊᛖ ( ᛏᚨᛚᚲ ) 12:07, 13 July 2015 (UTC)


 * It doesn't support it, and it's not worth adding. Remember that the highlighter does not work on all pages or in all scenarios, so depending on the highlighter alone to distinguish breaking spaces from non-breaking spaces is not a good idea. I know that the issue of breaking versus non-breaking spaces is difficult and polemic, but it will have to be resolved another way. —Remember the dot (talk) 15:56, 13 July 2015 (UTC)

License for Syntax highlighter.js
Hello. I'm currently working on (Highlighted wikisyntax while editing articles). I saw that you've already implemented a gadget which effectively does the same thing. I would like to integrate this functionality into the WikiEditor extension and make it an option in the editing preferences. This would allow it to be used by editors on all the projects, not just English Wikipedia. Rather than rewriting your code from scratch, I was wondering if you would be willing to license your existing code at mw:User:Remember the dot/Syntax highlighter.js under the GPLv2 license (the license used by the WikiEditor Extension). You would be given full credit for the code within the JavaScript file, as well as co-credit on the Extension documentation page and at Special:Version. If that sounds amenable to you, please add a comment to the top of mw:User:Remember the dot/Syntax highlighter.js stating that the code is dual-licensed as both CC-BY-SA (its current license) and GPLv2. If you have any questions, just ping me. Kaldari (talk) 19:45, 3 August 2015 (UTC)


 * After reading this article and giving it some thought, I have come to the conclusion that it is against the goals of free software to make code available only under a Creative Commons license. Consequently, I have added a GPLv2+ declaration to the syntax highlighter's source code as you suggested. To be legally bulletproof, we should also wait to hear back from Perhelion, Protnet, Dalba, and Mattho69, who contributed translations.


 * At least a dozen wikis already provide the syntax highlighter as a gadget, and I intend to keep providing and maintaining it primarily as a gadget. Also be aware that the syntax highlighter has several limitations and has received a surprising amount of negative feedback, so I do not recommend enabling it by default on any wiki without obtaining community consensus beforehand. Still, changing it from a gadget to an extension could make the syntax highlighter available to a wider audience, provide a more user-friendly interface to set user preferences, and resolve problems such as the inability to automatically detect which non-wikitext tags are provided by extensions on the wiki. But to be honest, almost all of the problems I mentioned could be resolved through other means. For example, the MediaWiki developers could allow anonymous users to use gadgets and save preferences in browser cookies, and an API could be added to let client-side scripts know about installed extensions.


 * So in the end, I am not sure how much the community would like turning the syntax highlighter into an extension, and I am not sure that this is the best option from a software engineering standpoint either. Nonetheless, I support your freedom to reuse the syntax highlighter. Please keep me in the loop about what you decide. —Remember the dot (talk) 06:30, 5 August 2015 (UTC)
 * Thanks for adding the licensing statement and sharing your thoughts on the gadget. I'm sure we won't be enabling it by default anywhere, but it will be nice to have it as an option for all the projects. Since we'll be using the MediaWiki i18n message system, the message translations will be done again from scratch via TranslateWiki, so the licensing for the existing translations isn't too important (at least for us). One problem that I noticed when testing out the extension is that the HTML entity highlighting doesn't seem to be working (tested in Firefox). It's not a critical bug, but I thought I'd mention it. I'll keep you updated on our progress. Cheers! Kaldari (talk) 17:55, 5 August 2015 (UTC)


 * Fixed. Thanks for pointing out that bug. It would be a good idea to write a test suite to prevent regressions like this, I just never took the time to make one. —Remember the dot (talk) 03:48, 6 August 2015 (UTC)


 * Also, how do you want to be credited in the extension credits? "Remember the dot"? Kaldari (talk) 01:44, 6 August 2015 (UTC)


 * Sure :-) —Remember the dot (talk) 03:48, 6 August 2015 (UTC)


 * Just to mention it: my fork does have tests. --Schnark (talk) 07:39, 6 August 2015 (UTC)
 * To give you a bit of an update... I implemented a quick and dirty implementation of your gadget within the WikiEditor extension (https://gerrit.wikimedia.org/r/#/c/229616/) as a proof of concept. Since then, some other developers have pointed me to the CodeMirror Extension which might end up being a better solution. I'm currently evaluating the CodeMirror extension to see how much work would be needed to productize it. You can follow future developments at https://phabricator.wikimedia.org/T101246. Cheers! Kaldari (talk) 20:35, 10 August 2015 (UTC)

wikieditor z-index
Hi, could you change syntax highlighter from: into This is required to deal with Village_pump_(technical). This bug has become visible due to slight changes in load order. Also: Thank you —Th e DJ (talk • contribs) 17:51, 10 August 2015 (UTC)
 * 1) zIndex is the DOM property, not the css attribute. I'm surprised this worked before, didn't know that jQuery was able to do that.
 * 2) It's not a good idea to use the style attribute if you could also use a style block of external stylesheet.


 * I just edited the syntax highlighter to avoid this kind of hack altogether. As far as I can tell, the new code is working fine, but please let me know right away if you have any more problems. —Remember the dot (talk) 06:56, 11 August 2015 (UTC)

Thank you!
Hi! I spent the whole last week looking for a live wikicode syntax highlighter for my self-hosted MediaWiki, I searched everywhere but had no success, and I had already resigned myself to spent much more time developing a script on my own, until I found your script. It's PERFECT. It does exactly what I want and works like a charm. Many thanks for creating it! :) --Manuel de la Fuente (talk) 06:07, 3 November 2015 (UTC)


 * You're welcome! I'm glad you like it! —Remember the dot (talk) 03:29, 24 November 2015 (UTC)