MediaWiki talk:Gadget-ImageAnnotator.js

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search
MediaWiki:Gadget-ImageAnnotator.js forms part of the MediaWiki interface and can only be edited by administrators, stewards and interface editors.
To request a change to MediaWiki:Gadget-ImageAnnotator.js, add {{Edit request}} to this talk page, followed by a description of your request.
This gadget is enabled globally for everyone through an inclusion in MediaWiki:Common.js. You need not (and in fact, cannot) enable it in any way; it is already enabled. In case of an insurmountable problem, there's an emergency switch-off that logged-in users can use: just enable at Special:Preferences→Gadgets the gadget for "disabling image annotations". If you feel the need to do that, please also report your problem here.

To see all annotated images, visit Category:Images with annotations.
Documentation on this script is at Help:Gadget-ImageAnnotator.

Archives
Conversations older than 7 days will be archived automatically.
Pending tasks for Gadget-ImageAnnotator.js: edit this list - add to watchlist - purge
None of these need to be fixed immediately, but they should be looked at eventually.
  • Provide a way to edit rectangles (allow size changes).
  • Icons instead of rectangles for some notes? (See here and here.)
  • Grouping of notes into layers? (See here.)
ImageAnnotator's Documentation.
ImageAnnotator's Frequently Asked Questions.
ImageAnnotator's technical Forum.
ImageAnnotator's non-technical Forum.
Image note guideline.

Annotation shapes

[edit]

I don't quite understand the argument (in Help:Image-Annotator#Frequently asked questions) that other annotation shapes are "not possible". Consider, for example, this screenshot I just took: https://imgur.com/a/n8JFClM. As the caption says, that circular annotation was created by simply adjusting the CSS properties for the annotation ‎<div>...‎</div>s: equal height and width, a positioning correction so that its center point is the same, and a ridiculously high border-radius value. Common trick. I'm sure css-tricks can offer plenty more.

I'm not saying annotations should go crazy with custom shapes, but I can certainly see how having at least circular ones could be useful, and those are ridiculously easy. FeRDNYC (talk) 03:30, 13 July 2023 (UTC)[reply]

Border-radius is not a solution – the argument is not about the impossibility of displaying non-rectangular annotations, but the impossibility of creating them. However, the point about issues in IE8 and lower doesn’t apply anymore – not even IE11 gets JavaScript nowadays. I don’t know what is meant by considerable difficulty using the <canvas> element of HTML5, but I assume it means this is still not ridiculously easy, although probably no longer entirely impossible. —Tacsipacsi (talk) 11:36, 15 July 2023 (UTC)[reply]

Worst gadget

[edit]
Happens every time and makes me think I'm stuck in 2003.

This thing needs a top-to-bottom re-creation. I wish I knew how to code because I'd do it myself. I can never get the tool to appear to allow me to create new notes, and existing notes often don't show. And even when I do create new notes, it doesn't let me save them, so I need to paste in the wikitext and save it. And then there's the fact that making small note boxes is ridiculously difficult. And the whole user interface feels like something out of Windows 98. Should this be a Community Wishlist entry? ɱ (talk) 21:14, 27 August 2023 (UTC)[reply]

I'd support that. To me the image annotator appears selectively and randomly and if it appears only functions with the workaround you also use. Paradise Chronicle (talk) 21:18, 8 September 2023 (UTC)[reply]
But I'd like to add that it is a great gadget, it just has a disfunction. The idea of it is great. Paradise Chronicle (talk) 07:44, 5 October 2023 (UTC)[reply]
User:Ɱ, User:Paradise Chronicle: Turned out this is that old that needs VisualEditor for wikitext edits be disabled from the preference ("Use the wikitext mode inside the visual editor, instead of a different wikitext editor" option) to work properly because it relies on things before introduction of edit API in MediaWiki understandably because being that old, it's a miracle by its own that some of it's functionalities are still working. I've fixed two issues from the script but haven't found a fix for this one that won't need changing the script too much (was imagining something appending ?disablevisualeditorforwikitext=1 to the editor), so considering the importance of the script some help would be nice I believe (cc: User:Krinkle, User:Matma Rex, User:Jarekt sorry for the spam feel free to ignore if you aren't interested) −ebrahimtalk 19:05, 9 June 2024 (UTC)[reply]
@Ebrahim You can use &action=submit parameter instead of &action=edit to open the old wikitext editor regardless of user preferences (mw:Manual:Parameters_to_index.php#submit). Matma Rex (talk) 21:27, 9 June 2024 (UTC)[reply]
@Matmą Rex: Wow, what a solution, just applied it and it made annotator to work again! Thanks! −ebrahimtalk 06:57, 10 June 2024 (UTC)[reply]
I do not read javascript so can not help with the code, but I agree with User:Ɱ and User:Paradise Chronicle that this great app could use "top-to-bottom re-creation". User:Ebrahim and User:Matma Rex, thanks for pathing it up. I did a lot of testing of the early version of the app when user:Lupo was working on it and has been a fan ever since. One issue with the app I find frustrating is that reuploading a new version of the file (with slightly altered dimensions) makes all annotations invisible since all the boxes are stored in pixel coordinates. User:Lucas Werkmeister's Positions Wikidata Image Positions tool was designed to store the box coordinates as fractions of the image in SDC properties ( relative position within image (P2677) ) and does not have that issue, so maybe any rewrite should be a merging of both tools. --Jarekt (talk) 12:45, 10 June 2024 (UTC)[reply]
User:Jarekt: Very interesting point, thanks for sharing. −ebrahimtalk 14:55, 10 June 2024 (UTC)[reply]