Skip to content

Commit

Permalink
Merge pull request #290 from localgovdrupal/3.x
Browse files Browse the repository at this point in the history
3.0.0-alpha3
  • Loading branch information
finnlewis committed Jul 24, 2023
2 parents c15523c + c3f0c96 commit 3a8cba5
Show file tree
Hide file tree
Showing 34 changed files with 331 additions and 53 deletions.
1 change: 0 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ jobs:
- name: DON'T MERGE THIS - Require Drupal 10 compatible branches
run: |
composer --working-dir=./html require localgovdrupal/localgov_core:"dev-feature/drupal-10 as 2.2.0"
composer --working-dir=./html require localgovdrupal/localgov_geo:"dev-feature/drupal-10 as 1.3.0"
- name: Obtain the test target using Composer
Expand Down
10 changes: 5 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
"drupal/search_api": "^1.29",
"drupal/search_api_autocomplete": "^1.3",
"drupal/search_api_location": "1.x-dev",
"localgovdrupal/localgov_core": "dev-feature/drupal-10 as 2.2.0",
"localgovdrupal/localgov_geo": "dev-feature/drupal-10 as 1.3.0"
"localgovdrupal/localgov_core": "^2.12",
"localgovdrupal/localgov_geo": "^2.0@alpha"
},
"require-dev": {
"localgovdrupal/localgov_services": "dev-feature/drupal-10 as 2.1.0",
"localgovdrupal/localgov_openreferral": "dev-feature/drupal-10 as 1.1.0",
"localgovdrupal/localgov_paragraphs": "dev-feature/drupal-10 as 2.3.0"
"localgovdrupal/localgov_services": "^2.1",
"localgovdrupal/localgov_openreferral": "^1.1",
"localgovdrupal/localgov_paragraphs": "^2.3"
},
"suggest": {
"localgovdrupal/localgov_openreferral": "Enables Open Referral output of Directories",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ entity_type: node
bundle: localgov_directory
label: 'Enabled Facets'
description: 'Which facets are enabled to be shown on this directory channel, and will be added when editing content to be added to this directory.'
required: true
required: false
translatable: false
default_value: { }
default_value_callback: ''
Expand Down
2 changes: 1 addition & 1 deletion localgov_directories.module
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ use Drupal\Core\Entity\Display\EntityViewDisplayInterface;
use Drupal\Core\Render\Element;
use Drupal\field\FieldConfigInterface;
use Drupal\localgov_directories\ConfigurationHelper;
use Drupal\localgov_directories\Constants as Directory;
use Drupal\localgov_directories\DirectoryExtraFieldDisplay;
use Drupal\localgov_roles\RolesHelper;
use Drupal\node\NodeInterface;
use Drupal\pathauto\Entity\PathautoPattern;
use Drupal\search_api\IndexInterface;
use Drupal\localgov_directories\Constants as Directory;

/**
* Implements hook_theme().
Expand Down
28 changes: 28 additions & 0 deletions localgov_directories.post_update.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php

/**
* @file
* Post update hooks for LocalGov Directories.
*/

/**
* Updates the node type visibility condition.
*
* This was inluded in core D9 as block_post_update_replace_node_type_condition
* but we had installed condition plugins with this after it might have run.
* No harm in running this multiple times.
*/
function localgov_directories_post_update_replace_node_type_condition() {
$config_factory = \Drupal::configFactory();
foreach ($config_factory->listAll('block.block.') as $block_config_name) {
$block = $config_factory->getEditable($block_config_name);

if ($block->get('visibility.node_type')) {
$configuration = $block->get('visibility.node_type');
$configuration['id'] = 'entity_bundle:node';
$block->set('visibility.entity_bundle:node', $configuration);
$block->clear('visibility.node_type');
$block->save(TRUE);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
* Contains localgov_directories_db.install.
*/

use Drupal\Component\Serialization\Yaml;
use Drupal\search_api\Entity\Index;
use Drupal\search_api\Entity\Server;
use Drupal\Component\Serialization\Yaml;

/**
* Implements hook_install().
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace Drupal\Tests\localgov_directories_db\Kernel;

use Drupal\search_api\Entity\Index;
use Drupal\KernelTests\KernelTestBase;
use Drupal\search_api\Entity\Index;

/**
* Kernel test enabling server.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ langcode: en
status: true
dependencies:
module:
- localgov_geo
- geo_entity
- node
id: node.localgov_location
field_name: localgov_location
entity_type: node
type: entity_reference
settings:
target_type: localgov_geo
target_type: geo_entity
module: core
locked: false
cardinality: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ langcode: en
status: true
dependencies:
config:
- field.storage.localgov_geo.location
- field.storage.geo_entity.location
- field.storage.node.body
- search_api.index.localgov_directories_index_default
module:
- geofield
- leaflet_views
- localgov_geo
- geo_entity
- search_api
- search_api_location_views
- text
Expand Down Expand Up @@ -350,12 +350,12 @@ display:
multi_separator: ', '
location:
id: location
table: search_api_entity_localgov_geo
table: search_api_entity_geo_entity
field: location
relationship: localgov_location
group_type: group
admin_label: ''
entity_type: localgov_geo
entity_type: geo_entity
plugin_id: search_api_field
label: ''
exclude: false
Expand Down Expand Up @@ -707,7 +707,7 @@ display:
- url
- 'user.node_grants:view'
tags:
- 'config:field.storage.localgov_geo.location'
- 'config:field.storage.geo_entity.location'
- 'config:search_api.index.localgov_directories_index_default'
node_embed:
id: node_embed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

use Drupal\Component\Serialization\Yaml;
use Drupal\localgov_directories\Constants as Directory;
use Drupal\views\Entity\View;
use Drupal\localgov_directories_location\ProximitySearchSetup;
use Drupal\views\Entity\View;

/**
* Implements hook_install().
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
namespace Drupal\localgov_directories_location\EventSubscriber;

use Drupal\facets\FacetManager\DefaultFacetManager;
use Drupal\search_api\Event\SearchApiEvents;
use Drupal\search_api\Event\QueryPreExecuteEvent;
use Drupal\search_api\Event\SearchApiEvents;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ langcode: en
status: true
dependencies:
config:
- core.entity_form_mode.localgov_geo.inline
- core.entity_form_mode.geo_entity.inline
- field.field.node.localgov_directories_org.body
- field.field.node.localgov_directories_org.localgov_directory_channels
- field.field.node.localgov_directories_org.localgov_directory_email
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ status: true
dependencies:
config:
- field.storage.node.localgov_location
- localgov_geo.localgov_geo_type.address
- geo_entity.geo_entity_type.address
- node.type.localgov_directories_org
enforced:
module:
Expand All @@ -19,7 +19,7 @@ translatable: false
default_value: { }
default_value_callback: ''
settings:
handler: 'default:localgov_geo'
handler: 'default:geo_entity'
handler_settings:
target_bundles:
address: address
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,48 @@ class DirectoryOrgTest extends BrowserTestBase {
use NodeCreationTrait;
use AssertBreadcrumbTrait;

/**
* Skip schema checks.
*
* @var string[]
*/
protected static $configSchemaCheckerExclusions = [
// Missing schema:
// - 'content.location.settings.reset_map.position'.
// - 'content.location.settings.weight'.
'core.entity_view_display.localgov_geo.area.default',
'core.entity_view_display.localgov_geo.area.embed',
'core.entity_view_display.localgov_geo.area.full',
'core.entity_view_display.geo_entity.area.default',
'core.entity_view_display.geo_entity.area.embed',
'core.entity_view_display.geo_entity.area.full',
// Missing schema:
// - content.location.settings.geometry_validation.
// - content.location.settings.multiple_map.
// - content.location.settings.leaflet_map.
// - content.location.settings.height.
// - content.location.settings.height_unit.
// - content.location.settings.hide_empty_map.
// - content.location.settings.disable_wheel.
// - content.location.settings.gesture_handling.
// - content.location.settings.popup.
// - content.location.settings.popup_content.
// - content.location.settings.leaflet_popup.
// - content.location.settings.leaflet_tooltip.
// - content.location.settings.map_position.
// - content.location.settings.weight.
// - content.location.settings.icon.
// - content.location.settings.leaflet_markercluster.
// - content.location.settings.feature_properties.
'core.entity_form_display.geo_entity.address.default',
'core.entity_form_display.geo_entity.address.inline',
// Missing schema:
// - content.postal_address.settings.providers.
// - content.postal_address.settings.geocode_geofield
'core.entity_form_display.localgov_geo.address.default',
'core.entity_form_display.localgov_geo.address.inline',
];

/**
* Test breadcrumbs in the Standard profile.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,48 @@ class LocalgovIntegrationTest extends BrowserTestBase {
use NodeCreationTrait;
use CronRunTrait;

/**
* Skip schema checks.
*
* @var string[]
*/
protected static $configSchemaCheckerExclusions = [
// Missing schema:
// - 'content.location.settings.reset_map.position'.
// - 'content.location.settings.weight'.
'core.entity_view_display.localgov_geo.area.default',
'core.entity_view_display.localgov_geo.area.embed',
'core.entity_view_display.localgov_geo.area.full',
'core.entity_view_display.geo_entity.area.default',
'core.entity_view_display.geo_entity.area.embed',
'core.entity_view_display.geo_entity.area.full',
// Missing schema:
// - content.location.settings.geometry_validation.
// - content.location.settings.multiple_map.
// - content.location.settings.leaflet_map.
// - content.location.settings.height.
// - content.location.settings.height_unit.
// - content.location.settings.hide_empty_map.
// - content.location.settings.disable_wheel.
// - content.location.settings.gesture_handling.
// - content.location.settings.popup.
// - content.location.settings.popup_content.
// - content.location.settings.leaflet_popup.
// - content.location.settings.leaflet_tooltip.
// - content.location.settings.map_position.
// - content.location.settings.weight.
// - content.location.settings.icon.
// - content.location.settings.leaflet_markercluster.
// - content.location.settings.feature_properties.
'core.entity_form_display.geo_entity.address.default',
'core.entity_form_display.geo_entity.address.inline',
// Missing schema:
// - content.postal_address.settings.providers.
// - content.postal_address.settings.geocode_geofield
'core.entity_form_display.localgov_geo.address.default',
'core.entity_form_display.localgov_geo.address.inline',
];

/**
* Test breadcrumbs in the Standard profile.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ langcode: en
status: true
dependencies:
config:
- entity_browser.browser.localgov_geo_library
- entity_browser.browser.geo_entity_library
- field.field.node.localgov_directories_venue.body
- field.field.node.localgov_directories_venue.localgov_directory_channels
- field.field.node.localgov_directories_venue.localgov_directory_email
Expand Down Expand Up @@ -217,7 +217,7 @@ content:
weight: 7
region: content
settings:
entity_browser: localgov_geo_library
entity_browser: geo_entity_library
field_widget_display: label
field_widget_edit: true
field_widget_remove: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ status: true
dependencies:
config:
- field.storage.node.localgov_location
- localgov_geo.localgov_geo_type.address
- geo_entity.geo_entity_type.address
- node.type.localgov_directories_venue
enforced:
module:
- localgov_geo_address
- geo_entity_address
id: node.localgov_directories_venue.localgov_location
field_name: localgov_location
entity_type: node
Expand All @@ -19,7 +19,7 @@ translatable: false
default_value: { }
default_value_callback: ''
settings:
handler: 'default:localgov_geo'
handler: 'default:geo_entity'
handler_settings:
target_bundles:
address: address
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,48 @@ class DirectoryVenueTest extends BrowserTestBase {
use NodeCreationTrait;
use AssertBreadcrumbTrait;

/**
* Skip schema checks.
*
* @var string[]
*/
protected static $configSchemaCheckerExclusions = [
// Missing schema:
// - 'content.location.settings.reset_map.position'.
// - 'content.location.settings.weight'.
'core.entity_view_display.localgov_geo.area.default',
'core.entity_view_display.localgov_geo.area.embed',
'core.entity_view_display.localgov_geo.area.full',
'core.entity_view_display.geo_entity.area.default',
'core.entity_view_display.geo_entity.area.embed',
'core.entity_view_display.geo_entity.area.full',
// Missing schema:
// - content.location.settings.geometry_validation.
// - content.location.settings.multiple_map.
// - content.location.settings.leaflet_map.
// - content.location.settings.height.
// - content.location.settings.height_unit.
// - content.location.settings.hide_empty_map.
// - content.location.settings.disable_wheel.
// - content.location.settings.gesture_handling.
// - content.location.settings.popup.
// - content.location.settings.popup_content.
// - content.location.settings.leaflet_popup.
// - content.location.settings.leaflet_tooltip.
// - content.location.settings.map_position.
// - content.location.settings.weight.
// - content.location.settings.icon.
// - content.location.settings.leaflet_markercluster.
// - content.location.settings.feature_properties.
'core.entity_form_display.geo_entity.address.default',
'core.entity_form_display.geo_entity.address.inline',
// Missing schema:
// - content.postal_address.settings.providers.
// - content.postal_address.settings.geocode_geofield
'core.entity_form_display.localgov_geo.address.default',
'core.entity_form_display.localgov_geo.address.inline',
];

/**
* Test breadcrumbs in the Standard profile.
*
Expand Down
Loading

0 comments on commit 3a8cba5

Please sign in to comment.