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

Hide annotations that are outside of assignment page range #5937

Closed
robertknight opened this issue Nov 6, 2023 · 3 comments
Closed

Hide annotations that are outside of assignment page range #5937

robertknight opened this issue Nov 6, 2023 · 3 comments

Comments

@robertknight
Copy link
Member

When the user is in an LMS assignment with a configured page range, annotations from outside of that range should be hidden by default.

In the case where the same book is being reused for multiple assignments, this will avoid showing annotations from one assignment while viewing another.

This issue may become obsolete pending developments in a more general discussion about filtering annotations by assignment + document rather than just by document in the LMS context.

@robertknight
Copy link
Member Author

A complication with this is that annotations created on EPUB-based books do not currently record page number selectors, so if the assignment range is expressed as a page range, rather than a CFI range, we cannot filter annotations against it them.

Some things we can do:

  1. Start record page number selectors for all annotations, whether the book is PDF or EPUB-based. An issue with this is that we won't have these selectors for existing annotations.
  2. Map the CFI for each annotation to a corresponding page number. We might be able to do this with the data that VS exposes to our code. A downside is that we won't have access to this information outside the context of the assignment (eg. in a future iteration of the notebook).

robertknight added a commit that referenced this issue Dec 4, 2023
Support `page:{number}` or `page:{start}-{end}` filters in the sidebar.  When
the query is a number, it must match the page label exactly. When it is a range,
it matches the page number if:

 - The start and end of the range, and page number, are all numeric
 - The page number is between the parsed `start` and `end` points,
   inclusive

Part of #5937.
robertknight added a commit that referenced this issue Dec 4, 2023
Support `page:{number}` or `page:{start}-{end}` filters in the sidebar.  When
the query is a number, it must match the page label exactly. When it is a range,
it matches the page number if:

 - The start and end of the range, and page number, are all numeric
 - The page number is between the parsed `start` and `end` points,
   inclusive

Part of #5937.
robertknight added a commit that referenced this issue Dec 4, 2023
Support `page:{number}` or `page:{start}-{end}` filters in the sidebar.  When
the query is a number, it must match the page label exactly. When it is a range,
it matches the page number if:

 - The start and end of the range, and page number, are all numeric
 - The page number is between the parsed `start` and `end` points,
   inclusive

Part of #5937.
robertknight added a commit that referenced this issue Dec 5, 2023
Support `page:{number}` or `page:{start}-{end}` filters in the sidebar.  When
the query is a number, it must match the page label exactly. When it is a range,
it matches the page number if:

 - The start and end of the range, and page number, are all numeric
 - The page number is between the parsed `start` and `end` points,
   inclusive

Part of #5937.
robertknight added a commit that referenced this issue Dec 5, 2023
Support `page:{number}` or `page:{start}-{end}` filters in the sidebar.  When
the query is a number, it must match the page label exactly. When it is a range,
it matches the page number if:

 - The start and end of the range, and page number, are all numeric
 - The page number is between the parsed `start` and `end` points,
   inclusive

Part of #5937.
robertknight added a commit that referenced this issue Dec 5, 2023
Support `page:{number}` or `page:{start}-{end}` filters in the sidebar.  When
the query is a number, it must match the page label exactly. When it is a range,
it matches the page number if:

 - The start and end of the range, and page number, are all numeric
 - The page number is between the parsed `start` and `end` points,
   inclusive

Part of #5937.
@robertknight robertknight moved this from Todo to In Progress in Page ranges for VitalSource assignments Dec 6, 2023
@robertknight
Copy link
Member Author

This will be basically working once hypothesis/lms#5930 lands, with UI improvements to follow (see #6006).

robertknight added a commit that referenced this issue Jan 4, 2024
This is to support testing #6006,
#5937 and
#5936.
robertknight added a commit that referenced this issue Jan 4, 2024
This is to support testing #6006,
#5937 and
#5936.
@robertknight
Copy link
Member Author

I'm marking this as done. Making toggling the visibility of annotations outside the page range more usable is necessary though and is covered by #6006.

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

No branches or pull requests

1 participant