openfarmcc / OpenFarm

A free and open database for farming and gardening knowledge. You can grow anything!
https://OpenFarm.cc
MIT License
1.55k stars 238 forks source link

Search page creation #874

Open sophiakc opened 7 years ago

sophiakc commented 7 years ago

See Parent Github issue: #874 👓 See wireframe in Figma + get CSS attributes Get assets from the Openfarm Public folder

Each component of the Search page has their own detailed issue:

simonv3 commented 7 years ago

Oof, this is awesome.

nickedwards109 commented 7 years ago

I'll work on this. I made a new branch called search-page for ongoing work.

sophiakc commented 7 years ago

Hey @nicholasedwards, good news! Ping me if you have any questions!

nickedwards109 commented 7 years ago

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.

@sophiakc @simonv3 do you agree with those statements?

simonv3 commented 7 years ago

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?

sophiakc commented 7 years ago

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

nickedwards109 commented 7 years ago

@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.

simonv3 commented 7 years ago

Awesome. Thank you @nicholasedwards!

sophiakc commented 7 years ago

Hey @nicholasedwards how are things going? Do you have any more questions, comments concerns?

nickedwards109 commented 7 years ago

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.

simonv3 commented 7 years ago

(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).

sophiakc commented 7 years ago

hey @nicholasedwards I've had a look at your work and that's a great start! Are you going to pair-program with @simonv3 ?

sophiakc commented 7 years ago

I have added a new feature suggestion for the search page (being discussed): https://github.com/openfarmcc/OpenFarm/issues/922

gillisig commented 7 years ago

Sorry for upping but I just wanted to praise @sophiakc for a great design!

roryaronson commented 7 years ago

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 :)

sophiakc commented 7 years ago

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! 🙂

roselynemakena commented 7 years ago

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?

simonv3 commented 7 years ago

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.