Last modified: 2013-09-21 05:29:36 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 T54064, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 52064 - Use control to toggle visibility of annotations
Use control to toggle visibility of annotations
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
Annotator (Other open bugs)
unspecified
All All
: Unprioritized enhancement (vote)
: ---
Assigned To: richa jain
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-25 22:33 UTC by Matthew Flaschen
Modified: 2013-09-21 05:29 UTC (History)
6 users (show)

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


Attachments

Description Matthew Flaschen 2013-07-25 22:33:18 UTC
Annotations probably shouldn't show by default in regular read mode.  Ideally, there would be a toggle to show and hide them.
Comment 1 Matthew Flaschen 2013-08-17 21:45:53 UTC
The first step is to think about how to do the interface for this.  I have a few ideas, but I'm sure there's a lot more I haven't thought of:

1. An icon (similar to the watchlist star, but a different icon) to toggle them, with a visible on and off state.
2. A separate tab next to read (e.g. "View with annotations").  When that's selected, annotations will be visible and the tab will be selected.
3. A link in the toolbox

Feel free to consider other ideas, and consult the design mailing list if you want.
Comment 2 richa jain 2013-08-18 16:48:59 UTC
I think having a separate tab next to read would be good.
Comment 3 Matthew Flaschen 2013-08-18 20:02:10 UTC
Using SkinTemplateNavigation is an option.  However, since it only works with JS anyway, it might be simpler to just use mw.util.addPortletLink.

You can use https://git.wikimedia.org/blob/mediawiki%2Fextensions%2FVisualEditor.git/0e1ad8a1bbe161741ca43a406f7d36d1a38cf26b/modules%2Fve-mw%2Finit%2Ftargets%2Fve.init.mw.ViewPageTarget.init.js#L175 as a starting point.

You don't need to use a URL parameter the way they're doing (veaction=edit), though you can (it would be a little more work, but it allows bookmarking the annotation view).

The simpler approach is to just use a click listener.  When it is clicked, load the annotations, and mark the tab selected (there is a 'selected' class you should add to the new tab and remove from the others).

If they are in annotation view, and click ca-view, or a tab starting with ca-nstab- (e.g. "Page" on annotator.wmflabs.org), select that, unselect the annotator tab, and destroy the annotations.  For the nstab one, I think you can use $( '[id^="ca-nstab-"]' ).  This part means it won't trigger a reload when they want to leave annotation view.
Comment 4 Gerrit Notification Bot 2013-08-19 18:27:09 UTC
Change 79839 had a related patch set uploaded by Rjain:
Added a tab to toggle visibility of annotations

https://gerrit.wikimedia.org/r/79839
Comment 5 Steven Walling 2013-08-19 20:43:57 UTC
(In reply to comment #2)
> I think having a separate tab next to read would be good.

From a user experience point of view, I'd recommend against making a tab next to Read. Tabs are usually separate pages/destinations, not tools for toggling ways to view articles. 

If you want it to be a primary page action, putting in the dropdown with Move etc. (this is Vector only) seems acceptable. For Monobook users, showing a tab is slightly more okay, since tabs tend to proliferate frequently in that skin.

Another option is to put in the Toolbox sidebar links.
Comment 6 MZMcBride 2013-09-18 02:04:44 UTC
Are there any screenshots of this extension or is it available on a test wiki somewhere?
Comment 7 Matthew Flaschen 2013-09-18 08:19:40 UTC
http://annotator.wmflabs.org/wiki/Main_Page .  This particular feature is not merged yet (or on that wiki).
Comment 8 Gerrit Notification Bot 2013-09-21 05:28:39 UTC
Change 79839 merged by jenkins-bot:
Added a tab to toggle visibility of annotations

https://gerrit.wikimedia.org/r/79839
Comment 9 Matthew Flaschen 2013-09-21 05:29:36 UTC
This is fixed, but further enhancements to the UI later would still be useful.

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


Navigation
Links