Menu

#1166 Prevent tags from taking over the Advanced Title Search results page

Approved
open
nobody
None
5
2019-10-07
2018-07-05
Ahasuerus
No

From the Community Portal:

If you use Advanced Title Search and one or more of the results have too many tags, the tags column squishes the rest of the fields and takes over most of the screen. Here is an example: http://www.isfdb.org/cgi-bin/adv_search_results.cgi?USE_1=author_canonical&OPERATOR_1=exact&TERM_1=Ursula+K.+Le+Guin&CONJUNCTION_1=AND&USE_2=title_ttype&OPERATOR_2=exact&TERM_2=NOVEL&CONJUNCTION_2=AND&USE_3=title_title&OPERATOR_3=exact&TERM_3=&ORDERBY=title_title&START=0&TYPE=Title

Can we add a new user preference (similar to the "Do not display bibliographic warnings on Title pages") that controls if a user sees the tags in advanced search at all? This way if someone really does not care about the tags can stop them from cluttering the page.

Alternatively, we could set a hard width for the column using a percentage. ("Specific pixels width" wouldn't work for phones.)

Discussion

  • ErsatzCulture

    ErsatzCulture - 2019-10-07

    Another possible solution: only show the top N tags followed by "and X others".

    Variant of this might be using CSS "text-overflow: ellipsis;" on the cells in that column, although IIRC you'd need a bit more CSS involved because of the way table cells expand horizontally and vertically by default.

    (Caveat: apologies if these have already been discussed on the wiki - the discussion of this on the Community Portal page seems to have been archived off somewhere in the year since this ticket was opened. EDIT: found the archived wiki discussion: http://www.isfdb.org/wiki/index.php/ISFDB:Community_Portal/Archive/Archive45#Advanced_Title_Search_Results_and_Tags_and_user_preference although there's not really much more there than was already in this ticket.)

     

    Last edit: ErsatzCulture 2019-10-07
  • ErsatzCulture

    ErsatzCulture - 2019-10-07

    OK, I have some local changes that implement the "Only show N tags" approach described in the previous comment. One enhancement I've made over that is:

    • If the user included a tag value in their search criteria, show all tags (on the logic that this is something they're definitely interested in, and we don't want to risk hiding the tag they searched on)
    • If they didn't include a tag in the search criteria, then we limit the number of tags - currently 5, which seems to limit to no more than 2 lines of tags on a 1280px wide screen.

    There are example screengrabs at https://sf.ersatzculture.com/temp/NoTagCriteria.png and https://sf.ersatzculture.com/temp/WithTagCriteria.png - hopefully inline versions will appear below if I understand SourceForge's UI/markup correctly:

    Without tag search criteria

    With tag search criteria

    If this is deemed acceptable, I'll provide a patch in whatever format you want. NB: the changes involve both adv_search_results.(py|cgi) and common.py. Given the size and importance of those files, and that this would be my first code contribution to this project, I'm guessing it might be best to just provide the code for the 3 or 4 changed functions, rather than the whole files - as both of these files were a mix of tabs and spaces, my emacs setup has saved the files converting all the tabs. Whilst I personally am confident that emacs has done the right thing, I wouldn't expect anyone else to share that confidence, at least not without a few more proven commits to my name ;-)

     

    Last edit: ErsatzCulture 2019-10-07

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB