Page MenuHomePhabricator

Allow users to filter for searchable status
Closed, ResolvedPublic

Description

In T270115 we're adding data on which resources are searchable in EDS. We should allow users to filter My Library on this data, so that they can better understand which collections they might need to navigate to individually.

In the filter sidebar we should add a dropdown menu with three options:

  • All
  • Searchable
  • Not searchable

The default should be 'All' and selecting 'Searchable should filter for resources with the searchable property. 'Not searchable' should include both not searchable and partially searchable resources in results.

The design can look something like:

image.png (771×455 px, 25 KB)

Event Timeline

@Ajay47 This depends on T270115 being worked on first, which we plan to do ourselves. Maybe you could work on T289255?

I moved the explanatory string to the Key in the design for T270115 so we don't need that to be next to the filter anymore.

@Himanshunitw This is something that our team is going to work on. Perhaps you want to take T291487 instead?

We discussed this at engineering meeting and decided that three checkboxes would be a better way of enabling this filter:

  • Fully searchable
  • Partially searchable
  • Not searchable

They should all be selected by default.

If there's no other obvious solution I'd say it's better than not having the boxes checked by default :)

Django filters has lots of ways you can override things, but doing so increases the likelihood of creating bugs. Doing it this way has the advantage of using django filters exactly the way it was meant to be used. I guess my question is this: is there a problem with this solution? Is it big enough to compel us to spend time finding another solution?

I spent some time fiddling with it and got it working (at least it looks like it's working at first blush), will update review

I just kicked off a new build for staging with this change. Will update when it's live.

This looks to be working really well, I wasn't able to break anything :)

This isn't in production yet but marking the task as resolved because it's been rolled into the T240128 PR.