Folder UI: GSoC project update (6/26)
For the past weeks, I have been working on a GSoC project for folder listings and faceted folder navigation in Plone. Here are some updates of how things are going.
Big picture stuff
- I am focusing on faceted navigation of folder listings, since the "dashboard" concept that was part of my original plan seems less useful for a general audience after careful consideration (and good feedback).
- Faceted search/browsing of folder listings is a big part of making folders with many items reasonable, pleasing to use. This is the primary goal and majority of work for active development of my project.
- My work (disclaimer: bits and pieces of disjointed work, this is still early) can be found in plone.app.folderui in Plone svn.
- Over the past few weeks, I have been working on back-end work for how facets and queries are structured and executed.
- Over the next few weeks, I expect to be focused on building a user-interface for faceted search including a new listings view and viewlets for facets and for a query summary to be displayed at the top of the listings. The goal here is to have something simple be end-to-end functional by early July.
What has been done
- Interfaces and components for representing individual search filters and composite queries in an implementation-neutral way.
- An HTML/JavaScript functional mockup (svn co this to test. YMMV, requires jQuery, tested in Firefox 3) of multi-selection within a single facet was created.
- Interfaces for persistent/configuration components that are used to render facets and control behavior (query/filter generation).
- Code for dealing with date ranges; relative date ranges like "past" and "this month" can be created as factories for applied date ranges relative to datetime.now() (or any other datetime). Date ranges are transformed into query filter components with an adapter (includes doctest).
- A multi-adapter that wraps an iterable mapping interface around LazyMap catalog results and the catalog providing them; keys are RIDs, (lazy or iterated) values are brains -- this allows access to catalog record ids for every query to eventually use in efficient calculation and caching of set intersections as part of the faceted search system. None of the benefits of lazy sequences are lost. (includes unit test).
- A query runner takes the implementation-neutral query specifications mentioned above, and transforms them into AdvancedQuery composite query objects for purposes of evaluation against portal_catalog. This query runner component returns an iterable result mapping that can either be used via iteration (itervalues()) or lazy evaluation (values()), and returns catalog record ids for a query via keys(). This component has not been integration tested, so it needs more work over the next few days.
Next on the radar for the coming 7-10 days:
- Integration tests of the query runner for some simple queries mimicking faceted search selections against sample content and catalog results.
- A configuration backend (CMF tool called portal_facets) to persist facet configuration (what facets show up where and for whom) and provide a registry of available facets queried for a context of user-role and path. A configuration UI for this would be an eventual goal.
- An enhanced listing view and viewlets / UI for each facet.
- A component to construct a query component from URL querystring (other eventual state representations for the whole of the viewed query may in the future include JSON for JavaScript enhancements). A viewlet will be created to display the information on the current query above the listings/results.
As the UI starts to come together, even in crude form, I will try to blog more with screenshots and possibly a screencast. Once folks can start seeing the results of this work, I would love to get UI feedback.