Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User Story "Search page" and "Result Page" #284

Open
7 of 11 tasks
plutonik-a opened this issue Nov 1, 2017 · 22 comments
Open
7 of 11 tasks

User Story "Search page" and "Result Page" #284

plutonik-a opened this issue Nov 1, 2017 · 22 comments
Labels
Search Lucene or the search module UI

Comments

@plutonik-a
Copy link
Contributor

plutonik-a commented Nov 1, 2017

Search Landing Page

  • As a user, I want to search the website and to be able to search the entire page or to limit the search on selected sections.
  • I want to refine my search with searching "case-sensitive", "match word" and "punctuation-sensitive".
  • I want to be able to limit the search to a specific date and/or time when I search the FRUS section.

06-hsg-search-page-v3

Parameters: /search or /search?q= (shown if no non-empty query parameters are present)


Search Result Page

  • As a user, I want to see the search results in a list with all information, that is given to the found document like URL, volume title, date, excerpt, title.
  • I want to filter the results by choosing specific sections, administrations and dates/time in FRUS volumes.
  • I want the active filters to be displayed and I want to be able to reset all filters at once or separately.
  • I want to be able to repeat a search with active filters.

08-hsg-results-page-applied-filter-tags-v2

Parameters: /search?q=cambodia or /search?within=documents&date-start=1965&date-end=1969 (shown if non-empty query parameters are present)


Attached tasks:

@plutonik-a plutonik-a added this to the Advanced search functionalities milestone Nov 1, 2017
@plutonik-a
Copy link
Contributor Author

This is a very first rough idea (no final fonts, colors or dimensions!) of putting all filters (advanced and simple) into one UI:
hsg-search-page-mockup

@tuurma tuurma modified the milestones: Advanced search functionalities, 2.1 FRUS Advanced search Nov 1, 2017
@WaxCylinderRevival
Copy link
Member

WaxCylinderRevival commented Nov 1, 2017

Suggested Changes (Target Release Date: December 2017)

  1. Add checkboxes for keyword-search options:

☐ Exact phrase ☐ Case-sensitive ☐ Punctuation-sensitive

1A. These keyword search options should be global, rather than limited to the Historical Documents set.

1B. Remove "Refine Search" + related options from Historical Documents

  1. Revise verbiage on radio buttons from "Search entire site" and "Search selected" to:

Search entire site
Search selected resources:

  1. On advanced search for Historical Documents:
    3A. Change "Limit search within dates" to:

Filter Historical Documents by Date

3B. Create two groupings, labeled "From" and "To"

3B1. In the "From" grouping, include start date and start time

3B2. In the "To" grouping, include end date and end time

3C. Change "from start date" heading to:

Start Date

3C. Add information icon (example image), which calls help/tips for entering dates:

Start Date

3D. Add "Start Time" directly below "Start Date." Add data entry boxes for Hours (hh) and Minutes (mm) and a toggle for am and pm:

Start Time (optional)
[ hh ] : [ mm ] 🔘 am 🔘 pm

3E. Change "to end date" to:

End Date

3F. Add information icon (example image), which calls help/tips for entering dates:

End Date

3D. Add "End Time" directly below "End Date". Add data entry boxes for Hours (hh) and Minutes (mm) and a toggle for am and pm:

End Time (optional)
[ hh ] : [ mm ] 🔘 am 🔘 pm

3G. Enable verification for data entry into "Start Date", "Start Time", "End Date", and "End Time". Example checks:

  • Has the user entered, at minimum, a value for year in start date?
  • Are date entries valid as date?
  • Are time entries valid as time?
  • Is start date before or equal to end date?
  • Is start time before or equal to end time?

3H. Once the user has entered a viable "Start Date," auto-populate "End Date" with that user-entered "Start Date" value

3H1. The user should maintain ability to edit the value in both "Start Date" and "End Date"

3I. Add radio buttons for sorting results options:

Sort Results By:
🔘 relevance
🔘 dates (oldest first)
🔘 dates (most recent first)

Outstanding issue: Anniversary/omnis dies search
User story: As a contributor to a government social media account, I need to post content on the anniversary of major events or interesting documents. Show me all the FRUS documents from May 1 of any year.

@WaxCylinderRevival
Copy link
Member

WaxCylinderRevival commented Nov 1, 2017

Links from today's discussion:

@WaxCylinderRevival
Copy link
Member

