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

Limit display of person names in browse view #75

Open
nichgray opened this issue Mar 12, 2021 · 5 comments
Open

Limit display of person names in browse view #75

nichgray opened this issue Mar 12, 2021 · 5 comments

Comments

@nichgray
Copy link
Contributor

For items with more than 100 names, we want to limit the number that display in the browse view:

Screen Shot 2021-03-12 at 11 01 43 AM

Ideally that view would display the first 100 names, then an ellipsis to indicate that there are more.

@nichgray nichgray self-assigned this Mar 12, 2021
@nichgray
Copy link
Contributor Author

nichgray commented Mar 12, 2021

Note that I tried Browse -> Edit View -> Content -> Manage Display -> Adding a number after the Format ("Separated") in "People", which should have limited the number that displays, but evidently this only works for some formats (if you adjust this when the format is "List", for instance, it works fine). "Separated" format is necessary to display the terms linked and separated by commas, however.

Screen Shot 2021-03-12 at 11 07 13 AM

@nichgray nichgray added content relating to the content of the page (page text, etc) Priority High and removed Priority High labels Mar 12, 2021
@nichgray nichgray added this to the 2022 Sprint milestone Sep 13, 2021
@nichgray nichgray added tech_mukurtu and removed content relating to the content of the page (page text, etc) labels Dec 8, 2021
@nichgray
Copy link
Contributor Author

nichgray commented Apr 5, 2022

It sounds like the limit handing changes with more recent versions of Drupal, so it may be worth waiting to work on this until Mukurtu 4 is released. Alternatively, "People" could be removed from teaser view for now.

@karindalziel
Copy link
Member

We might be able to use CSS, though it might not be a great long term solution https://www.benmarshall.me/max-character-length-ellipsis-css/

@techgique
Copy link
Member

That CSS approach looks viable and would certainly be easier than messing with code which could be completely changed with Mukurtu 4

@nichgray
Copy link
Contributor Author

nichgray commented Apr 28, 2022

Adding the following to the bottom of the genoa.css file seems like the best option:

.view-mode-search_result .field.field-name-field-people {
display: -webkit-box;
overflow: hidden;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
}

This limits the display of names in the search results but not the individual item page. We may also want to do this for the teasers?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants