16 Feb 2012
You'll probably get lost in this post. I should doodle a diagram... Apologies.
So today I've tasked myself with improving the search feature on the NexGen project (itself a post for another day), the scenario is this:
The search should allow you to get you from the homepage to the exact piece of information you need based on the information at hand - you might have a Site Address, Client Name, Reference ID etc.
The search itself is fully functional, however I've not been 100% happy with the interface - until today! The old interface was pretty bog standard:
Pretty simple right? Indeed, but the interface actually requires MORE components:
Lets say we searched for the Site: "Durham Castle" - it's used by 2 Jobs within a single Contract. That Contract has other Jobs at different sites. If we only show those two Jobs then how do we see the other Jobs? We need:
Not so bad right? Well, I think it is awful - the interface bit is OK, the coding bit is OK, but the users of the system have to be aware that "we're only showing the Jobs that match your search" - it might not be obvious that there's other Jobs in that Contract!!
So my solution is to show all the Jobs (well, paginated) but with the search results at the top. In the prime spot :-)
SELECT * FROM `jobs` ORDER BY site=22 DESC, id ASC;
I'm really happy with this one even if you don't get it.