Skip to content
This repository has been archived by the owner on Jun 13, 2023. It is now read-only.

Truncate fields on search results display? #9

Closed
ianmilligan1 opened this issue Aug 17, 2017 · 8 comments
Closed

Truncate fields on search results display? #9

ianmilligan1 opened this issue Aug 17, 2017 · 8 comments

Comments

@ianmilligan1
Copy link
Member

Right now each record displays title, host, crawl date, content type, domain, this page links to, institution, collection name, and collection number. All but 'this page links to' or perhaps 'title' have natural limits.

In this case, a page is linking to dozens of other domains:
screen shot 2017-08-17 at 3 03 02 pm
Should we have a limit – i.e. list the top 10, to keep from cluttering up the results page too much?

@ruebot
Copy link
Member

ruebot commented Sep 6, 2017

This should help with the UI a bit with this ticket.

How about if we did something like list the first 5, and then add an ellipsis that expands the field if it is clicked? So it looks something like:

This page links to: link 1; link 2; link 3; link 4; link 5; ...

@ianmilligan1
Copy link
Member Author

That'd be perfect, I think.

@ruebot
Copy link
Member

ruebot commented Oct 11, 2017

@ianmilligan1 since this is just on the results view, do we need to worry about expanding the ellipsis? If not, I have a PR almost ready to go.

@ruebot
Copy link
Member

ruebot commented Oct 11, 2017

...looks like this:
screenshot from 2017-10-11 13-40-18

@ianmilligan1
Copy link
Member Author

Yep that’s perfect. And is ‘this page links to’ presented in descending order of frequency?

@ruebot
Copy link
Member

ruebot commented Oct 11, 2017

And is ‘this page links to’ presented in descending order of frequency?

No. It's just the first 5 in the array on the search results view. The item's view lists everything.

@ianmilligan1
Copy link
Member Author

Ok good to know (be good for documentation down the road).

This all looks great to me, I’d say we are ready for a PR and to close this one!

@ruebot
Copy link
Member

ruebot commented Oct 11, 2017

Cool. Just finishing the test, and we should be good to go.

ruebot added a commit that referenced this issue Oct 11, 2017
* Truncate fields that are arrays over 5 items;
* Add test for helper method;
* Use helper method on links_domains for search results.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants