Skip to content

Listings with path-based resolution

This MR is my take on !63 (and the code is based on that MR)

It replaces the one-dimensional listing array with an arbitrarily complex, lazily resolved tree of listings.
It also moves search functionality into listings, meaning that the search logic can take into account what the current listing is and that listings that do not want search can disable it selectively.
For example, this allows an updated XenForo library to make searching more reasonable.

The other key difference is the fact that extensions can freely choose whether they want to opt in to this more advanced listing API, whether they want to partially migrate some listings, or whether they want to keep their code unchanged.

Finally, it enables proper integration into navigation by forcing extensions that make use of the advanced API to provide a method that resolves to arbitrary listings using a path obtained from the parent List listing.

I suggested above, I have already experimented a bit with this API for XenForo (specifically the part about moving search), but I need feedback about the tree API from a dev of an extension that actually needs the power it provides (like @jobobby04).

With this MR, saving searches should also be possible without serialization (since listings can be represented as a string and filters are restricted to primitives), but I have not yet attempted to implement this.

The relevant changes to the app are in this branch.

Merge request reports

Loading