As reported at #367063: Project issue regressions things are a little inconsistent and weird with the "Project" filters on the site-wide issue queue views:
project_issue_all_projects : http://d6.drupal.org/project/issues
project_issue_user_issues : http://d6.drupal.org/project/issues/user
project_issue_user_projects : http://d6.drupal.org/project/user
project_issue_search_all : http://d6.drupal.org/project/issues/search
On the first 3, it's an autocomplete field that requires an exact match on the project title. That's probably exactly what we want for those 3.
However, on the last one (site-wide advanced search), it's an autocomplete, but then does a partial match for any projects that contain what you type anywhere inside the title. So, if you type "drupal", you'll get hits for "drupal.org webmaster", etc.
After a discussion with webchick in IRC, we decided this is confusing and weird. The best solution we came up with is that on the advanced search, we should make it exact match, but to support a comma-separated list of project titles, and to do autocomplete based on anything after the last comma. This would mirror the username behavior for the "submitted by" and "assigned to" filters. I think the only way to actually make this work properly is to make our own custom filter for this, instead of relying on the core Node Title filter we're using via a relationship to the project node an issue is attached to.
Comments
Comment #1
dwwBTW, I'm working on custom autocomplete sources for each view, so that things only autocomplete based on what you're looking at (e.g. "my projects", "my issues", etc). The problem is there's no particularly clean way in views for the exposed filter to know about the processed argument (uid), which we need for project/issues/user/% or project/user/%, since views processes the filters first, and the arguments 2nd. I'm working on it, but it's not ready yet.
Somewhat related issue: #368754: Add an argument validator that takes usernames and converts to UIDs
Comment #2
starbow commentedOk, this looks like the right place to vote for a select box on the http://d6.drupal.org/project/user page. It would make it much clearing what the filters on this page do.
Comment #3
webchickWe discussed this at length in #drupal tonight. A summary:
In general, it makes a lot more sense to be consistent whenever possible. A multivalued autocomplete gives us the best flexibility because it's the most complex case, which means you can re-use it everywhere, getting a nice little feature enhancement at places like project/issues to bring up both the Project issue tracking and Project issues in one view, for instance, without having to monkey around with advanced search.
However, on both project/user and project/issues/user, it makes a lot of sense to filter the available list of autocompletable stuff by what projects you own, and what issues you've responded to. Derek is pretty confident he can build such intelligence into the autocomplete widget.
But project/user is a special case where there will only ever be a few options here. In classic UI design terms, a select widget makes a lot more sense. It kinda sucks to special-case this page (both because it's more code to maintain and also because it's confusing to users), but this is less a user-facing page and more a contributor-facing page, and so optimizing the user experience for them is important.
So, in summary:
Multiselect autocomplete widgets everywhere but project/user.
The autocomplete widget on project/issues/user will be filtered to only relevant projects.
project/user uses a select widget instead of an autocomplete one (also filtered to only relevant projects).
Comment #4
aclight commentedForgive me for not looking into the code itself to answer my own question, but my feeling is that for many of the non d.o sites that use project* (and specifically project issue), having autocomplete fields in the places webchick mentioned above will be more confusing than a select box. Given that most sites probably don't have nearly the number of projects as we have on d.o, there is less inefficiency in terms of bandwidth and page loading time to have a select box, and just less need from the users perspective since there will be far fewer projects to choose from.
So my question is whether the discussion above, primarily webchick's comment in #3, applies just to the possibly customized views for project issue stuff used on d.o, or the default views that will ship with project_issue. If the later, will it be trivial for a site builder/administrator to use select boxes instead, or would that require hacking the code or writing additional filter handlers?
I realize our prime focus right now is getting project* working for d.o, and that's fine, but I want to make sure that we at least think about how non d.o sites might use project* and don't build anything that might be seen as a major regression for other sites.
Comment #5
aclight commentedAlso, I liked the idea of the hybrid select box/autocomplete that was proposed in #201435-16: Huge list of projects hard to use, consumes excessive d.o. bandwidth, can hang browser but it looks like the issue was fixed by just doing an autocomplete instead. I've noticed that Gmail just got a new interface that includes a hybrid autocomplete/select box that is pretty spiffy (see http://gmailblog.blogspot.com/2009/02/new-ways-to-label-with-move-to-and... for blog post and screen shots). Such a widget wouldn't solve our problem in most places on sites with lots of projects like d.o, because we'd still have to load in all of the projects. However for smaller sites it would really be the best of both worlds--users could autocomplete or select as they desired. It would also be a nice solution at project/user (with proposed filtering for relevant projects) and probably project/issues/user.
I can't offer to write such a widget as that would require learning javascript first, but I wanted to point it out.
Comment #6
dww@aclight: Thanks for the concerns. But please rest assured that I am keeping the non-d.o case firmly in my mind as I'm doing all this work... ;)
re #4: The plan here is that since I'm going to need to provide both widgets for the d.o case, I'm just going to write the project filter handler so you choose the widget you want, and which set of projects it will populate, as you configure the filtered. So, the default views will ship configured as we have it at d.o, but it'll be trivial to edit the views to change all of them to use drop-downs instead.
re #5: #201435: Huge list of projects hard to use, consumes excessive d.o. bandwidth, can hang browser was solved by means of a setting -- the site admin can choose if they want to use select or autocomplete text site wide at admin/project/project-issue-settings.
Cheers,
-Derek
Comment #7
starbow commentedSounds like a great plan to me.
Comment #8
dwwCommitted code for all of this, fixed all the default views, and deployed on d6.d.o. Give it a spin and let me know what you think!
Cheers,
-Derek
Comment #9
starbow commentedproject/user looks good. I can't wait to get to use this for real.