internetarchive / fatcat-scholar

search interface for scholarly works
https://scholar.archive.org
Other
78 stars 14 forks source link

tweak abstract truncation #92

Closed NeoTheThird closed 2 years ago

NeoTheThird commented 2 years ago

Truncate abstracts longer than 550 chars at the 500 char mark. Previously, abstracts longer than 500 chars were truncated and the last 20 chars were repeated in the spoiler, which imho did not help readability very much:

image

This should now ensure than there is always enough text in the spoiler and no overly short stubs are truncated.

bnewbold commented 2 years ago

Thank you! The split display/behavior here will probably get iterated on further, but this is an improvement.

bnewbold commented 2 years ago

Please feel free to open a PR to add yourself to the CONTRIBUTORS file if you like.

NeoTheThird commented 2 years ago

Thank you! The split display/behavior here will probably get iterated on further, but this is an improvement.

Ywc. Yeah, a cleaner solution would be to split it at a nearby full-stop or, failing that, a space. Just a small edit for now :)

Please feel free to open a PR to add yourself to the CONTRIBUTORS file if you like.

Thanks, maybe if i do more in the future. It's an interesting project!