@plutonik-a, Joe has reviewed the suggestions above and we made edits to the earlier version. Please feel free to act on these suggestions.

@joewiz
Copy link
Member

joewiz commented Nov 2, 2017

@plutonik-a As promised, here is some sample text for your mockups of the results page:

Filter by administration

Given a search such as "cambodia AND domino" for the period 1954-1975, users may wish to further filter their results by individual volume or by administration grouping:

Summary: 15 hits for search for "cambodia AND domino" between 1954-01-01T00:00:00Z and 1975-12-31T23:59:59Z

The query I wrote to produce these results in eXide (assuming a populated hsg-project) is:

xquery version "3.1";

declare namespace tei="http://www.tei-c.org/ns/1.0";
declare namespace frus="http://history.state.gov/frus/ns/1.0";

let $q := "cambodia AND domino"
let $start-date := xs:dateTime("1954-01-01T00:00:00Z")
let $end-date := xs:dateTime("1975-12-31T23:59:59Z")
let $hits := collection("/db/apps/frus/volumes")//tei:div[@type eq "document"][ft:query(., $q)][@frus:doc-dateTime-min ge $start-date and @frus:doc-dateTime-max le $end-date]
let $format := 
    "markdown" 
    (: 
    "xml" 
    :)
let $admins := doc("/db/apps/frus/code-tables/administration-code-table.xml")
let $results :=
    if ($format eq "xml") then
        <hits>
            <summary>{count($hits)} hits for search for "{$q}" between {$start-date} and {$end-date}</summary>
            {
                for $hit in $hits
                let $vol-id := $hit/ancestor::tei:TEI/@xml:id
                group by $admin-id := collection("/db/apps/frus/bibliography")/volume[@id eq $vol-id]/administration[1]
                let $admin-label := $admins//item[value eq $admin-id]/label
                order by index-of($admins//value, $admin-id)
                return
                    <administration id="{$admin-id}">
                        <name>{$admin-label/string()} Administration ({count($hit)})</name>
                        {
                            for $h in $hit
                            group by $v-id := $h/ancestor::tei:TEI/@xml:id
                            let $bib := collection("/db/apps/frus/bibliography")/volume[@id eq $v-id]
                            let $title := string-join(($bib/title[@type eq "sub-series"], $bib/title[@type eq "volume-number"], $bib/title[@type eq "volume"]), ", ")
                            order by $v-id
                            return
                                <volume id="{$v-id}">{$title} ({count($h)})</volume>
                        }
                    </administration>
            }
        </hits>
    else
        ``[*Summary: `{count($hits)}` hits for search for "`{$q}`" between `{$start-date}` and `{$end-date}`*
`{
        for $hit in $hits
        let $vol-id := $hit/ancestor::tei:TEI/@xml:id
        group by $admin-id := collection("/db/apps/frus/bibliography")/volume[@id eq $vol-id]/administration[1]
        let $admin-label := $admins//item[value eq $admin-id]/label
        order by index-of($admins//value, $admin-id)
        return
            ``[- [ ] [`{$admin-label}` Administration](?admin=`{$admin-id}`) (`{count($hit)}`)
`{
                for $h in $hit
                group by $v-id := $h/ancestor::tei:TEI/@xml:id
                let $bib := collection("/db/apps/frus/bibliography")/volume[@id eq $v-id]
                let $title := string-join(($bib/title[@type eq "sub-series"], $bib/title[@type eq "volume-number"], $bib/title[@type eq "volume"]), ", ")
                order by $v-id
                return
                    ``[  - [ ] [`{$title}`](?volume-id=`{$v-id}`) (`{count($h)}`)
]``}`]``}`]``
return
    if ($format = "markdown") then string-join($results, "") else $results

Next up will be a similar entry relating to "tags".

@joewiz
Copy link
Member

joewiz commented Nov 2, 2017

Here is a similar example for use in a mockup of a faceted filter of search results on "volume-level subject tags":

15 hits from 11 volumes covering 123 subjects for search for "cambodia AND domino" between 1954-01-01T00:00:00Z and 1975-12-31T23:59:59Z. Filter results by volume-level subject tags.

Here's the query I developed to produce these results:

xquery version "3.1";

declare namespace tei="http://www.tei-c.org/ns/1.0";
declare namespace frus="http://history.state.gov/frus/ns/1.0";

let $q := "cambodia AND domino"
let $start-date := xs:dateTime("1954-01-01T00:00:00Z")
let $end-date := xs:dateTime("1975-12-31T23:59:59Z")
let $format := 
    "markdown"
    (:
    "xml"
    :)
let $hits := collection("/db/apps/frus/volumes")//tei:div[@type eq "document"][ft:query(., $q)][@frus:doc-dateTime-min ge $start-date and @frus:doc-dateTime-max le $end-date]
let $vol-tags-map :=
    for $hit in $hits
    group by $vol-id := $hit/ancestor::tei:TEI/@xml:id
    let $link := "https://history.state.gov/historicaldocuments/" || $vol-id
    let $tag-ids := collection("/db/apps/tags/tagged-resources/frus")//study[link eq $link]//tag/@id/string()
    return
        map {
            "vol-id": $vol-id,
            "hits": count($hit),
            "tag-ids": $tag-ids
        }
let $tags-hit-map := 
    for $tag-id in distinct-values($vol-tags-map?tag-ids)
    let $hit-count := sum($vol-tags-map[?tag-ids = $tag-id]?hits)
    let $tag-label := doc("/db/apps/tags/taxonomy/taxonomy.xml")//id[. eq $tag-id]/../label/string()
    return
        map {
            "tag-id": $tag-id,
            "tag-label": $tag-label,
            "hit-count": $hit-count
        }
return
    if ($format = "xml") then
        <results>
            <summary>{count($hits)} hits from {count($vol-tags-map)} volumes covering {count($tags-hit-map)} subjects for search for "{$q}" between {$start-date} and {$end-date}. Filter results by volume-level subject tags.</summary>
            {
                for $map in $tags-hit-map
                order by $map?tag-id
                return
                    <tag id="{$map?tag-id}">{$map?tag-label} ({$map?hit-count})</tag>
            }
        </results>
    else
        ``[*`{count($hits)}` hits from `{count($vol-tags-map)}` volumes covering `{count($tags-hit-map)}` subjects for search for "`{$q}`" between `{$start-date}` and `{$end-date}`. Filter results by volume-level subject tags.*
`{
                for $map in $tags-hit-map
                order by $map?tag-id
                return
                    ``[- [ ] [`{$map?tag-label}`](?tag-id=`{$map?tag-id}`) (`{$map?hit-count}`)
]``}`]``

@joewiz
Copy link
Member

joewiz commented Nov 2, 2017

We also discussed the idea of a timeline. Here's a similar query which produces the data in the format that we could feed into a timeline-oriented graphing tool such as dygraphs. First the results:

{
  "summary" : "15 hits for search for cambodia AND domino between 1954-01-01T00:00:00Z and 1975-12-31T23:59:59Z, grouped by year between 1954 and 1975",
  "datapoints" : {
    "1954" : 1,
    "1964" : 4,
    "1965" : 1,
    "1966" : 1,
    "1969" : 1,
    "1970" : 2,
    "1972" : 2,
    "1975" : 3
  }
}
xquery version "3.1";

declare namespace tei="http://www.tei-c.org/ns/1.0";
declare namespace frus="http://history.state.gov/frus/ns/1.0";

let $q := "cambodia AND domino"
let $start-date := xs:dateTime("1954-01-01T00:00:00Z")
let $end-date := xs:dateTime("1975-12-31T23:59:59Z")
let $hits := collection("/db/apps/frus/volumes")//tei:div[@type eq "document"][ft:query(., $q)][@frus:doc-dateTime-min ge $start-date and @frus:doc-dateTime-max le $end-date]
let $duration := $end-date - $start-date
let $resolution := if ($duration gt xs:dayTimeDuration("P365D")) then "year" else "TODO"
let $start := if ($resolution eq "year") then year-from-dateTime($start-date) else "TODO"
let $end := if ($resolution eq "year") then year-from-dateTime($end-date) else "TODO"
let $group-by := if ($resolution eq "year") then year-from-dateTime#1 else "TODO"
let $summary := count($hits) || " hits for search for " || $q || " between " || $start-date || " and " || $end-date || ", grouped by " || $resolution || " between " || $start || " and " || $end
let $results :=
    map {
        "summary": $summary,
        "datapoints":
            map:merge(
                for $hit in $hits
                group by $unit := $group-by($hit/@frus:doc-dateTime-min)
                order by $unit
                return
                    map:entry($unit, count($hit))
            )
    }
return
    $results

@joewiz
Copy link
Member

joewiz commented Nov 2, 2017

Some other bits of information from our discussion:

Analytics insights

  • Q: How often do visitors use the "Select volumes" filter for the search experience?

  • A: In the last year the search page has gotten 576,935 hits, compared to 6,837 for the select volumes page. Since the select-volumes page is the only source of requests that contain more than one "volume-id" parameter, we can assume that it is also responsible for 11,461 hits to the search page with more than one "volume-id" parameter. So just over 3% of searches make use of the select volumes page.

  • Q: Do visitors use the "Search within this volume" box from volume landing pages?

  • A: 65,000 hits to the search page contain a single "volume-id" parameter, which we can safely assume comes from the "Search within this volume" box on a volume's landing page - but also could come from the "Select volumes" page. Either way, 11% of searches are targeting a single volume.

  • Q: On the main search page, how often do users select the checkboxes to limit their searches to one or more collections?

  • A:

    • 170,770 hits, or ~30% of hits, make use of the "within" parameter for limiting searches to certain collection groups.
    • Of these, 66,000 (11% of total search) include multiple "within" parameters, so a fair number of users like to select more than one collection (but not all) to search within.
    • (If no checkboxes are selected, the search engine includes all sections by default.)

@plutonik-a
Copy link
Contributor Author

Thanks @WaxCylinderRevival for your comments and wordings and @joe for listing all filter options for the result page!

Here are my suggestions for the search page containing the new requirements.
I simplified the layout, to get a little bit more intuitive. I think, instead of icons, a short description under the inputs is already helpful, doesn't disturb the overall layout and saves users an extra click. The wording, here again, is of course just a suggestion.

About the date inputs:
I thinks it looks cleaner not to have single inputs for day/month/year like standards.usa.gov is suggesting in their style guide, as our interface will be more complex and every reasonable chance of chunking the elements is helpful for the UX.

I haven't considered the "Anniversary/omnis dies search" in the mockup, because I'm not sure, if this shouldn't be rather a filter option for the results page?

01-hsg-search-page-default
02-hsg-search-page-options-closed
03-hsg-search-page-options-open
04-hsg-search-page-options-open-calendar

@tuurma
Copy link
Contributor

tuurma commented Nov 3, 2017

Many thanks @plutonik-a for new mockups in such a short time!

I particularly like the tabs for Entire site/Selected resources as they make it very clear it's mutually exclusive alternative.

Date filtering section looks very neat now too. Only the date picker is a tricky thing since US readers have much different habits for entering dates than Europeans. Not sure if we should be terribly worried about it but something to consider, certainly.

The last section, grouping sort options and other preferences is something that only affects a small number of queries, thus perhaps could be hidden from sight at first and only open up (accordion style) after click? I was thinking of giving it a label of 'advanced search settings' or similar.

@plutonik-a
Copy link
Contributor Author

@magda Sorting results could also go into the results page, but frankly, I don't see a problem in having those "refine" and and "sort" options on the main search page already expanded, because there is enough space and tidiness in the default view now. Why should users perform an extra click when there is no actual need for it?

@plutonik-a
Copy link
Contributor Author

01-hsg-results-page

@plutonik-a
Copy link
Contributor Author

plutonik-a commented Nov 3, 2017

@joe @WaxCylinderRevival @tuurma
Here's the mockup for a result page.
Please note, that I've made some further refinements, which should also go into the main search page:

  1. The "save search" button should be placed on the top right of the search bar - it will trigger a "copy to clipboard" popup.
  2. The icons indicating a dropdown interaction, should look like in the results page - an open arrow.
  3. The sorting patterns should be set in a dropdown button, possibly also on the main search page.

I have left the "refine search" option on the results page, because I think it is important to let the user perform a further (another) search from this page right away.

@joewiz
Copy link
Member

joewiz commented Nov 3, 2017

@plutonik-a @tuurma Thank you again for the updated mockups. Talking with you and discussing these mockups was a valuable exercise that helped us work through the design and the implications of different choices.

We have arrived at a simplified design that we think will achieve our core goals, of (1) prominently exposing users to our new date search feature and (2) elegantly accommodating future expansion of search features. To start from the basics, we need two pages:

  1. Search landing page: /search or /search?q= (shown if no non-empty query parameters are present)
  2. Search results page: /search?q=cambodia or /search?within=documents&date-start=1965&date-end=1969 (shown if non-empty query parameters are present)

Here are the components of each page:

Search landing page

Overview: This page is laid out much like the current Search page on the site, except the "Select volumes" link (and the page it links to) is removed. This design also includes no tabs or accordions to expose section-specific options. We worried that the accordion design, while nice, buried the new dates feature and wouldn't be easily discovered. The primary change is the display of the date search fields by default.

  • A. "Keyword search" field set
      1. Text input field (with an inline submit button as shown in the Search Bar guidelines)
      1. Keyword options checkboxes (directly beneath the text input field): Exact phrase, Case-sensitive, Punctuation-sensitive
  • B. "Select sections" field set
      1. A single "Search entire site" checkbox (checked by default; selecting this toggles all/none in the following checkboxes)
      1. A nested set of checkboxes, for each section of the site (all checked by default)
  • C. "Date search" field set
      1. A brief explanation appears at the top of this field set: "Date search is active only if the Historical Documents section is selected." (If possible, this section should be grayed out and made inactive if the Historical Documents checkbox in the "Select sections" field set is unchecked.)
      1. This section contains two side-by-side pairs of date/time fields, styled according to the Date input guidelines; use the labels and am/pm radio buttons specified in Amanda's comments above. (No calendar picker will be displayed for the December launch.)
      1. (For December launch, no client-side validation of date fields is needed beyond the simple max/min parameters in the US Web Design Standards sample code is needed. If an invalid search parameter, or combination thereof, is supplied, we will catch it server-side and notify the user. Also, auto-populating of values from the start date into the end date is not required at launch.)
  • D. A second submit button appears beneath these options.

(Note that no "Save search" box will appear. We will consider adding this in a future revision.)

Search results page

Overview: This page is styled much like Alex's most recent results page. The "Keyword search" and "Date search" fieldsets are placed the top, search results appear in the body, and filters appear in a left sidebar. If a search mixes Historical Documents with other sections and results are sorted chronologically, the non-Historical Documents results will be be ordered after the dated results.

  • A. "Keyword search" field set (same as on Search landing page)
  • B. "Date search" field set (same as on Search landing page; if possible, gray this out when/if the Historical Documents Section is not selected)
  • C. "Search results"
      1. Result summary paragraph (as on current site)
      1. Pagination links (as on current site)
      1. Relevance/date radio buttons (as in Amanda's comments; relevance is default)
  • D. "Filters" sidebar (any filters with >3 items overflow with a scrollbar; each item is a checkbox that can be selected by clicking on the label; hit counts, as in my sample text above, are shown in small gray text to the right of each label)
      1. "Section" (same contents as "Select sections" fieldset landing page)
      1. "Administration" (as in Alex's mockup)
      1. "Volumes" (as in Alex's mockup; except using shortened titles as in my sample above)
      1. (Removed, for now, are: People, Places, Topics.)

In a future expansion of the search results page, we expect to add filters (e.g., People, Places, Topics, Periods, etc.). But as @tuurma proposes, we'll initiate another issue for that request, which will start with another round of mockups. For now, we propose the features above for the December launch.

I hope this is a clear description. Please let me know if you have any questions, and what you think.

@plutonik-a
Copy link
Contributor Author

plutonik-a commented Nov 6, 2017

@joewiz @WaxCylinderRevival @tuurma
This is my "Search Page" mockup for the latest requirements Joe listed in above post (#284 (comment))

Please take a review and let me know, if this mockup suits your ideas.

05-hsg-search-page-default-v2

A mockup for this iteration's result page will follow.

@plutonik-a
Copy link
Contributor Author

@joe @WaxCylinderRevival
I have got some questions about the results page:

  1. Result summary paragraph (as on current site)
    The information about the sorting will be redundant, if I keep the current wording and place the sorting indicator / label next to it. See screenshot:
    bildschirmfoto 2017-11-06 um 16 44 41

  2. "Relevance/date radio buttons"
    Do you want me to remove the dropdown button (see also in above screenshot) in favor of two radio options?

  3. Pagination links
    Currently there are 2 pagination components displayed. Do you want me to keep both, one on top of the list, one at the bottom?

  4. "Filters" sidebar

    any filters with >3 items overflow with a scrollbar

    I wouldn't recommend a scrollbar. I used a very common design pattern for a filter sidebar with expanding options in an accordion like in the link Amanda shared with us (https://www.loc.gov/search/?in=&q=russia&new=true&st=).
    Imagine the filters, which have a really great amount of items like "people", "places" etc., and browsing them in a tiny space of 3 lines! Better to expand the whole range of options by one click and get an overview.

@joewiz joewiz modified the milestones: 2.1 FRUS Advanced search, star Nov 6, 2017
@joewiz
Copy link
Member

joewiz commented Nov 6, 2017

@plutonik-a Thanks for this very nice updated mockup of the search landing page and questions. First, regarding the mockup:

  1. The "Reset date" button is a great idea!
  2. Could you explain what the "Apply date" button does? I think this is new to the mockup.
  3. Recalling Amanda's 3B, please create two groupings, labeled "From" (which includes start date and start time) and "To" (which includes end date and end time).
  4. Recalling Amanda's 3C, please change "From start date" and "To end date" to "Start Date" and "End Date".
  5. Recalling Amanda's 3D, please add "(optional)" after "Start Time" (and "End Date")
  6. Please remove any default value for the "am" and "pm" radio buttons. (The guidelines for Radio Buttons discourage default values for radio buttons.)
  7. Please remove the hyphen between the Start Date and End Date fields.
  8. The hint text for the time fields is nice (hh:mm). Please supply a matching set of hint text inside the date fields (MM DD YYYY).
  9. The example text for the date field is nice (For example: 11 01 1984). Please change this example to 01 20 1969, using a day that is >12 for clarity.
  10. Please duplicate the "From" fields' "For example" entries onto the "To" fields.
  11. Please rename "Select Sections" to "Filter by Section".
  12. Please change "Entire page" to "Entire Office of the Historian Website".

Second, regarding your questions:

  1. Good point. Please remove the phrase "sorted by relevance" from the summary.
  2. No, upon further consideration, I retract the request for radio buttons for relevance/date sorting. Please keep the dropdown for selecting relevance/date sorting.
  3. Yes, please keep both sets of pagination links - at the top and bottom.
  4. Okay, let's go with your suggestion to use a "More..." link to show all options, instead of a scrollbar.

@plutonik-a
Copy link
Contributor Author

plutonik-a commented Nov 7, 2017

Thanks @joewiz for answering my questions.
I finished a third approach of the search page prototype and applied all changes and requests from your comments.
I deleted the "apply date" button, because it is redundant there (the date will be applied automatically when submitting a query).

The updated result page mockup will follow shortly.
//cc @WaxCylinderRevival @magda

06-hsg-search-page-v3

@WaxCylinderRevival
Copy link
Member

@plutonik-a, thank you for your speedy adjustments! The revised mock-up looks attractive and highly functional.

@plutonik-a
Copy link
Contributor Author

@joewiz @WaxCylinderRevival
//cc @magda

Here are the mockups for the results page:

  1. With collapsed date filters
  2. With expanded filters and displayed filter tags

07-hsg-results-page-v2

08-hsg-results-page-applied-filter-tags-v2

@plutonik-a
Copy link
Contributor Author

@joewiz About the volumes: I've found 4 types of volume titles, which contents can be nested in sublists. But I am not sure, if the narrow sidebar is the right element to display the very long volume titles. If we cut them off, some might seem to be identical...what do you think?

  • Papers Relating to Foreign Affairs
  • Papers Relating to the Foreign Relations of the United States
  • Foreign Relations of the United States Diplomatic Papers
  • Foreign Relations of the United States

@tuurma tuurma added this to the 2.1 FRUS Advanced search milestone Nov 8, 2017
@plutonik-a plutonik-a self-assigned this Nov 10, 2017
@plutonik-a plutonik-a changed the title Create FRUS "advanced search" page User Story FRUS "search" page Nov 10, 2017
@plutonik-a plutonik-a changed the title User Story FRUS "search" page User Story FRUS "Search page" and "Result Page" Nov 10, 2017
@plutonik-a plutonik-a changed the title User Story FRUS "Search page" and "Result Page" User Story "Search page" and "Result Page" Nov 10, 2017
plutonik-a added a commit that referenced this issue Nov 13, 2017
plutonik-a added a commit that referenced this issue Nov 13, 2017
Add accessibility features to search bars.
@joewiz
Copy link
Member

joewiz commented Nov 13, 2017

@plutonik-a Thank you for the most recent mockups, questions, and split-out issues. First, to answer your questions:

  1. For volume titles, the "series" component you referred to should not be shown in the sidebar. Instead, we should just display the "sub-series", "volume-number", and "volume" titles. A sample query to retrieve these titles is:
xquery version "3.1";

declare namespace tei="http://www.tei-c.org/ns/1.0";

declare function local:trim-words($string as xs:string, $number as xs:integer) {
    let $words := tokenize($string, "\s")
    return
        if (count($words) gt $number) then
            (
                subsequence($words, 1, ceiling($number div 2)) => string-join(" ")
                , "…"
                , $words[position() ge last() - floor($number div 2) + 1] => string-join(" ")
            )
            => string-join()
        else
            $string
};

element volumes {
    let $vols-in-db := collection("/db/apps/frus/volumes")/tei:TEI[.//tei:body/tei:div]/@xml:id
    let $vols := collection("/db/apps/frus/bibliography")/volume[@id = $vols-in-db]
    for $vol in $vols
    let $vol-id := $vol/@id
    let $title := 
        ($vol/title[@type eq "sub-series"], $vol/title[@type eq "volume-number"], $vol/title[@type eq "volume"])[. ne ""]
        => string-join(", ")
        => normalize-space()
        => local:trim-words(10)
    order by $vol-id
    return
        element volume { attribute id { $vol-id }, $title }
}

The first few results of this query are:

<volumes>
    <volume id="frus1865p4">1865, Part IV, Accompanying the…and Sympathy Inspired by These Events</volume>
    <volume id="frus1912">1912, With the Annual Message…Transmitted to Congress December 3, 1912</volume>
    <volume id="frus1913">1913, With the Address of…President to Congress December 2, 1913</volume>
    <!-- snip -->
</volumes>

Besides my notes that I've added to individual issues I just have a few comments:

Search landing page

  1. Please place the "For example" examples beneath all date and time fields (namely, Start Date, End Date, Start Time, and End Time). (I've pasted this into Create component "Filter by Date" #288 (comment).)

Search results page

  1. I really like how you show what filters have been applied and provide an "x" on each to let users remove the filters. Please prepend these with the text, "Refined by:", as shown in this screenshot from https://www.loc.gov/photos/?q=russia&fa=online-format%3Apdf:

screen shot 2017-11-13 at 11 10 29 am

(I've pasted this into #291 (comment).)

  1. In the "Filter by", please add a "+/-" toggle to expand/collapse for each grouping (e.g., Sections, Date, Administration, Volumes, etc.), right-aligned. This should replace the "v" icon shown next to the Date filter toggle:

screen shot 2017-11-13 at 10 30 15 am

For reference, please see the left sidebar in https://www.loc.gov/search/?q=russia:

screen shot 2017-11-13 at 10 30 35 am

  1. Please include a right-aligned count of items, referencing the loc.gov screenshot. Sample text and code for deriving the item count can be found above in User Story "Search page" and "Result Page" #284 (comment). Since we may not implement item counts in time for the December release, please include a class and placeholder element for this that we can populate.

  2. Please remove all "v" icons beside checkbox items.

  3. Please replace the "v" icon beside "show more" links with a double angle arrow, as shown on the loc.gov site:

screen shot 2017-11-13 at 10 44 18 am

  1. Please make the text-color of checkbox items the default text-color, not the blue color of links.

  2. Please replace the "show more" link with contextual labels: "More Sections", "More Administrations", "More Volumes". We will define these for each filter grouping.

  3. For the styling of the results, please use bold weight on the title and non-bold weight on the KWIC snippets. (The mockup shows the KWIC snippets in bold.)

plutonik-a added a commit that referenced this issue Nov 24, 2017
…AtState/hsg-shell into feat-advanced-search-284

* 'feat-advanced-search-284' of https://github.com/HistoryAtState/hsg-shell:
  refactor(search) further parametrize checkbox templates
  fix(search) add correct template call to search landing page
  refactor: modularize filter checklists; affects #284, #292
@plutonik-a plutonik-a removed their assignment Dec 4, 2017
joewiz added a commit that referenced this issue Dec 11, 2017
@plutonik-a plutonik-a added Search Lucene or the search module UI labels Nov 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Search Lucene or the search module UI
Projects
None yet
Development

No branches or pull requests

4 participants