Git Product home page Git Product logo

openy_map's Introduction

openy_map

Map feature from Open Y Distribution

image

image

openy_map's People

Contributors

aleevas avatar andrebonon avatar andreymaximov avatar andreyzb avatar andriokha avatar anprok avatar atiupa avatar danylevskyi avatar david-hernandez avatar david-storm avatar ddrozdik avatar dimb avatar duozersk avatar fandm avatar fant0m771 avatar froboy avatar hamrant avatar ivan-berezhnov avatar jediandrey avatar kerby70 avatar kolesnikoff avatar manachynskyi avatar podarok avatar retif avatar rotator avatar sardis93 avatar shuklina avatar svicervlad avatar tolichka avatar v1nk avatar

Stargazers

 avatar

Watchers

 avatar  avatar

openy_map's Issues

openy_map_lb: A stray renderRoot() invocation is causing bubbling of attached assets to break

Hi,

I took a look at the layout builder submodule and noticed an issue when submitting the Configure block form for the Location finder for Layout Builder block. I appreciate the submodule might not be ready yet, just thought it'd be helpful to report.

I'm not sure what a fix might look like. On my site it seems we can get away with using a normal render() call, but I'm not sure where/how else \Drupal\openy_map\OpenyMapDataWrapper::getPins() is used. Maybe it would make sense to return a render array and allow the caller to determine how to render? No idea myself (:

Thanks

An AJAX HTTP error occurred.
HTTP Result Code: 500
Debugging information follows.
Path: /layout_builder/update/block/overrides/node.5435/0/content/3a5a0950-cd01-4469-bcd2-1d55cd649bbe?destination=/node/5435/layout&_wrapper_format=drupal_dialog.off_canvas&ajax_form=1
StatusText: error
ResponseText: The website encountered an unexpected error. Please try again later.LogicException: A stray renderRoot() invocation is causing bubbling of attached assets to break. in Drupal\Core\Render\Renderer->renderRoot() (line 142 of core/lib/Drupal/Core/Render/Renderer.php). Drupal\openy_map\OpenyMapDataWrapper->getPins('branch') (Line: 98)
Drupal\openy_data_wrapper\DataWrapper->getLocationPins()
call_user_func_array(Array, Array) (Line: 70)
Drupal\openy_socrates\OpenySocratesFacade->__call('getLocationPins', Array) (Line: 75)
Drupal\openy_map_lb\Plugin\Block\LocationFinder->build() (Line: 106)
Drupal\layout_builder\EventSubscriber\BlockComponentRenderArray->onBuildRender(Object, 'section_component.build.render_array', Object)
call_user_func(Array, Object, 'section_component.build.render_array', Object) (Line: 142)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object, 'section_component.build.render_array') (Line: 90)
Drupal\layout_builder\SectionComponent->toRenderArray(Array, 1) (Line: 88)
Drupal\layout_builder\Section->toRenderArray(Array, 1) (Line: 240)
Drupal\layout_builder\Element\LayoutBuilder->buildAdministrativeSection(Object, 0) (Line: 124)
Drupal\layout_builder\Element\LayoutBuilder->layout(Object) (Line: 98)
Drupal\layout_builder\Element\LayoutBuilder->preRender(Array)
call_user_func_array(Array, Array) (Line: 101)
Drupal\Core\Render\Renderer->doTrustedCallback(Array, Array, 'Render #pre_render callbacks must be methods of a class that implements \Drupal\Core\Security\TrustedCallbackInterface or be an anonymous function. The callback was %s. See https://www.drupal.org/node/2966725', 'exception', 'Drupal\Core\Render\Element\RenderCallbackInterface') (Line: 788)
Drupal\Core\Render\Renderer->doCallback('#pre_render', Array, Array) (Line: 374)
Drupal\Core\Render\Renderer->doRender(Array, 1) (Line: 204)
Drupal\Core\Render\Renderer->render(Array, 1) (Line: 148)
Drupal\Core\Render\Renderer->Drupal\Core\Render\{closure}() (Line: 580)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 149)
Drupal\Core\Render\Renderer->renderRoot(Array) (Line: 36)
Drupal\Core\Ajax\InsertCommand->getRenderedContent() (Line: 31)
Drupal\Core\Ajax\ReplaceCommand->render() (Line: 43)
Drupal\Core\Ajax\AjaxResponse->addCommand(Object) (Line: 47)
Drupal\layout_builder\Form\ConfigureBlockFormBase->rebuildLayout(Object) (Line: 26)
Drupal\layout_builder\Form\ConfigureBlockFormBase->rebuildAndClose(Object) (Line: 242)
Drupal\layout_builder\Form\ConfigureBlockFormBase->successfulAjaxSubmit(Array, Object) (Line: 39)
Drupal\layout_builder\Form\ConfigureBlockFormBase->ajaxSubmit(Array, Object, Object)
call_user_func_array(Array, Array) (Line: 69)
Drupal\Core\Form\FormAjaxResponseBuilder->buildResponse(Object, Array, Object, Array) (Line: 109)
Drupal\Core\Form\EventSubscriber\FormAjaxSubscriber->onException(Object, 'kernel.exception', Object)
call_user_func(Array, Object, 'kernel.exception', Object) (Line: 142)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object, 'kernel.exception') (Line: 229)
Symfony\Component\HttpKernel\HttpKernel->handleThrowable(Object, Object, 1) (Line: 92)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 52)
Drupal\openy_block_date\StackMiddleware\BlockDateCacheInvalidator->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 718)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

Allow for filtering distance by km in addition to miles

(Wonderfully...) YMCAs outside of the USA are taking notice of Open Y! While the map supports setting the default location, it does not allow for unit switching in case that location happens to be in the ... 99% of the world (this was not fact-checked) that uses the metric system.

  • Add a setting on admin/openy/settings/openy_map to allow the map distance filter to use km instead of miles.
  • Change the filter accordingly.

Locations___YMCA_Canada

Adds translation on the location views

Currently, the location views doesn't filter by the current language resulting on the views bringing duplicate results, for example a "Taggart Family Y" and its translation "Y de la famille Taggart".
Screenshot 2024-04-04 at 16 48 03

Proposed solution:

  • Views: Add a filter criteria "default_language", and filter by the default language in location views. It doesn't affect sites with only one language.
  • Makes the Branch Labels (/admin/config/content/location-filter-settings) translatable via config_translation (module).
  • Use the twig t() function so the "Filter by amenities" and the Search input placeholder can be translated

Locations with matching names are not filtered properly

When we have two or more locations with the same title on the page, we have a problem when the block with the same title as another block is not filtered by the selected type of amenities. This is because when initializing the elements parameter, we compare the Title value instead of checking the location id.

In other words:

Given we have two more more locations with the same title
When an amenity is selected from the list of filters
Then one of the duplicate locations is not filtered properly

screencast.2022-11-08.16-24-26.mp4

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.