Open sophiakc opened 7 years ago
Oof, this is awesome.
I'll work on this. I made a new branch called search-page for ongoing work.
Hey @nicholasedwards, good news! Ping me if you have any questions!
Apologies for working a bit slowly here! I'm still getting up to speed on the search codebase.
Let me see if I correctly understand a few aspects of the new search page design.
The user inputs a crop, a month, and a location into the search bar.
The initial search results are guides that match the searched crop, where at least one of the guide stages takes place during the searched month, and where the guide location is the same as the searched location. (This will require adding a Time of Year or Month field to the Stages model)
If the user doesn't input any criteria into a particular search field, the other search terms will still be applied, yielding broader search results.
The search results consists of links to guides, but not to crop pages. (If so, we may have to incorporate some other way of handling searches for crops in general versus specific guides)
The user can further filter results further using the check boxes, stage selectors, and the "UPDATE SEARCH" button.
@sophiakc @simonv3 do you agree with those statements?
I do, but @sophiakc is the expert.
As for the crop results, the idea (ultimately) is that there's at the top of the search results crops that are relevant to the search will be displayed. I think that was in one of the mock-ups, but I can't see it right away. @sophiakc, any thoughts?
Hi @nicholasedwards
My modification suggestions to your above statements:
1- The user only inputs a crop. Month and location are automatically incremented if enable (see https://github.com/openfarmcc/OpenFarm/issues/875)
2- The initial search results are guides that match the searched crop. Time: where at least one of the guide stages takes place during the searched month => in theory yes, but in practice, we are not going to implement it now as the data are missing. Let's show every guide no matter the time for now. Location: where all guides in the same climate zone of the searched location. Do we have the data to include the location? If no, let's show every guide no matter the location for now. (This will require adding a Time of Year or Month field to the Stages model) => yes! I plan to include that in the guide creation.
3- If the user doesn't input any criteria into a particular search field, the other search terms will still be applied, yielding broader search results. => Does 1- answers your question? If not, what do you mean?
4- The search results consist of links to guides, but not to crop pages. => Yes (If so, we may have to incorporate some other way of handling searches for crops in general versus specific guides) => what do you mean?
5- The user can further filter results further using the check boxes, stage selectors, and the "UPDATE SEARCH" button. => yes
6- @simonv3 input: As for the crop results, the idea (ultimately) is that there's at the top of the search results crops that are relevant to the search will be displayed. I think that was in one of the mock-ups, but I can't see it right away. @sophiakc, any thoughts? => crops are related to and only accessible through a guide. This is the hypothesis to be tested once it is implemented. Because the added value of OF is the guide, not the crop.
@simonv3 @nicholasedwards the goal here is to create a first version to push. Then we can see how it works in context and iterate
@sophiakc thanks for the thoughtful feedback! That answers all my questions for this iteration.
From a gardening perspective, I agree that the value for users is in the guides, so it makes sense to try an iteration where the search results are just guides (and the related crop is accessible via the guide).
I am working on #875 now.
Awesome. Thank you @nicholasedwards!
Hey @nicholasedwards how are things going? Do you have any more questions, comments concerns?
Hey @sophiakc I have made some progress on the front-end layout and styling of the search bar (separately from the application code), but I haven't yet been able to integrate it into the application. I'm realizing that I don't yet have the Javascript/Angular knowledge to be able to fully implement the search functionality.
Here is the HTML/CSS I have written so far for #875 (with a screenshot in a comment at the bottom): https://gist.github.com/nicholasedwards/c438d1fd1f06b4033e29c8ad1a9baf90
If anyone who is savvy about Angular would be willing to collaborate with me on this feature, we could try to split work between layout/styling (which I can handle right now) and search functionality (which I can't handle right now).
Otherwise, for the time being, I think I need to focus a while on learning Javascript and Angular so that I can follow through completely on stuff like this. I think for now, I'll unassign myself from this feature and wait to hear back if anyone wants to collaborate on it, and in the meantime I'll go into learning mode and circle back to this once I am more capable with Angular.
(ditto from the other issue, I'd be more than happy to do a little pair programming to get you familiar with what doing this with Angular would look like).
hey @nicholasedwards I've had a look at your work and that's a great start! Are you going to pair-program with @simonv3 ?
I have added a new feature suggestion for the search page (being discussed): https://github.com/openfarmcc/OpenFarm/issues/922
Sorry for upping but I just wanted to praise @sophiakc for a great design!
I haven't had time to read all the discussion but I will up this again: Great work @sophiakc! This is looking really good 🐝 🥇
Very exciting :)
thx for acknowledging @gillisig & @roryaronson I'm off-ish Openfarm until you need me and happy to get back to it if you have questions, comments, love to share! 🙂
Hi @simonv3 @sophiakc
Currently,I am working on filtering the data search in order to populate the cards for the search results. The current data set does not contain the climate zone and the location, can we disable these input text fields until we have updated the data?
sure! or just comment them out so that they don't show up?
Is this on the guides? Guides should have locations on them. Crops won't though.
See Parent Github issue: #874 👓 See wireframe in Figma + get CSS attributes Get assets from the Openfarm Public folder
showing result![wireframe - live](https://cloud.githubusercontent.com/assets/3863675/24133478/7cbc7bea-0dba-11e7-98de-966bd3c7323a.jpg)
empty state![wireframe - empty state](https://cloud.githubusercontent.com/assets/3863675/24133484/820b559e-0dba-11e7-922e-7838cb5b1c8e.jpg)
Each component of the Search page has their own detailed issue: