hypothesis / hypothesis/client
Provide a way to prevent auto-collapsing of tall annotations
- Dominant language
- Mustache
- Stars
- 730
- Forks
- 224
- PR merge metrics
- No merged PRs in 30d
Description
(_Context added by @robertknight after in-person discussion with Steel_)
Instructors use annotations to add media and interactive H5P exercises to pages in books published online using PressBooks. See [this book page for example](https://wisc.pb.unizin.org/frenchcscr/chapter/baudelaire-au-lecteur-p-1/). These media and exercises result in tall annotations which often get auto-collapsed by the client, showing a subtle "More" link at the bottom which has to be clicked to see the full content of the annotation. This auto-collapsing behaviour often hides important content in the annotations and students do not realize when they look at the annotations that there is additional content to look at or interactive exercises to complete.
It would be useful to have a way to prevent this auto-collapsing behavior in this context.
----
_Original description:_
We're using the WP hypothesis plugin to add hypothesis as an annotation tool within an instance of Pressbooks. Each book (child site on our WP multi-site install) can choose to activate hypothesis for their book, and choose which page(s) it appears on by default. One of the things I'm working on is building a functionality plugin which would give the user a few more options for their book. One option I'd like to provide is the option to have their first-level annotations appear expanded by default (rather than truncated). My understanding is that this functionality is controlled by this variable:
https://github.com/hypothesis/client/blob/d2eaac97b7b36abc6fc54b52b895cac2d7dee19f/src/sidebar/components/annotation.js#L89
Would you be open to producing some kind of custom action hook that would allow us to change the default value of this variable on a book by book basis via an external functionality plugin in WP? What I have in mind would be something like a checkbox on our settings page that says "Show annotations as fully expanded by default:". If the book author selects that setting, then we'd be able to change this variable to false. If they leave it unselected, collapseBody would remain at its default true value.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.