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

RelatedItems: do not show not selectable items #724

Open
jensens opened this issue Nov 29, 2016 · 2 comments
Open

RelatedItems: do not show not selectable items #724

jensens opened this issue Nov 29, 2016 · 2 comments

Comments

@jensens
Copy link
Member

jensens commented Nov 29, 2016

If one passes the RelatedItems pattern a list of 'selectableTypes', it does not make sense to show non-folderish types not in this list.

@davisagli
Copy link
Member

It looks like this was implemented sometime: there is currently code to filter out non-selectable items.

However, it has a bug. When browsing rather than searching, the pattern asks the server for all types, and then filters them on the client side. This is so that it can include folderish types in the results. But, if there are multiple pages of results and all of the results in the first page are not selectable, then the pattern shows a "no results" message even if there are valid results on later pages.

I suspect that the right solution is to configure the pattern with a list of folderish types, and make it ask the server for the union of folderish and selectable types when browsing, so that this filtering happens on the server side rather than the client side.

@thet
Copy link
Member

thet commented Apr 12, 2018

The reasoning was for the behavior was as @davisagli described. I wasn't aware of the bug.
Doing the filtering server side (using the is_folderish index) sounds good.

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

No branches or pull requests

3 participants