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

Maps cleanup to fix sidebar and inline map problems #7404

Merged
merged 3 commits into from
Jan 31, 2020

Conversation

nstjean
Copy link
Contributor

@nstjean nstjean commented Jan 31, 2020

Fixes #7381 (<=== Add issue number here)
#7397
Also affects publiclab/leaflet-environmental-layers#376

This needs to be merged after we bump to the newest version of LEL after @crisner does her fix in publiclab/leaflet-environmental-layers#373

This DRY consolidates code from setupInlineLEL and setupLEL into one function called setupLEL that takes in options:

    var options = {
      mainContent: "content", // either "content" "people", default of neither
      layers: primary_layers, // the layer list that gets passed to LEL, default none
      setHash: false, // true = display urlHash, false (false) = don't show
      displayLayers: true // true = show all layers, false (default) = no layers are turned on
    }
    setupLEL(map, markers_hash, options);

This fix also removes all conflicting baselayers from the code for maps, because LEL will now have a default baselayer.

@codecov
Copy link

codecov bot commented Jan 31, 2020

Codecov Report

Merging #7404 into master will increase coverage by 0.93%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #7404      +/-   ##
==========================================
+ Coverage   80.82%   81.76%   +0.93%     
==========================================
  Files          97       97              
  Lines        5601     5604       +3     
==========================================
+ Hits         4527     4582      +55     
+ Misses       1074     1022      -52
Impacted Files Coverage Δ
app/controllers/tag_controller.rb 80.49% <100%> (+5.8%) ⬆️
app/channels/application_cable/channel.rb 100% <0%> (ø) ⬆️
app/models/node.rb 90.9% <0%> (+0.37%) ⬆️
app/api/srch/search.rb 65.35% <0%> (+0.65%) ⬆️
app/controllers/users_controller.rb 82.1% <0%> (+1.05%) ⬆️
app/helpers/application_helper.rb 84.52% <0%> (+1.19%) ⬆️
app/controllers/search_controller.rb 97.67% <0%> (+2.32%) ⬆️
app/models/concerns/node_shared.rb 90.29% <0%> (+3.39%) ⬆️
app/models/tag_selection.rb 96% <0%> (+4%) ⬆️
... and 6 more

@nstjean nstjean changed the title Maps cleanup Maps cleanup to fix sidebar map problems Jan 31, 2020
@nstjean nstjean changed the title Maps cleanup to fix sidebar map problems Maps cleanup to fix sidebar and inline map problems Jan 31, 2020
@plotsbot
Copy link
Collaborator

1 Warning
⚠️ There was an error with Danger bot’s Junit parsing: No JUnit file was found at output.xml
2 Messages
📖 @nstjean Thank you for your pull request! I’m here to help with some tips and recommendations. Please take a look at the list provided and help us review and accept your contribution! And don’t be discouraged if you see errors – we’re here to help.
📖 #
Screenshots 📸 (click to expand)

7404-test_questions.png

7404-test_embeddable_grids.png

7404-test_signup.png

7404-test_viewing_the_settings_page.png

7404-test_tag_by_author_page.png

7404-test_wiki_page_with_inline_grids.png

7404-test_stats.png

7404-test_viewing_the_dashboard.png

7404-test_searching_an_item_from_the_homepage.png

7404-test_signup_modal_form_validation.png

7404-test_tag_stats.png

7404-test_login_modal_form_validation.png

7404-test_questions_shadow.png

7404-test_login_modal.png

7404-test_profile_page.png

7404-test_comments.png

7404-test_tags.png

7404-test_signup_modal.png

7404-test_wiki.png

7404-test_methods.png

7404-test_tag_page.png

7404-test_blog_page_with_location_modal.png

7404-test_tag_wildcard.png

7404-test_signup_modal_disabled_submit_button_on_empty_username.png

7404-test_embeddable_thumbnail_grids.png

7404-test_front_page_with_navbar_search_autocomplete.png

7404-test_spam_moderation_page.png

7404-test_login.png

7404-test_viewing_the_dropdown_menu.png

7404-test_viewing_question_post.png

7404-test_mobile_displays.png

7404-test_simple-data-grapher_powertag.png

7404-test_front.png

7404-test_question_page.png

7404-test_tag_contributors_page.png

7404-test_blog.png

7404-test_people.png

7404-test_wiki_revisions.png

Learn about automated screenshots

Generated by 🚫 Danger

@jywarren jywarren merged commit 01f0d81 into publiclab:master Jan 31, 2020
@jywarren
Copy link
Member

Awesome!!!

vinitshahdeo pushed a commit to vinitshahdeo/plots2 that referenced this pull request Feb 1, 2020
* consolidate map code into setupLEL, remove setupInlineLEL

* clean up for codeclimate

* fix travis error
@nstjean nstjean deleted the maps-cleanup branch February 3, 2020 17:51
NitinBhasneria pushed a commit to NitinBhasneria/plots2 that referenced this pull request Feb 5, 2020
* consolidate map code into setupLEL, remove setupInlineLEL

* clean up for codeclimate

* fix travis error
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.

Sidebar map layers not working
3 participants