Needs Feedback: Homepage redesign redux #697

Closed
wants to merge 41 commits into
from

Projects

None yet

5 participants

@tygriffin
Contributor

Fixes #628

Replaces #674

@Skud :
> I think after you select something from that search UI it should take you direct to the crop page in question (eg. /crops/eggplant) not to search results (unless there's not an exact match).

This should work in production where we're using Elasticsearch but it doesn't seem to work in development. See inline note.

@Skud :

Why is the crop search not an autosuggest? If I type "pea" or "berry" for instance I don't see the list.

Good call. I need to refactor autosuggest a bit. Should I do that now or break into a new story?

Question: Should the signed in user homepage redesign be part of this PR?

Screenshot (updated March 1, 2015)
screen shot 2015-03-01 at 5 07 09 pm

tygriffin added some commits Jan 13, 2015
@tygriffin tygriffin schema updated a0a14a9
@tygriffin tygriffin sketch basic outline of redesign 53dbc92
@tygriffin tygriffin style search crops area with high contrast font against full-width image d61e33d
@tygriffin tygriffin style map area 4907f9f
@tygriffin tygriffin Merge branch 'dev' of https://github.com/Growstuff/growstuff into hom…
…epage-redesign
c4aa016
@tygriffin tygriffin add a few representative crops under search crops fd0644a
@tygriffin tygriffin configure places map to work on homepage 87610b0
@tygriffin tygriffin move customs styles in overrides 5b4edcd
@tygriffin tygriffin wire up find growers to place search functionality 7eb95d6
@tygriffin tygriffin get h1 title from ENV variable 33108ae
@tygriffin tygriffin uncomment other parts of page 33add70
@tygriffin tygriffin wire up find crops to search crops functionality 2833b1d
@tygriffin tygriffin revert to previous bootstrap non-fullwidth container dff41ee
@tygriffin tygriffin increase legibility of label with text shadow 905f36f
@tygriffin tygriffin target header sign up link because we removed the other one a79d96c
@tygriffin tygriffin extract strings out of new homepage design into locale file 2d45419
@tygriffin tygriffin added full-width layout for home ad39212
@tygriffin tygriffin add image behind title 15ea04d
@tygriffin tygriffin center map 9ecf2b0
@tygriffin tygriffin simplify layout by removing interesting crops 0c3043c
@tygriffin tygriffin set map view automatically when typing in address place name on homepage c423cc1
@tygriffin tygriffin add image attribution f457a2f
@tygriffin tygriffin crops search goes direct to crop detail page if there's an exact match 8abb95a
@tygriffin tygriffin move everything not part of the top banner into a container 0914853
@tygriffin tygriffin increase title size ff6864a
@tygriffin tygriffin add back interesting crops 67d1b76
@tygriffin tygriffin fix locale spec bde7565
@tygriffin tygriffin add contract screen on map 7529bdc
@tygriffin tygriffin use negative margin for positioning f34469c
@tygriffin tygriffin refactor styles 05f8d4e
@tygriffin tygriffin fix locale inconsistency 4146ace
@tygriffin tygriffin get rid of old layout we're not using b62e15f
@tygriffin tygriffin map zooms only on find growers submit 0ffbcd4
@tygriffin tygriffin remove unnecessary locale strings 5067e6c
@tygriffin tygriffin removed extraneous tests c1ab1f6
@tygriffin tygriffin catch up with dev 6dc37e2
@tygriffin tygriffin wip: exact search 01ab9ec
@tygriffin tygriffin go to direct to crop detail if exact match d23c21e
@coveralls

Coverage Status

Coverage increased (+0.16%) to 83.46% when pulling d23c21e on tygriffin:homepage-redesign-redux into 4c6b96e on Growstuff:dev.

@tygriffin tygriffin commented on an outdated diff Feb 6, 2015
app/controllers/crops_controller.rb
@@ -61,14 +61,20 @@ def hierarchy
# GET /crops/search
def search
@all_matches = Crop.search(params[:search])
- exact_match = Crop.find_by_name(params[:search])
+ exact_match = Crop.find_by(name: params[:search])
+ exact_search = params[:exact_search] || false
+
if exact_match
@all_matches.delete(exact_match)
@tygriffin
tygriffin Feb 6, 2015 Contributor

This seems to delete from the actual database in development. I think this is because we're not using Elasticsearch in the dev env and so search is returning an ActiveRecord::Relation, not a regular array. It looks like calling search results in queries like this for example:

DELETE FROM "crops" WHERE (name ILIKE '%corn%') AND "crops"."id" = 61

Not sure how to debug this.

@tygriffin tygriffin referenced this pull request Feb 6, 2015
Closed

WIP: Homepage redesign #674

@coveralls

Coverage Status

Coverage increased (+0.18%) to 83.83% when pulling e881d6e on tygriffin:homepage-redesign-redux into c76e9cc on Growstuff:dev.

@coveralls

Coverage Status

Coverage increased (+0.12%) to 83.77% when pulling cf042f1 on tygriffin:homepage-redesign-redux into c76e9cc on Growstuff:dev.

@coveralls

Coverage Status

Coverage increased (+0.12%) to 83.77% when pulling cf042f1 on tygriffin:homepage-redesign-redux into c76e9cc on Growstuff:dev.

@cesy
Member
cesy commented Mar 25, 2015

Does this still need a review?

@tygriffin
Contributor

@cesy : I believe it does.

@cesy cesy commented on the diff Mar 25, 2015
app/assets/stylesheets/overrides.css.less
+
+.title-banner {
+ position: relative;
+ background-image: image-url('veggies.jpg');
+ background-repeat: no-repeat;
+ background-size: 100%;
+ min-height: 280px;
+ padding: 30px;
+ margin: 0 -15px 0 -15px;
+
+ @media (max-width: @screen-md-min) {
+ background-size: @screen-md-min;
+ }
+
+ h1 {
+ font-size: 60px;
@cesy
cesy Mar 25, 2015 Member

Can we make this relative in ems instead of absolute, for accessibility?

@tygriffin
tygriffin Mar 26, 2015 Contributor

Totally. Shouldn't be a problem.

@Skud
Skud Apr 1, 2015 Contributor

Actually, can we use Bootstrap less variables please!

Bootstrap itself is based on a base pixel size, and then has things like
@headingblah (I forget the exact names) to set the sizes of everything else.

On 27/03/2015 12:09 am, Taylor Griffin wrote:

In app/assets/stylesheets/overrides.css.less
#697 (comment):

+.title-banner {

  • position: relative;
  • background-image: image-url('veggies.jpg');
  • background-repeat: no-repeat;
  • background-size: 100%;
  • min-height: 280px;
  • padding: 30px;
  • margin: 0 -15px 0 -15px;
  • @media (max-width: @screen-md-min) {
  • background-size: @screen-md-min;
  • }
  • h1 {
  • font-size: 60px;

Totally. Shouldn't be a problem.


Reply to this email directly or view it on GitHub
https://github.com/Growstuff/growstuff/pull/697/files#r27210396.

Alex "Skud" Bayley
[email protected]
http://growstuff.org/

@tygriffin
tygriffin Apr 1, 2015 Contributor

So glad you made this suggestion. I've been using variables for all kinds of padding and margins at work, and it's been a real game changer. I'll get caught up on this PR this weekend, btw.

@cesy cesy commented on the diff Mar 25, 2015
app/assets/stylesheets/overrides.css.less
+ margin: 0 -15px 0 -15px;
+
+ @media (max-width: @screen-md-min) {
+ background-size: @screen-md-min;
+ }
+
+ h1 {
+ font-size: 60px;
+ margin: 60px;
+ }
+}
+
+.image-attribution {
+ position: absolute;
+ bottom: 0; right: 5px;
+ font-size: 12px;
@cesy
cesy Mar 25, 2015 Member

Again, shouldn't be absolute.

@cesy
Member
cesy commented Mar 25, 2015

Is it easy to split out the search changes into a separate PR?

@cesy
Member
cesy commented Mar 25, 2015

Can we also add a feature test for the new homepage, to check some of the values and features are coming out correctly?

I've had a first review of this and most of it looks good. It will need someone with more Javascript expertise to review those parts.

@tygriffin
Contributor

@cesy : Check and check on the search changes and feature tests. And speaking of separate PRs, I think we should break out the redesign of the login page into a separate story as well, and just make sure it's included in the same PR as this one. I can probably whip this PR into shape, but I'm too swamped with work / life stuff at the moment to take on too much more.

@cesy
Member
cesy commented Jul 8, 2015

Hi @tygriffin, we've now got Release 8 out the way and are keen to get this moving again if you're around. Sorry for the delay!

@tygriffin
Contributor

Hi @cesy! Great to hear about Release 8. Unfortunately, I don't think I'll have time to do much development on Growstuff in the foreseeable future. Do you think someone might be able to take over this story?

@CloCkWeRX
Contributor

I'd be happy to take this one over and redo against current dev

@cesy
Member
cesy commented Apr 21, 2016

Thank you, that would be great!

@cesy cesy added this to the Release 12 milestone May 22, 2016
@cesy cesy modified the milestone: Release 12, Release 13 Jun 1, 2016
@CloCkWeRX CloCkWeRX modified the milestone: Release 14, Release 13 Jul 4, 2016
@cesy cesy modified the milestone: Release 14, Release 15 Aug 3, 2016
@cesy cesy modified the milestone: Release 15 Aug 24, 2016
@CloCkWeRX CloCkWeRX closed this Dec 2, 2016
@CloCkWeRX
Contributor

Shifted to #1113

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment