Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New front ui #633

Merged
merged 24 commits into from
May 24, 2019
Merged

New front ui #633

merged 24 commits into from
May 24, 2019

Conversation

stefannibrasil
Copy link
Contributor

@stefannibrasil stefannibrasil commented May 23, 2019

Starting the work from #327

FYI: This is still going to be tested/made adjustments after review tomorrow.

@codeclimate
Copy link

codeclimate bot commented May 23, 2019

Code Climate has analyzed commit 10c4f3e and detected 11 issues on this pull request.

Here's the issue category breakdown:

Category Count
Style 9
Security 2

View more on Code Climate.

@codecov
Copy link

codecov bot commented May 23, 2019

Codecov Report

Merging #633 into main will decrease coverage by 0.91%.
The diff coverage is 38.23%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #633      +/-   ##
==========================================
- Coverage   72.19%   71.27%   -0.92%     
==========================================
  Files          31       32       +1     
  Lines        1255     1288      +33     
==========================================
+ Hits          906      918      +12     
- Misses        349      370      +21
Impacted Files Coverage Δ
app/controllers/front_ui_controller.rb 33.33% <33.33%> (ø)
app/models/map.rb 84.71% <40%> (-3.05%) ⬇️
app/controllers/application_controller.rb 89.65% <66.66%> (-2.94%) ⬇️

@stefannibrasil
Copy link
Contributor Author

stefannibrasil commented May 23, 2019

I pushed to unstable, but I don't think it worked... I can't access the /front-page page :/

@jywarren jywarren merged commit dc96ada into publiclab:main May 24, 2019
@jywarren
Copy link
Member

Let's just push this to live, but i'll check with @icarito about the staging issue too! Thanks!

@icarito
Copy link
Member

icarito commented May 25, 2019

Hi!
I'm not sure why it failed - I just restarted the build and it worked!

The route exists but gives an error:

Started GET "/front-page" for 190.232.232.108 at 2019-05-25 04:53:33 +0000
Processing by FrontUiController#index as HTML
  User Load (0.5ms)  SELECT `users`.* FROM `users` WHERE `users`.`id` = 1596 LIMIT 1
  Map Load (0.8ms)  SELECT user_id, author, count(1) as maps_count FROM `maps` WHERE `maps`.`archived` = 0 AND (user_id != 0) GROUP BY author ORDER BY maps_count DESC
Mysql2::Error: Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'mapknitter.maps.user_id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by: SELECT user_id, author, count(1) as maps_count FROM `maps`  WHERE `maps`.`archived` = 0 AND (user_id != 0) GROUP BY author ORDER BY maps_count DESC
Completed 500 Internal Server Error in 3.4ms (ActiveRecord: 1.4ms)

ActiveRecord::StatementInvalid (Mysql2::Error: Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'mapknitter.maps.user_id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by: SELECT user_id, author, count(1) as maps_count FROM `maps`  WHERE `maps`.`archived` = 0 AND (user_id != 0) GROUP BY author ORDER BY maps_count DESC):
  app/models/map.rb:272:in `featured_authors'
  app/controllers/front_ui_controller.rb:6:in `index'


Started GET "/assets/style.css?body=1" for 190.232.232.108 at 2019-05-25 04:53:33 +0000
Served asset /style.css - 304 Not Modified (0ms)
Started GET "/assets/jquery-ujs/src/rails.js?body=1" for 190.232.232.108 at 2019-05-25 04:53:33 +0000
Served asset /jquery-ujs/src/rails.js - 304 Not Modified (0ms)

@icarito
Copy link
Member

icarito commented May 25, 2019

@jywarren
Copy link
Member

Hi @cesswairimu just noting here is the new front page code! Thanks!!!

@cesswairimu
Copy link
Collaborator

Thanks Jeff

chen-robert pushed a commit to chen-robert/mapknitter that referenced this pull request Dec 5, 2019
* Front Page UI: Add hero

* Navbar tweaks and hardcoded about page

* Tweak footer

* Add aerial mapping section

* CSS tweaks

* Start integrating map

* Add About MapKnitter link to footer + nav links

* Update links for kits and about MapKnitter

* Get user's location

* Get user's location or location is set to default

* Get city's name

* showing city area

* Start adding featured mappers section

* Add how to section

* Add CTA for add images

* Use JS Promises for getting user location

* better JS

* some texting tweaks

* Adding maps to front page

* grouping authors nearby ordered by maps count

* Showing featured mappers

* showing users nearby if location shared

* Some refactor + text tweaks

* fixing codeclimate issues
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants