project-lux/lux-frontend

Set advanced search query to default as open under certain criteria

Closed this issue ยท 15 comments

Problem Description:
When a user selects "show all X results" from an entity pages accordion or from the entity tab it will display the advanced search of results with the AS details collapsed. This can cause confusion for users as normally these are defaulted to open. (ex: selection of timelines, or when a user creates the search such as those in the AS help section)

Expected Behavior/Solution:
This needs to be researched more as POW design can affect how to approach this ticket.
A possible solution is to dynamically have the query default as open IF the query is short.
For those which are longer they will be default as closed.

Since these searches usually contain more than 5 multiple field/single field selections, it is expected for these AS to default as open for the first 6 rows with a "show more" option.

A row is classified as any row with the trash icon next to it.

Requirements:

  • For all Advanced Search queries with MORE than 6 rows the first 6 rows will be defaulted as opened and the rest will remain closed.
  • A "show all" button will appear below any query that has more than 6 rows.
  • If a query has 6 rows OR less then it will not display the "show all button"
  • A show all button will be displayed at the left hand side when needed.
  • A row counts as anything with a trash can icon next to it.

Needed for promotion:
If an item on the list is not needed, it should be crossed off but not removed.

  • Wireframe/Mockup - Mike
  • Committee discussions - Sarah
  • Feasibility/Team discussion - Sarah
  • Backend requirements - TBD
  • Frontend requirements- TBD
  • Questions
  • What should the cutoff number be? It was discussed to be either 5 or 6.| A: No
  • Should it instead be the first multiple field? | A: No
  • Where is the best place to display the "show more" option? Under the "Add row" or would it come before the "add row"? | A: No
  • Do we want to go with the new proposed solution above? (default open dynamically)

UAT/LUX Examples:

  • Selection of any 'search all X results' in accordion or in entity tab for record Andy Warhol
  • Andy Warhol -> Objects created, encountered or influenced by -> Show All 217 results Long AS (will differ in tst/prd)
  • Andy Warhol -> Timeline of related objects and works -> 1900 c.e -> show all results short AS (will remain the same)

Dependencies/Blocks:

  • Blocked By: Issues that are blocking the completion of the current issue.
  • Blocking: Issues being blocked by the completion of the current issue.

Related Github Issues:

Related links:

Wireframe/Mockup:
Updated with more than 6 rows of queries.

image

added this ticket to tomorrows discussion/agenda. I added some rough mockups as I wasn't sure where we would want to display the "show more" if we go that route.

Notes from 4/26 team meeting:

  • Rescope ticket to NOT do show more
  • Default open for short ones, and close on long ones
  • Think about if this is impacted by new POW designs

Questions:
Is the frontend to determine what is considered a "long" query? If so, would it be by the query URL string length?

@kamerynB - I believe it was longer than 5 lines of Adv. Search query shown to user. Is that possible to determine before rendering?

@prowns I can do that but what does that mean exactly? 5 lines? There is a lot of JSON to be parsed and should it consider nested JSON? What are we calling a "line"? I can provide an example for the discussion.

Can this be discussed at forming? We already have collapse buttons but then we would be adding a "Show More" or "Show Less" button? This seems redundant.

@kamerynB - how about if there are three or fewer HAL links, render as open by default? Otherwise, show collapsed. Good to discuss at ticket forming

image

@kamerynB - should we discuss https://www.bugherd.com/projects/284041/tasks/2287 with this ticket as well?

@prowns That bugherd is a separate issue. I don't think there is anything to discuss with that other than we need to add another button saying something that describes the action of wrapping the current search in another group, if that makes sense.

@kamerynB @prowns - was this discussed at last weeks ticket forming? it wasn't on the previous one (week of may 21). Have we decided on what the decision will be for the length of a query to be minimized/expanded?

@roamye This was discussed at some point but I don't think we came to a consensus.

From 6/14 team meeting today:
A decision has been made to ...

  • show the first 6 rows of any AS query that has more than 6 rows.
  • add a "show all" button for those with more than 6 rows.
  • If a query has six rows or less then it will NOT show the show all button.
  • the show all button will be on the left hand side below the sixth row.
  • A row counts as anything with a trash can icon next to it.

Mockup has been updated & moved this to priotization review. Let me know if any changes 2 the mockup are needed.

@kamerynB @prowns

from uat 11/6 this has been moved to the next milestone to give @kamerynB to make adjustments to the layout.

Approved by UAT

Looks good in PROD. closing.