Add word count search, filter, and sorting to interface for bookmarks
Description
Activity
irrationalpie March 4, 2023 at 4:23 AM
6304 is marked with status “to do” and I don’t see any comments on it. Is any work or design work for it started or planned to start any time soon? I don’t mind refactoring my code to match if there's a different approach for adding fields that seems best, but I would be sad if this had to just perpetually sit here waiting--I personally would love to be able to sort my bookmarks by word count! I’m not really sure what the different options for adding a field are that you mention, so I’m not sure how I could help unblock 6304, but if there’s something you can think of that would help I’m happy to do so!
ticking instant March 3, 2023 at 1:55 PM
I’m not sure it should stand alone. This issue adds one field for restricted vs. unrestricted; 6304 adds one field for each tag type. Adding one field can be done in any number of ways. But adding 7+ fields requires a more systematic approach, which may affect the design in ways that may not be compatible with the current approach to this issue.
That design conflict can be resolved by doing this issue first, and then later refactoring the code from this issue in 6304, but that may require repeating most of the QA steps from this issue to make sure that the refactor didn’t break things.
irrationalpie March 3, 2023 at 6:56 AM
This issues says it’s blocked by , but while they’re thematically linked I think this one can stand alone
irrationalpie February 9, 2023 at 3:40 AM
Thanks!
redsummernight February 9, 2023 at 3:32 AM
It happens automatically if the issue is “In Progress“ before you open the pull request, otherwise you’ll need to change it manually.
Note: This information is already indexed for works and series.
The filters for bookmarks should allow searching, sorting, and filtering by word count:
The Sort by select menu in the filters (found on pages like https://test.archiveofourown.org/tags/TAG_NAME/bookmarks) should have a Word Count option under the two date options.
The More Options section of the filters should have a Word Count section above the two search fields. It should be the same as the Word Count section on work filters.
The Sort by select menu on the Bookmark Search page (https://test.archiveofourown.org/bookmarks/search) should also have a Word Count option added under the two date options.
Above the Work language field on the Bookmark Search page, a Word count field should be added.
We will not be adding support for the
words: 100
,words:<1000
, etc syntax in "Search within results" due to .Because some but not all works in a series can be restricted, we need to index two separate word counts, one for logged in users (including restricted works) and one for guests (excluding restricted works), similar to how we would tackle .
Testing
Note: External works do not have word counts; only works and series.
On the Bookmark Search page, ensure you can search and get expected results using the new Word count field, including when you use >, <, or ranges.
On the Bookmark Search page, ensure you can use the Sort by Word Count option to get the expected results.
On a page with bookmark filters (e.g., https://test.archiveofourown.org/users/USERNAME/bookmarks), ensure you can use the Word Count option to get the expected results.
And again on a page with bookmark filters, ensure you can use the new Sort by option to get results sorted in the expected order.