Last modified: 2012-11-16 20:17:38 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 T36172, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 34172 - result format feed / increasing behaviour and usability (SMW 1.8 beta 2)
result format feed / increasing behaviour and usability (SMW 1.8 beta 2)
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
Semantic MediaWiki (Other open bugs)
unspecified
All All
: Unprioritized enhancement with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks: 41842
  Show dependency treegraph
 
Reported: 2012-02-02 17:45 UTC by [[kgh]]
Modified: 2012-11-16 20:17 UTC (History)
4 users (show)

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


Attachments

Description [[kgh]] 2012-02-02 17:45:50 UTC
I believe it would be nice if one is able to set an icon to be shown instead of the value provided with parameter searchlabel
Comment 1 [[kgh]] 2012-11-15 17:11:06 UTC
Currently one can only have a link to the feed via the "searchlabel" parameter out of the box. I suggest to have an additional "icon" parameter which also links to the results like the "searchlabel". The custom icon should also be settable like it is done for the maps printers. Perhaps it is easier to have something like a "showicon" parameter too.

Thus one would have the following choices to display the results:
1. RSS/Atom
2. default/custom icon linking to RSS/Atom
3. RSS/Atom + default icon linking to RSS/Atom
4. RSS/Atom + custom icon linking to RSS/Atom
Comment 2 MWJames 2012-11-15 17:13:51 UTC
Why should the display and behaviour be different from any other existing printer?
Comment 3 [[kgh]] 2012-11-15 17:24:53 UTC
A lot of wikis I know also put a feed icon next to the result link manually to make it more visible that it is a feed that may be subscribed, including e.g. German wikipedia. Additionally the icon itself should be clickable to increase usability further. Currently it is not possible to do this out of the box.
Comment 4 MWJames 2012-11-15 17:45:27 UTC
Instead of raising the level of parameters for individual solutions into infinity, I rather suggest that the search link is being assigned a CSS class that will look like ( change in SMWResultPrinter in getLink() ) and add 

$link->setStyle(  $this->params['format'] . ' ' . 'query link' );

This would individuals solutions per format (not only feed format), makes use of the ResourseLoader (as icons that are attached to this class are loaded via RL), and does not raise the maintainability level due to special codes/parameters.
Comment 5 [[kgh]] 2012-11-15 17:52:39 UTC
My suggestion was a bit inspired by the map printers. However, I believe that you understood the actual "problem" raised. If it is possible to have another even better solution to the problem then I will of course go with that. :)
Comment 6 MWJames 2012-11-15 18:05:56 UTC
Well [1] has what it needs to make this work. Once the CSS class is assigned, you can have a script replacing the text assign an icon or do all sorts of magic.

[1] https://gerrit.wikimedia.org/r/#/c/33592/
Comment 7 MWJames 2012-11-15 18:59:33 UTC
After the above change has been merge, the only necessary is to add the lines below to the Mediawiki:Common.js in order to display a feed icon per further result link.

/**
 * Add link icon
 *
 * @rev 1
 * @author mwjames
 */

$( '.feed.further.results > a' ).addClass( 'feedlink' );
Comment 8 [[kgh]] 2012-11-15 22:29:15 UTC
That's great. Thank you for making this possible! I will document this.
Comment 9 MWJames 2012-11-16 03:03:17 UTC
'feedlink' is MW's own class that holds all necessary attributes (icon and position) for a standard feed icon which means that there is no need to declare any additional information in Common.css for class feedlink.

Of course if you need an individual attribution for the feed format or any other format, you can just do this my using the class name (concatenated "'format name'.further.results") as identifier.
Comment 10 [[kgh]] 2012-11-16 16:46:32 UTC
It is getting better by the minute. :) Thank you for straightening things out for me. I just rectified the documentation.

I see nice usecases for result formats which provide export functionality, like CSV, BiBTeX, etc. Great
Comment 11 MWJames 2012-11-16 17:04:17 UTC
I just had to change the class name to

"smw-" + format name + "-furtherresults" which means in case of the feed printer it will be 'smw-feed-furtherresults' resulting in

$( '.smw-feed-furtherresults > a' ).addClass( 'feedlink' ); to Common.js and for others it will be 'smw-cvs-furtherresults', 'smw-bibtex-furtherresults' etc.
Comment 12 MWJames 2012-11-16 20:17:38 UTC
Merged with 1.9 branch

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


Navigation
Links