Last modified: 2011-07-20 19:24:48 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T30574, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 28574 - Proofread doesn't add buttons to wikiEditor toolbar, only to legacy one.
Proofread doesn't add buttons to wikiEditor toolbar, only to legacy one.
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
ProofreadPage (Other open bugs)
unspecified
All All
: Normal major with 1 vote (vote)
: ---
Assigned To: Brion Vibber
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-04-16 14:05 UTC by billinghurst
Modified: 2011-07-20 19:24 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Code of a user script to add the buttons (2.75 KB, application/x-javascript)
2011-07-13 19:12 UTC, Helder
Details
Screenshot of error console on Google Chrome (198.58 KB, image/png)
2011-07-13 19:15 UTC, Helder
Details

Description billinghurst 2011-04-16 14:05:30 UTC
With the default implementation of the enhanced toolbar as the default it is causing some issues at English Wikisource, and presumably other Wikisource languages.

In the Page: namespace at Wikisource, we implement part of the ProofreadPage extension.  Part of the implementation is an addition of five buttons to the toolbar.  Functions are
* toogle header/footer
* zoom in
* reset zoom
* zoom out
* toggle vertical/horizontal layout
these do not appear with the enhanced toolbar and I cannot fathom how <s>either, where they are added and</s> how to implement them into enhanced toolbar.

Reedy has shown to me that they are called in proofread.js [1] and I either need to know whether the modifications should be made to that script so that the buttons show up in enhanced and standard toolbar.  Alternatively whether there is the means to add them to the enhanced toolbar outside of the extension.  The former would be preferred as that would then apply across all the WS wikis, the latter will suffice and each wiki would need to undertake

On similar note, there is an OCR tool button that can also be added to the standard toolbar [2] that has similar issues.

If this is about guidance about how we fix locally, then we give it a go, just not either my comfort zone or knowledge base.

Thanks.


[1] http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/ProofreadPage/proofread.js?view=markup
[2] https://secure.wikimedia.org/wikipedia/sources/wiki/MediaWiki:OCR.js
Comment 1 DieBuche 2011-04-16 14:12:24 UTC
See http://www.mediawiki.org/wiki/Extension:WikiEditor/Toolbar_customization for a guide how to add stuff to the toolbar
Comment 2 Roan Kattouw 2011-04-17 08:29:37 UTC
(In reply to comment #1)
> See http://www.mediawiki.org/wiki/Extension:WikiEditor/Toolbar_customization
> for a guide how to add stuff to the toolbar
You can use that guide to fix OCR locally. ProofreadPage needs to be fixed in SVN.
Comment 3 Helder 2011-07-13 19:12:48 UTC
Created attachment 8778 [details]
Code of a user script to add the buttons

(In reply to comment #2)
> (In reply to comment #1)
> > See http://www.mediawiki.org/wiki/Extension:WikiEditor/Toolbar_customization
> > for a guide how to add stuff to the toolbar
> You can use that guide to fix OCR locally. ProofreadPage needs to be fixed in
> SVN.

Not really. Although we can add the buttons to the toolbar using a code like the one attached to this bug, the functions "pr_toggle_visibility" and "pr_toggle_layout" are not available for use on gadgets and user scripts, raising errors on error console.
Comment 4 Helder 2011-07-13 19:15:48 UTC
Created attachment 8779 [details]
Screenshot of error console on Google Chrome

(In reply to comment #3)
> Not really. Although we can add the buttons to the toolbar using a code like
> the one attached to this bug, the functions "pr_toggle_visibility" and
> "pr_toggle_layout" are not available for use on gadgets and user scripts,
> raising errors on error console.

See the screenshot. I think if you define those functions by means of e.g.
    self.pr_toggle_visibility = function()
instead of 
    function pr_toggle_visibility() 
then users could fix the bug locally without having to copy the whole proofread.js file.
Comment 5 Helder 2011-07-13 19:29:21 UTC
Changing importance because this affects all users of all Wikisources since the "enhanced" toolbar is the default on all projects.
Comment 6 Brion Vibber 2011-07-15 20:44:05 UTC
Assigning to myself, doing some related cleanup.
Comment 7 Brion Vibber 2011-07-15 21:49:55 UTC
r92311 & r92314 fix up ProofreadPage on trunk to do the toolbar buttons in a WikiEditor-compatible way (based on the script patch above), also switching the classic-toolbar path to use the labels/icons/actions as already made from the structure for that, so we don't have to define them twice.

The separate OCR button script I think shouldn't actually depend on anything else internally (?) but I'm not totally sure. Haven't attempted anything with that.


Revs above need merge to 1.18 and 1.17/1.17wmf1; I'll take a peek and make sure it's not a tricky merge.
Comment 8 Brion Vibber 2011-07-15 22:06:51 UTC
Merged to REL1_17 r92319 - tested locally.

Merged to 1.17wmf1 r92321.

Merged to REL1_18 r92323.

Fix should go live shortly.
Comment 10 Helder 2011-07-15 22:51:48 UTC
Thank you very much!
Comment 11 Helder 2011-07-20 19:24:48 UTC
Brion, I'm not sure this is was caused by the recent changes, but a user reported the following on English Wikisource:
----
I may be wrong, but I assume that it is this fix that may have introduced a minor glitch into Proofread Page: until a few days ago, when in "zoom" mode, the mouse cursor changed to crosshairs, while "scroll" mode was the normal arrow. Now it is the arrow in both modes, which is an inconvenience.
----
https://secure.wikimedia.org/wikisource/en/w/index.php?title=Wikisource%3AScriptorium&action=historysubmit&diff=3176709&oldid=3176578

And when I go to the page
http://de.wikisource.org/w/index.php?title=Seite:Arthur_Schnitzler_%E2%80%93_Flucht_in_die_Finsternis_%E2%80%93_141.jpg&action=edit&debug=1

using Chromium 12.0.742.112 (90304) Ubuntu 11.04, and click on the image, I get the following error:
----
Uncaught TypeError: Cannot set property 'cssText' of undefined
pr_dropproofread.js:435
----

On Firefox 5.0 the error is
----
pr_rect.style is undefined
http://bits.wikimedia.org/w/extensions-1.17/ProofreadPage/proofread.js
Line 435
pr_rect.style.cssText = "display:none";
----

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links