diff --git a/.ddev/config.yaml b/.ddev/config.yaml index d7a5a726d1b1894cf863e3381a28983d76311d03..fc9e914cbe45a695330f5143192670bdc26e6fa9 100644 --- a/.ddev/config.yaml +++ b/.ddev/config.yaml @@ -15,10 +15,9 @@ corepack_enable: false ddev_version_constraint: '>= 1.24.0' hooks: post-start: + # If needed, regenerate `composer.json` and install dependencies. # @see homeadditions/bin/generate-composer-json - - exec: 'generate-composer-json > composer.json' - # Install all dependencies. - - composer: 'install' + - exec: 'test -d vendor || (generate-composer-json > composer.json && composer install)' # The installer is part of the project template, so symlink it into the web root. # It needs to be a relative symlink, or it will break Package Manager. - exec: 'ln -s -f $(realpath -s --relative-to=$DDEV_DOCROOT/profiles project_template/$DDEV_DOCROOT/profiles/drupal_cms_installer) $DDEV_DOCROOT/profiles' @@ -28,13 +27,16 @@ hooks: # https://docs.cypress.io/guides/getting-started/installing-cypress. - exec: 'test -d node_modules || npm clean-install --foreground-scripts' web_environment: + # If CANARY is set, Composer will install dev branches of all dependencies (be sure to + # run `ddev rebuild` if you change this). + # @see homeadditions/bin/generate-composer-json + # - CANARY=1 # For faster performance, don't audit dependencies automatically. - COMPOSER_NO_AUDIT=1 - # To display its UI, Cypress needs to be able to talk to an X11 server - # running on the host machine. + # To display its UI, Cypress needs to be able to talk to an X11 server running on the + # host machine. # - DISPLAY=host.docker.internal:0 - # Download Cypress to a directory that won't be blown away every time the - # project is restarted. + # Download Cypress where it won't be deleted every time the project is restarted. - CYPRESS_CACHE_FOLDER=/var/www/html/.cache/cypress # Use the DDEV-provided database to run PHPUnit tests. - SIMPLETEST_DB=$DDEV_DATABASE_FAMILY://db:db@db/db diff --git a/.ddev/homeadditions/bin/generate-composer-json b/.ddev/homeadditions/bin/generate-composer-json index 8eea04c4ea49638fd532eb9254699df57918dc02..8762732db5683a28dc66a780729d90f0fe194b9f 100755 --- a/.ddev/homeadditions/bin/generate-composer-json +++ b/.ddev/homeadditions/bin/generate-composer-json @@ -24,6 +24,12 @@ if (getenv('CI')) { }); } +// If we're in "canary" mode, allow dev versions of all dependencies. +if (getenv('CANARY')) { + $data['minimum-stability'] = 'dev'; + $data['prefer-stable'] = FALSE; +} + // Make packages.drupal.org the lowest-priority repository, which will force the // components' local path repositories to take precedence. $repository = $data['repositories']['drupal']; diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1d7c040fbf1f8608dcda7b9d847009dfc393bd5d..dcb6e123af9fec3eb00cec0bb256f46af28c92a8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -16,12 +16,6 @@ variables: - if: $CI_COMMIT_BRANCH =~ /^([0-9]+\.)?[0-9]+\.x$/ && $CI_PIPELINE_SOURCE == "push" && $CI_PROJECT_ROOT_NAMESPACE == "project" # Deploy when we push a tag. - if: $CI_COMMIT_TAG - # Deploy in scheduled nightly builds. - - if: $CI_PIPELINE_SOURCE == "schedule" - # Deploy when manually triggered via the web UI. - - if: $CI_PIPELINE_SOURCE == "web" - # Deploy when manually triggered via the Web IDE. - - if: $CI_PIPELINE_SOURCE == "webide" # Don't deploy in any other circumstance. - when: never @@ -30,6 +24,12 @@ workflow: rules: # Run on merge requests. - if: $CI_MERGE_REQUEST_IID || $CI_PIPELINE_SOURCE == 'merge_request_event' + # Run on a regular schedule (i.e., nightly builds). + - if: $CI_PIPELINE_SOURCE == "schedule" + # Run when manually triggered via the web UI. + - if: $CI_PIPELINE_SOURCE == "web" + # Run when manually triggered via the Web IDE. + - if: $CI_PIPELINE_SOURCE == "webide" # Also run in any circumstance where we'd do a deployment. - *deploy-rules @@ -111,6 +111,8 @@ build test project: - .ddev/homeadditions/bin/generate-composer-json > $BUILD_DIR/composer.json # Install dependencies. - composer install --working-dir=$BUILD_DIR + # Remove all `.git` directories in the built project. + - find $BUILD_DIR -depth -type d -name '.git' -exec rm -r -f {} ';' artifacts: paths: - $BUILD_DIR diff --git a/CODEOWNERS b/CODEOWNERS index 7fe5d6f8c342de1ab5d1fcd2dc9fc4f98a6afe0b..61aac1d97fb8a0c9cae813cc783044ac987cb5da 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -27,9 +27,6 @@ [accessibility track] @the_g_bomb /recipes/drupal_cms_accessibility_tools/ -[multilingual track] @pavlosdan -/recipes/drupal_cms_multilingual/ - [contact form track] @artinruins /recipes/drupal_cms_forms/ diff --git a/dev.composer.json b/dev.composer.json index fbf23a542e37e46ff80762b5edf4f130c2ea3329..47435af7717e8af1497a4e3ecdf6b9dc5c7bc50a 100644 --- a/dev.composer.json +++ b/dev.composer.json @@ -52,10 +52,6 @@ "type": "path", "url": "recipes/drupal_cms_image" }, - "multilingual": { - "type": "path", - "url": "recipes/drupal_cms_multilingual" - }, "news": { "type": "path", "url": "recipes/drupal_cms_news" diff --git a/drupal_cms_olivero/css/components/card.css b/drupal_cms_olivero/css/components/card.css index 76eff66f21e55d0cc0624626909b577d2c1024c4..1c82cdae3c5d1bcf35e8ccdf89d1bf2506209448 100644 --- a/drupal_cms_olivero/css/components/card.css +++ b/drupal_cms_olivero/css/components/card.css @@ -3,6 +3,7 @@ var(--grid-repeat, auto-fit), minmax(min(100%, var(--grid-min, 26ch)), 1fr) ); + gap: var(--sp2); } .views-row:has(> .teaser--card) { diff --git a/drupal_cms_olivero/css/layout/layout.css b/drupal_cms_olivero/css/layout/layout.css index 8e318da8c0545c1780deec18c3a9c0bad282457c..b39c8630761057fa5289d7ef684f5d9dcd71105d 100644 --- a/drupal_cms_olivero/css/layout/layout.css +++ b/drupal_cms_olivero/css/layout/layout.css @@ -1,5 +1,7 @@ -@media (min-width: 62.5rem) { - .layout--content-medium, .layout--pass--content-medium > * { - grid-column: 2 / 14; +.main-content { + @media (min-width: 62.5rem) { + .layout--content-medium, .layout--pass--content-medium > * { + grid-column: 2 / 14; + } } } diff --git a/package.json b/package.json index a26829aee49304287ec89c07c72df39a13bc04b3..737407f2dad44922d3d709b9992bbdb27251c4fa 100644 --- a/package.json +++ b/package.json @@ -13,5 +13,6 @@ "@testing-library/cypress": "^10.0.2", "chai-string": "^1.5.0", "cypress": "^13.15.0" - } + }, + "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e" } diff --git a/project_template/launch-drupal-cms.sh b/project_template/launch-drupal-cms.sh index b3e252c9d205f1b94b41e371deaef4558c06c458..c03642ea6611272ae1aa3dda6c5053a32820171f 100755 --- a/project_template/launch-drupal-cms.sh +++ b/project_template/launch-drupal-cms.sh @@ -18,7 +18,7 @@ if ! command -v ddev >/dev/null; then fi # Configure DDEV if not already done. -test -d .ddev || ddev config --project-type=drupal11 --docroot=web --php-version=8.3 +test -d .ddev || ddev config --project-type=drupal11 --docroot=web --php-version=8.3 --ddev-version-constraint=">=1.24.0" # Start your engines. ddev start # Install dependencies if not already done. diff --git a/project_template/web/profiles/drupal_cms_installer/drupal_cms_installer.profile b/project_template/web/profiles/drupal_cms_installer/drupal_cms_installer.profile index b7f69c0665c999cd3c96d329139e357f659ddf19..2efa9e6ce53e442ebaa10bea369fcf21ea4978ba 100644 --- a/project_template/web/profiles/drupal_cms_installer/drupal_cms_installer.profile +++ b/project_template/web/profiles/drupal_cms_installer/drupal_cms_installer.profile @@ -241,6 +241,8 @@ function drupal_cms_installer_apply_recipes(array &$install_state): array { ['install_path' => $cookbook_path] = InstalledVersions::getRootPackage(); $cookbook_path .= '/recipes'; + $recipe_operations = []; + foreach ($install_state['parameters']['recipes'] as $recipe) { $recipe = RecipeLoader::load( $cookbook_path . '/' . $recipe, @@ -249,11 +251,19 @@ function drupal_cms_installer_apply_recipes(array &$install_state): array { // installer performance for first-time users. (bool) getenv('DRUPAL_CMS_INSTALLER_WRITE_CACHE'), ); + $recipe_operations = array_merge($recipe_operations, RecipeRunner::toBatchOperations($recipe)); + } - foreach (RecipeRunner::toBatchOperations($recipe) as $operation) { + // Only do each recipe's batch operations once. + foreach ($recipe_operations as $operation) { + if (in_array($operation, $batch['operations'], TRUE)) { + continue; + } + else { $batch['operations'][] = $operation; } } + return $batch; } @@ -293,6 +303,14 @@ function drupal_cms_installer_uninstall_myself(): void { // Clear all previous status messages to avoid clutter. \Drupal::messenger()->deleteByType(MessengerInterface::TYPE_STATUS); + + // Invalidate the container in case any stray requests were made during the + // install process, which would have bootstrapped Drupal and cached the + // install-time container, which is now stale (during the installer, the + // container cannot be dumped, which would normally happen during the + // container rebuild triggered by uninstalling this profile). We do not want + // to redirect into Drupal with a stale container. + \Drupal::service('kernel')->invalidateContainer(); } /** diff --git a/recipes/drupal_cms_accessibility_tools/composer.json b/recipes/drupal_cms_accessibility_tools/composer.json index 360ee6091813850f30e5665e15c8335df6dfa07d..083c7db68c7ba5d1b517c0526515efd9c8079db9 100644 --- a/recipes/drupal_cms_accessibility_tools/composer.json +++ b/recipes/drupal_cms_accessibility_tools/composer.json @@ -1,6 +1,6 @@ { "name": "drupal/drupal_cms_accessibility_tools", - "description": "Installs and configures tools to help authors make their content accessible.", + "description": "Adds automated checks to help ensure content conforms to web accessibility guidelines.", "type": "drupal-recipe", "license": ["GPL-2.0-or-later"], "require": { diff --git a/recipes/drupal_cms_accessibility_tools/recipe.yml b/recipes/drupal_cms_accessibility_tools/recipe.yml index 4bbea33e6d9bbac38ac36b714eb2c2a8cc61a4eb..d4d7b7af6f75936696caaec164abd0a9cb6a4d8e 100644 --- a/recipes/drupal_cms_accessibility_tools/recipe.yml +++ b/recipes/drupal_cms_accessibility_tools/recipe.yml @@ -1,6 +1,6 @@ -name: Accessibility tools +name: Accessibility Tools type: Drupal CMS -description: Installs and configures tools to help authors make their content accessible. +description: Adds automated checks to help ensure content conforms to web accessibility guidelines. recipes: - drupal_cms_page install: diff --git a/recipes/drupal_cms_admin_ui/composer.json b/recipes/drupal_cms_admin_ui/composer.json index 698416d363f76a1131130f5607baa149b028a368..64b323d93920c1d83dea9debc33940e2a84e95e6 100644 --- a/recipes/drupal_cms_admin_ui/composer.json +++ b/recipes/drupal_cms_admin_ui/composer.json @@ -6,8 +6,7 @@ "require": { "drupal/coffee": "^2", "drupal/core": ">=10.3", - "drupal/gin": "^3-rc11", - "drupal/gin_toolbar": "^1-rc6", + "drupal/gin": "^4", "drupal/sam": "^1.2" } } diff --git a/recipes/drupal_cms_ai/composer.json b/recipes/drupal_cms_ai/composer.json index 0eed650fb56a1ab108600a78d386fb668c6dddfb..0ad2ced8e261f4d775eb7af2955c3c4d7072ed13 100644 --- a/recipes/drupal_cms_ai/composer.json +++ b/recipes/drupal_cms_ai/composer.json @@ -1,6 +1,6 @@ { "name": "drupal/drupal_cms_ai", - "description": "Adds possibility to have an admin chatbot with agents and helps with generating image alt text.", + "description": "Adds integration with AI services, such as alt text generation and a chat bot to assist with site building. Requires an API key from Open AI or Anthropic.", "type": "drupal-recipe", "license": "GPL-2.0-or-later", "require": { @@ -10,6 +10,7 @@ "drupal/ai_image_alt_text": "^1.0.0-beta1", "drupal/ai_provider_anthropic": "^1.0.0-beta1", "drupal/ai_provider_openai": "^1.0.0-beta1", + "drupal/drupal_cms_privacy_basic": "*", "league/commonmark": "^2.4" } } diff --git a/recipes/drupal_cms_ai/recipe.yml b/recipes/drupal_cms_ai/recipe.yml index 5890c01a9ae2abccb9cca10646c611ec9f1f5328..77008b0b26c45c66037a3f4b02e745e5fa4c29d0 100644 --- a/recipes/drupal_cms_ai/recipe.yml +++ b/recipes/drupal_cms_ai/recipe.yml @@ -1,6 +1,6 @@ -name: AI Support +name: AI Assistant type: Drupal CMS -description: 'Adds possibility to have an admin chatbot with agents and helps with generating image alt text.' +description: Adds integration with AI services, such as alt text generation and a chat bot to assist with site building. Requires an API key from Open AI or Anthropic. install: - key - block @@ -15,6 +15,7 @@ install: - menu_link_content recipes: - core/recipes/content_editor_role + - drupal_cms_privacy_basic config: import: ai_image_alt_text: '*' @@ -50,5 +51,9 @@ config: default_avatar: /core/misc/druplicon.png first_message: 'Hello! How can I assist you today?' show_structured_results: 1 + klaro.klaro_app.deepchat: + enable: [] + klaro.klaro_app.ai_alt_text_generation: + enable: [] user.role.content_editor: grantPermission: 'generate ai alt tags' diff --git a/recipes/drupal_cms_ai/tests/src/Functional/ComponentValidationTest.php b/recipes/drupal_cms_ai/tests/src/Functional/ComponentValidationTest.php index 140f632a31b8c735e156782b3ec0b6e511feadc3..ad11f9a0db65e51e28b5739f9e754b89f9694857 100644 --- a/recipes/drupal_cms_ai/tests/src/Functional/ComponentValidationTest.php +++ b/recipes/drupal_cms_ai/tests/src/Functional/ComponentValidationTest.php @@ -27,6 +27,13 @@ class ComponentValidationTest extends BrowserTestBase { $this->applyRecipe($dir); // Apply it again to prove that it is idempotent. $this->applyRecipe($dir); + + // The privacy settings should be available to anonymous users. + $this->drupalPlaceBlock('system_menu_block:footer', ['label' => 'Footer']); + $this->drupalGet('<front>'); + $footer_menu = $this->assertSession() + ->elementExists('css', 'nav > h2:contains("Footer") + ul'); + $this->assertTrue($footer_menu->hasLink('My privacy settings')); } } diff --git a/recipes/drupal_cms_analytics/composer.json b/recipes/drupal_cms_analytics/composer.json index 2b15700ab1eaceac9bf9f5a9dcab13bb6743db4c..f1e7140391c61b3189e346d563e54d589e4bb0dc 100644 --- a/recipes/drupal_cms_analytics/composer.json +++ b/recipes/drupal_cms_analytics/composer.json @@ -1,7 +1,7 @@ { "name": "drupal/drupal_cms_analytics", "type": "drupal-recipe", - "description": "Sets up tools to track the traffic to your website using Google Analytics and Google Tag Manager.", + "description": "Adds tracking of website traffic using Google Analytics and Google Tag Manager. Requires a Google Tag Manager ID.", "require": { "drupal/core": ">=10.3", "drupal/google_tag": "^2.0.7", diff --git a/recipes/drupal_cms_analytics/recipe.yml b/recipes/drupal_cms_analytics/recipe.yml index 83f8ee563c123039c1d4b844818b4e6d51e7187f..86a225f046d1875640af1bae970c1536aa97e770 100644 --- a/recipes/drupal_cms_analytics/recipe.yml +++ b/recipes/drupal_cms_analytics/recipe.yml @@ -1,13 +1,10 @@ name: Analytics type: Drupal CMS -description: Sets up tools to track the traffic to your website using Google Analytics and Google Tag Manager. - +description: Adds tracking of website traffic using Google Analytics and Google Tag Manager. Requires a Google Tag Manager ID. recipes: - drupal_cms_privacy_basic - install: - google_tag - input: property_id: data_type: string @@ -26,7 +23,6 @@ input: default: source: value value: '' - config: strict: false import: diff --git a/recipes/drupal_cms_anti_spam/recipe.yml b/recipes/drupal_cms_anti_spam/recipe.yml index 5225d8e348d6dd2a4ee97c4037193d1e7a009468..3e6e223346b07031cc5f4d739084e91ecb80b3d0 100644 --- a/recipes/drupal_cms_anti_spam/recipe.yml +++ b/recipes/drupal_cms_anti_spam/recipe.yml @@ -1,6 +1,6 @@ name: Anti-spam type: Drupal CMS -description: 'Sets up anti-spam and anti-abuse functionality.' +description: Sets up anti-spam and anti-abuse functionality. install: - antibot - captcha diff --git a/recipes/drupal_cms_authentication/recipe.yml b/recipes/drupal_cms_authentication/recipe.yml index eb5cab89435e6848eee8c733497d48b32dd6dc8f..845c9d8fbdb8e4b7f14579e9f73258f5b9726055 100644 --- a/recipes/drupal_cms_authentication/recipe.yml +++ b/recipes/drupal_cms_authentication/recipe.yml @@ -1,5 +1,5 @@ name: Authentication Tweaks -description: Sets up a site with useful authentication features. +description: Adds useful authentication features. type: Drupal CMS install: - bpmn_io diff --git a/recipes/drupal_cms_blog/composer.json b/recipes/drupal_cms_blog/composer.json index bf0c087d60ae4bc509233a135ecaf97a1eb2c85f..a68fa1720f20d5befb50aadf849c6f7b0979c61c 100644 --- a/recipes/drupal_cms_blog/composer.json +++ b/recipes/drupal_cms_blog/composer.json @@ -1,6 +1,6 @@ { "name": "drupal/drupal_cms_blog", - "description": "Sets up a basic blog, with tagging.", + "description": "Adds a blog post content type and listing page.", "type": "drupal-recipe", "license": ["GPL-2.0-or-later"], "require": { diff --git a/recipes/drupal_cms_blog/config/core.entity_view_display.node.blog.card.yml b/recipes/drupal_cms_blog/config/core.entity_view_display.node.blog.card.yml index 714ea57978843c7a3d41dbd792f13c2470ca15ae..1451a2d385ac2519db11928c1bbe79178caecf8b 100644 --- a/recipes/drupal_cms_blog/config/core.entity_view_display.node.blog.card.yml +++ b/recipes/drupal_cms_blog/config/core.entity_view_display.node.blog.card.yml @@ -36,13 +36,10 @@ content: third_party_settings: { } weight: 0 region: content - links: - settings: { } - third_party_settings: { } - weight: 2 - region: content hidden: + content_moderation_control: true field_content: true field_tags: true langcode: true layout_builder__layout: true + links: true diff --git a/recipes/drupal_cms_blog/config/core.entity_view_display.node.blog.default.yml b/recipes/drupal_cms_blog/config/core.entity_view_display.node.blog.default.yml index 78a0a23254aa0c868e0e3299fc5a8bc67fa55387..38bf7da60f61a22c7ff4108d8e5bd6e9ad65eb2d 100644 --- a/recipes/drupal_cms_blog/config/core.entity_view_display.node.blog.default.yml +++ b/recipes/drupal_cms_blog/config/core.entity_view_display.node.blog.default.yml @@ -11,6 +11,7 @@ dependencies: module: - layout_builder - layout_discovery + - media - text - user - views @@ -38,22 +39,7 @@ third_party_settings: settings: link: true third_party_settings: { } - weight: 2 - additional: { } - 0e9be297-1812-4215-b940-a61b7e808025: - uuid: 0e9be297-1812-4215-b940-a61b7e808025 - region: content - configuration: - id: 'field_block:node:blog:field_content' - label_display: '0' - context_mapping: - entity: layout_builder.entity - formatter: - type: text_default - label: hidden - settings: { } - third_party_settings: { } - weight: 3 + weight: 5 additional: { } 247faa8e-4645-40cb-9788-ff0e86ba8043: uuid: 247faa8e-4645-40cb-9788-ff0e86ba8043 @@ -67,15 +53,12 @@ third_party_settings: entity: layout_builder.entity view_mode: view_mode formatter: - type: media_thumbnail + type: entity_reference_entity_view label: hidden settings: - image_link: '' - image_style: '' - image_loading: - attribute: eager + view_mode: 16_9_wide third_party_settings: { } - weight: 1 + weight: 2 additional: { } db8679dc-7b6d-4de3-98bd-ce1ea24a3fbe: uuid: db8679dc-7b6d-4de3-98bd-ce1ea24a3fbe @@ -88,6 +71,31 @@ third_party_settings: context_mapping: { } views_label: '' items_per_page: none + weight: 6 + additional: { } + 774e5cfe-36b2-40ba-a5ff-13c821e3b9af: + uuid: 774e5cfe-36b2-40ba-a5ff-13c821e3b9af + region: content + configuration: + id: 'extra_field_block:node:blog:content_moderation_control' + label_display: '0' + context_mapping: + entity: layout_builder.entity + weight: 3 + additional: { } + 0e9be297-1812-4215-b940-a61b7e808025: + uuid: 0e9be297-1812-4215-b940-a61b7e808025 + region: content + configuration: + id: 'field_block:node:blog:field_content' + label_display: '0' + context_mapping: + entity: layout_builder.entity + formatter: + type: text_default + label: hidden + settings: { } + third_party_settings: { } weight: 4 additional: { } third_party_settings: { } @@ -96,6 +104,11 @@ targetEntityType: node bundle: blog mode: default content: + content_moderation_control: + settings: { } + third_party_settings: { } + weight: -20 + region: content field_content: type: text_default label: hidden diff --git a/recipes/drupal_cms_blog/config/core.entity_view_display.node.blog.teaser.yml b/recipes/drupal_cms_blog/config/core.entity_view_display.node.blog.teaser.yml index f6403e83b08b639bac5221381ea7c5a6e606b411..b30e4838245512703bf717b4e41524638cbb02ce 100644 --- a/recipes/drupal_cms_blog/config/core.entity_view_display.node.blog.teaser.yml +++ b/recipes/drupal_cms_blog/config/core.entity_view_display.node.blog.teaser.yml @@ -10,81 +10,11 @@ dependencies: - node.type.blog module: - layout_builder - - layout_discovery + - user third_party_settings: layout_builder: - enabled: true + enabled: false allow_custom: false - sections: - - - layout_id: layout_onecol - layout_settings: - label: '' - components: - 2e41f7bc-ca70-4d22-9170-baf2357d1c92: - uuid: 2e41f7bc-ca70-4d22-9170-baf2357d1c92 - region: content - configuration: - id: 'field_block:node:blog:field_description' - label_display: '0' - context_mapping: - entity: layout_builder.entity - formatter: - type: basic_string - label: hidden - settings: { } - third_party_settings: { } - weight: 2 - additional: { } - 4e73d7d9-e495-4c50-ba1e-a71e3dcced08: - uuid: 4e73d7d9-e495-4c50-ba1e-a71e3dcced08 - region: content - configuration: - id: 'field_block:node:blog:field_tags' - label_display: '0' - context_mapping: - entity: layout_builder.entity - formatter: - type: entity_reference_label - label: inline - settings: - link: true - third_party_settings: { } - weight: 3 - additional: { } - e02d3823-ef61-4b11-ae9b-6eec0fff3534: - uuid: e02d3823-ef61-4b11-ae9b-6eec0fff3534 - region: content - configuration: - id: 'extra_field_block:node:blog:links' - label_display: '0' - context_mapping: - entity: layout_builder.entity - weight: 4 - additional: { } - 47316592-c04d-4ade-975a-1a7075b4b026: - uuid: 47316592-c04d-4ade-975a-1a7075b4b026 - region: content - configuration: - id: 'field_block:node:blog:field_featured_image' - label: 'Featured image' - label_display: '0' - provider: layout_builder - context_mapping: - entity: layout_builder.entity - view_mode: view_mode - formatter: - type: media_thumbnail - label: hidden - settings: - image_link: '' - image_style: 1_1_300x300_focal_point_webp - image_loading: - attribute: lazy - third_party_settings: { } - weight: 1 - additional: { } - third_party_settings: { } id: node.blog.teaser targetEntityType: node bundle: blog @@ -101,24 +31,14 @@ content: type: entity_reference_entity_view label: hidden settings: - view_mode: small + view_mode: 4_3_medium link: false third_party_settings: { } weight: 0 region: content - field_tags: - type: entity_reference_label - label: inline - settings: - link: true - third_party_settings: { } - weight: 2 - region: content - links: - settings: { } - third_party_settings: { } - weight: 3 - region: content hidden: + content_moderation_control: true field_content: true + field_tags: true langcode: true + links: true diff --git a/recipes/drupal_cms_blog/config/node.type.blog.yml b/recipes/drupal_cms_blog/config/node.type.blog.yml index b8db0a2a70e28ef4b3d81bb6fc8f107ea7502f85..294e400a7a47ae7fd09f8567631b7b8d5a65f462 100644 --- a/recipes/drupal_cms_blog/config/node.type.blog.yml +++ b/recipes/drupal_cms_blog/config/node.type.blog.yml @@ -2,6 +2,7 @@ langcode: en status: true dependencies: module: + - menu_ui - scheduler third_party_settings: scheduler: @@ -17,6 +18,9 @@ third_party_settings: unpublish_enable: true unpublish_required: false unpublish_revision: true + menu_ui: + available_menus: { } + parent: '' name: 'Blog post' type: blog description: 'A simple blog entry, categorized by tags.' diff --git a/recipes/drupal_cms_blog/content/node/6487bdb6-221d-4662-ba25-51ca8e343cc1.yml b/recipes/drupal_cms_blog/content/node/6487bdb6-221d-4662-ba25-51ca8e343cc1.yml index f2e43a8f83d2b131fe94f5f76f3959b2a273269b..1782396265493a51e2b3b297f885bc0f938230f2 100644 --- a/recipes/drupal_cms_blog/content/node/6487bdb6-221d-4662-ba25-51ca8e343cc1.yml +++ b/recipes/drupal_cms_blog/content/node/6487bdb6-221d-4662-ba25-51ca8e343cc1.yml @@ -8,9 +8,15 @@ _meta: 4a5da968-6ecc-4d9c-a521-1666b95b2078: media d48adeba-e388-4e82-820b-98bbd2f35a46: taxonomy_term default: + revision_uid: + - + target_id: 1 status: - value: true + uid: + - + target_id: 1 title: - value: 'Building a blog using Drupal' @@ -23,17 +29,23 @@ default: sticky: - value: true + revision_translation_affected: + - + value: true + moderation_state: + - + value: published path: - alias: /blog/2024-08/building-blog-using-drupal langcode: en - field_description: - - - value: "How do you go about using Drupal to set up a blog. We'll tell you all about it." field_content: - - value: "<p>Content goes here.</p><p>Curabitur blandit tempus ardua ridiculus sed magna. Sed haec quis possit intrepidus aestimare tellus. Quisque ut dolor gravida, placerat libero vel, euismod. Plura mihi bona sunt, inclinet, amari petere vellent. Curabitur blandit tempus ardua ridiculus sed magna. Sed haec quis possit intrepidus aestimare tellus. Quisque ut dolor gravida, placerat libero vel, euismod. Plura mihi bona sunt, inclinet, amari petere vellent. Fictum, deserunt mollit anim laborum astutumque! Quisque placerat facilisis egestas cillum dolore. Nec dubitamus multa iter quae et nos invenerat. Contra legem facit qui id facit quod lex prohibet. Quam diu etiam furor iste tuus nos eludet?</p><p>Non equidem invideo, miror magis posuere velit aliquet. Quisque placerat facilisis egestas cillum dolore. Curabitur blandit tempus ardua ridiculus sed magna. Contra legem facit qui id facit quod lex prohibet. Petierunt uti sibi concilium totius Galliae in diem certam indicere.</p><p>Plura mihi bona sunt, inclinet, amari petere vellent. Ab illo tempore, ab est sed immemorabili. Ullamco laboris nisi ut aliquid ex ea commodi consequat. Quae vero auctorem tractata ab fiducia dicuntur. At nos hinc posthac, sitientis piros Afros. Fabio vel iudice vincam, sunt in culpa qui officia. Inmensae subtilitatis, obscuris et malesuada fames. Ambitioni dedisse scripsisse iudicaretur. Nec dubitamus multa iter quae et nos invenerat. Petierunt uti sibi concilium totius Galliae in diem certam indicere.</p>" + value: '<p>Content goes here.</p><p>Curabitur blandit tempus ardua ridiculus sed magna. Sed haec quis possit intrepidus aestimare tellus. Quisque ut dolor gravida, placerat libero vel, euismod. Plura mihi bona sunt, inclinet, amari petere vellent. Curabitur blandit tempus ardua ridiculus sed magna. Sed haec quis possit intrepidus aestimare tellus. Quisque ut dolor gravida, placerat libero vel, euismod. Plura mihi bona sunt, inclinet, amari petere vellent. Fictum, deserunt mollit anim laborum astutumque! Quisque placerat facilisis egestas cillum dolore. Nec dubitamus multa iter quae et nos invenerat. Contra legem facit qui id facit quod lex prohibet. Quam diu etiam furor iste tuus nos eludet?</p><p>Non equidem invideo, miror magis posuere velit aliquet. Quisque placerat facilisis egestas cillum dolore. Curabitur blandit tempus ardua ridiculus sed magna. Contra legem facit qui id facit quod lex prohibet. Petierunt uti sibi concilium totius Galliae in diem certam indicere.</p><p>Plura mihi bona sunt, inclinet, amari petere vellent. Ab illo tempore, ab est sed immemorabili. Ullamco laboris nisi ut aliquid ex ea commodi consequat. Quae vero auctorem tractata ab fiducia dicuntur. At nos hinc posthac, sitientis piros Afros. Fabio vel iudice vincam, sunt in culpa qui officia. Inmensae subtilitatis, obscuris et malesuada fames. Ambitioni dedisse scripsisse iudicaretur. Nec dubitamus multa iter quae et nos invenerat. Petierunt uti sibi concilium totius Galliae in diem certam indicere.</p>' format: content_format + field_description: + - + value: "How do you go about using Drupal to set up a blog. We'll tell you all about it." field_featured_image: - entity: 4a5da968-6ecc-4d9c-a521-1666b95b2078 diff --git a/recipes/drupal_cms_blog/recipe.yml b/recipes/drupal_cms_blog/recipe.yml index 46df359d31698e04f2bdce53bdbf2edb3101b8e6..bcbadedb267b04caae2dedd3ecac9aab64928c46 100644 --- a/recipes/drupal_cms_blog/recipe.yml +++ b/recipes/drupal_cms_blog/recipe.yml @@ -1,6 +1,6 @@ name: Blog type: Drupal CMS -description: 'Sets up a basic blog, with tagging.' +description: Adds a blog post content type and listing page. recipes: - drupal_cms_page - core/recipes/tags_taxonomy diff --git a/recipes/drupal_cms_case_study/composer.json b/recipes/drupal_cms_case_study/composer.json index 0b928add43b9a8129ad191ca9ff7268e6cbe277a..1e0894bd480ca05de360a60a5ab3aba595b78881 100644 --- a/recipes/drupal_cms_case_study/composer.json +++ b/recipes/drupal_cms_case_study/composer.json @@ -1,6 +1,6 @@ { "name": "drupal/drupal_cms_case_study", - "description": "Adds a Case study content type that provides detailed information about a subject to the intended audience.", + "description": "Adds a case study content type and listing page.", "type": "drupal-recipe", "license": ["GPL-2.0-or-later"], "require": { diff --git a/recipes/drupal_cms_case_study/config/core.entity_view_display.node.case_study.card.yml b/recipes/drupal_cms_case_study/config/core.entity_view_display.node.case_study.card.yml index 14dca7067e4e234eee8c6056b15b90c6ac56a38b..c21bee1fda98ec9dedb9cbd7b4b08596e219db49 100644 --- a/recipes/drupal_cms_case_study/config/core.entity_view_display.node.case_study.card.yml +++ b/recipes/drupal_cms_case_study/config/core.entity_view_display.node.case_study.card.yml @@ -3,19 +3,16 @@ status: true dependencies: config: - core.entity_view_mode.node.card - - field.field.node.case_study.field_content - field.field.node.case_study.field_case_study__client_link - field.field.node.case_study.field_case_study__client_logo - field.field.node.case_study.field_case_study__client_name + - field.field.node.case_study.field_content - field.field.node.case_study.field_description - field.field.node.case_study.field_featured_image - field.field.node.case_study.field_tags - node.type.case_study module: - layout_builder - - link - - media - - text - user third_party_settings: layout_builder: @@ -26,64 +23,35 @@ targetEntityType: node bundle: case_study mode: card content: - field_content: - type: text_default - label: hidden - settings: { } - third_party_settings: { } - weight: 2 - region: content - field_case_study__client_link: - type: link - label: inline - settings: - trim_length: 80 - url_only: false - url_plain: false - rel: '' - target: '' - third_party_settings: { } - weight: 5 - region: content - field_case_study__client_logo: - type: media_thumbnail - label: hidden - settings: - image_link: '' - image_style: uncropped_500w_webp - image_loading: - attribute: lazy - third_party_settings: { } - weight: 4 - region: content field_case_study__client_name: type: string label: hidden settings: link_to_entity: false third_party_settings: { } - weight: 3 + weight: 1 region: content - field_featured_image: - type: media_thumbnail + field_description: + type: basic_string label: hidden - settings: - image_link: '' - image_style: '' - image_loading: - attribute: eager + settings: { } third_party_settings: { } - weight: 0 + weight: 2 region: content - field_tags: - type: entity_reference_label + field_featured_image: + type: entity_reference_entity_view label: hidden settings: - link: true + view_mode: 4_3_medium + link: false third_party_settings: { } - weight: 1 + weight: 0 region: content hidden: - field_description: true + content_moderation_control: true + field_case_study__client_link: true + field_case_study__client_logo: true + field_content: true + field_tags: true langcode: true links: true diff --git a/recipes/drupal_cms_case_study/config/core.entity_view_display.node.case_study.default.yml b/recipes/drupal_cms_case_study/config/core.entity_view_display.node.case_study.default.yml index 4b59a15a033daffa0bfbf47cea970345d5719303..7e7c112c77a1bcb25cd16cccdb160fbb63226318 100644 --- a/recipes/drupal_cms_case_study/config/core.entity_view_display.node.case_study.default.yml +++ b/recipes/drupal_cms_case_study/config/core.entity_view_display.node.case_study.default.yml @@ -2,10 +2,10 @@ langcode: en status: true dependencies: config: - - field.field.node.case_study.field_content - field.field.node.case_study.field_case_study__client_link - field.field.node.case_study.field_case_study__client_logo - field.field.node.case_study.field_case_study__client_name + - field.field.node.case_study.field_content - field.field.node.case_study.field_description - field.field.node.case_study.field_featured_image - field.field.node.case_study.field_tags @@ -33,19 +33,19 @@ third_party_settings: region: content configuration: id: 'field_block:node:case_study:field_featured_image' + label: 'Featured image' label_display: '0' + provider: layout_builder context_mapping: entity: layout_builder.entity + view_mode: view_mode formatter: - type: media_thumbnail + type: entity_reference_entity_view label: hidden settings: - image_link: '' - image_style: '' - image_loading: - attribute: eager + view_mode: 16_9_wide third_party_settings: { } - weight: 0 + weight: 1 additional: { } df925eef-8afb-4f9a-8431-415d5b28e3c1: uuid: df925eef-8afb-4f9a-8431-415d5b28e3c1 @@ -61,19 +61,21 @@ third_party_settings: settings: link: true third_party_settings: { } - weight: 1 + weight: 7 + additional: { } + 8e28256f-9bba-4d3b-af40-8545a51b398b: + uuid: 8e28256f-9bba-4d3b-af40-8545a51b398b + region: content + configuration: + id: 'extra_field_block:node:case_study:content_moderation_control' + label_display: '0' + context_mapping: + entity: layout_builder.entity + weight: 2 additional: { } - third_party_settings: { } - - - layout_id: layout_twocol_section - layout_settings: - label: Content - context_mapping: { } - column_widths: 67-33 - components: 739968bb-5952-482a-a215-9a642ef92064: uuid: 739968bb-5952-482a-a215-9a642ef92064 - region: first + region: content configuration: id: 'field_block:node:case_study:field_content' label_display: '0' @@ -84,52 +86,52 @@ third_party_settings: label: hidden settings: { } third_party_settings: { } - weight: 0 + weight: 6 additional: { } - 996432cc-5668-42b7-a2f3-2b3977b390c4: - uuid: 996432cc-5668-42b7-a2f3-2b3977b390c4 - region: second + ac86ac5e-6b08-49e4-8ea7-b32f8be8084e: + uuid: ac86ac5e-6b08-49e4-8ea7-b32f8be8084e + region: content configuration: - id: 'field_block:node:case_study:field_case_study__client_name' - label: 'Client name' + id: 'field_block:node:case_study:field_case_study__client_logo' + label: 'Client logo' label_display: '0' provider: layout_builder context_mapping: entity: layout_builder.entity view_mode: view_mode formatter: - type: string + type: media_thumbnail label: hidden settings: - link_to_entity: false + image_link: '' + image_style: uncropped_500w_webp + image_loading: + attribute: lazy third_party_settings: { } - weight: 1 + weight: 3 additional: { } - ac86ac5e-6b08-49e4-8ea7-b32f8be8084e: - uuid: ac86ac5e-6b08-49e4-8ea7-b32f8be8084e - region: second + 996432cc-5668-42b7-a2f3-2b3977b390c4: + uuid: 996432cc-5668-42b7-a2f3-2b3977b390c4 + region: content configuration: - id: 'field_block:node:case_study:field_case_study__client_logo' - label: 'Client logo' + id: 'field_block:node:case_study:field_case_study__client_name' + label: 'Client name' label_display: '0' provider: layout_builder context_mapping: entity: layout_builder.entity view_mode: view_mode formatter: - type: media_thumbnail + type: string label: hidden settings: - image_link: '' - image_style: uncropped_500w_webp - image_loading: - attribute: lazy + link_to_entity: false third_party_settings: { } - weight: 0 + weight: 4 additional: { } 60cbfb7f-7ffb-4456-9488-6adc0c101abb: uuid: 60cbfb7f-7ffb-4456-9488-6adc0c101abb - region: second + region: content configuration: id: 'field_block:node:case_study:field_case_study__client_link' label: 'Client link' @@ -148,7 +150,7 @@ third_party_settings: rel: '0' target: _blank third_party_settings: { } - weight: 2 + weight: 5 additional: { } third_party_settings: { } id: node.case_study.default @@ -156,12 +158,10 @@ targetEntityType: node bundle: case_study mode: default content: - field_content: - type: text_default - label: hidden + content_moderation_control: settings: { } third_party_settings: { } - weight: 2 + weight: -20 region: content field_case_study__client_link: type: link @@ -194,6 +194,13 @@ content: third_party_settings: { } weight: 3 region: content + field_content: + type: text_default + label: hidden + settings: { } + third_party_settings: { } + weight: 2 + region: content field_featured_image: type: media_thumbnail label: hidden diff --git a/recipes/drupal_cms_case_study/config/core.entity_view_display.node.case_study.teaser.yml b/recipes/drupal_cms_case_study/config/core.entity_view_display.node.case_study.teaser.yml index 07ea7ae885bb9838cac5a0ac24ecb9e0a433d1eb..32d96de6688295e9e412db381ccbe0917ac7856e 100644 --- a/recipes/drupal_cms_case_study/config/core.entity_view_display.node.case_study.teaser.yml +++ b/recipes/drupal_cms_case_study/config/core.entity_view_display.node.case_study.teaser.yml @@ -3,91 +3,21 @@ status: true dependencies: config: - core.entity_view_mode.node.teaser - - field.field.node.case_study.field_content - field.field.node.case_study.field_case_study__client_link - field.field.node.case_study.field_case_study__client_logo - field.field.node.case_study.field_case_study__client_name + - field.field.node.case_study.field_content - field.field.node.case_study.field_description - field.field.node.case_study.field_featured_image - field.field.node.case_study.field_tags - - image.style.4_3_300x225_focal_point_webp - node.type.case_study module: - layout_builder - - layout_discovery - - media - user third_party_settings: layout_builder: - enabled: true + enabled: false allow_custom: false - sections: - - - layout_id: layout_onecol - layout_settings: - label: '' - components: - 14657eb7-cfc3-4591-b628-7b12914db4a4: - uuid: 14657eb7-cfc3-4591-b628-7b12914db4a4 - region: content - configuration: - id: 'field_block:node:case_study:field_featured_image' - label_display: '0' - context_mapping: - entity: layout_builder.entity - formatter: - type: media_thumbnail - label: hidden - settings: - image_link: '' - image_style: 4_3_300x225_focal_point_webp - image_loading: - attribute: lazy - third_party_settings: { } - weight: 0 - additional: { } - 3923c985-1c3c-4d77-a0ff-a9f9de71e485: - uuid: 3923c985-1c3c-4d77-a0ff-a9f9de71e485 - region: content - configuration: - id: 'field_block:node:case_study:field_description' - label_display: '0' - context_mapping: - entity: layout_builder.entity - formatter: - type: basic_string - label: hidden - settings: { } - third_party_settings: { } - weight: 1 - additional: { } - 65ac54dc-8847-477f-adbe-99bad4556f87: - uuid: 65ac54dc-8847-477f-adbe-99bad4556f87 - region: content - configuration: - id: 'field_block:node:case_study:field_tags' - label_display: '0' - context_mapping: - entity: layout_builder.entity - formatter: - type: entity_reference_label - label: inline - settings: - link: true - third_party_settings: { } - weight: 2 - additional: { } - 4e28b303-f0ff-483b-a32b-be600f61230c: - uuid: 4e28b303-f0ff-483b-a32b-be600f61230c - region: content - configuration: - id: 'extra_field_block:node:case_study:links' - label_display: '0' - context_mapping: - entity: layout_builder.entity - weight: 3 - additional: { } - third_party_settings: { } id: node.case_study.teaser targetEntityType: node bundle: case_study @@ -101,32 +31,20 @@ content: weight: 1 region: content field_featured_image: - type: media_thumbnail + type: entity_reference_entity_view label: hidden settings: - image_link: '' - image_style: 4_3_300x225_focal_point_webp - image_loading: - attribute: lazy + view_mode: 4_3_medium + link: false third_party_settings: { } weight: 0 region: content - field_tags: - type: entity_reference_label - label: inline - settings: - link: true - third_party_settings: { } - weight: 2 - region: content - links: - settings: { } - third_party_settings: { } - weight: 3 - region: content hidden: - field_content: true + content_moderation_control: true field_case_study__client_link: true field_case_study__client_logo: true field_case_study__client_name: true + field_content: true + field_tags: true langcode: true + links: true diff --git a/recipes/drupal_cms_case_study/config/node.type.case_study.yml b/recipes/drupal_cms_case_study/config/node.type.case_study.yml index b2a17b3257bccc9744157fb684c47ef83dabb254..3d21048b54a3c4d4c5274a976fc312758477722c 100644 --- a/recipes/drupal_cms_case_study/config/node.type.case_study.yml +++ b/recipes/drupal_cms_case_study/config/node.type.case_study.yml @@ -3,6 +3,7 @@ status: true dependencies: module: - scheduler + - menu_ui third_party_settings: scheduler: expand_fieldset: when_required @@ -17,6 +18,9 @@ third_party_settings: unpublish_enable: true unpublish_required: false unpublish_revision: true + menu_ui: + available_menus: { } + parent: '' name: 'Case study' type: case_study description: 'Case study content provides detailed information about a subject to the intended audience.' diff --git a/recipes/drupal_cms_case_study/recipe.yml b/recipes/drupal_cms_case_study/recipe.yml index edc65a4c4721e25caa943f6720fcf511de82ff23..449eeef1d8d0719ee07edee638cf2280573ae3fd 100644 --- a/recipes/drupal_cms_case_study/recipe.yml +++ b/recipes/drupal_cms_case_study/recipe.yml @@ -1,6 +1,6 @@ -name: 'Case studies' +name: Case Studies type: Drupal CMS -description: 'Adds a case study content type that provides detailed information about a subject to the intended audience.' +description: Adds a case study content type and listing page. recipes: - drupal_cms_page - core/recipes/tags_taxonomy diff --git a/recipes/drupal_cms_content_type_base/config/views.view.moderated_content.yml b/recipes/drupal_cms_content_type_base/config/views.view.moderated_content.yml new file mode 100644 index 0000000000000000000000000000000000000000..b4e0b2cbf36a2f48e79c03585708881f8ce24585 --- /dev/null +++ b/recipes/drupal_cms_content_type_base/config/views.view.moderated_content.yml @@ -0,0 +1,845 @@ +langcode: en +status: true +dependencies: + config: + - workflows.workflow.basic_editorial + module: + - content_moderation + - node + - user + enforced: + module: + - content_moderation +id: moderated_content +label: 'Moderated content' +module: views +description: 'Find and moderate content.' +tag: '' +base_table: node_field_revision +base_field: vid +display: + default: + id: default + display_title: Default + display_plugin: default + position: 0 + display_options: + title: 'Moderated content' + fields: + title: + id: title + table: node_field_revision + field: title + relationship: none + group_type: group + admin_label: '' + entity_type: node + entity_field: title + plugin_id: field + label: Title + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: false + ellipsis: false + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + click_sort_column: value + type: string + settings: + link_to_entity: true + group_column: value + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false + type: + id: type + table: node_field_data + field: type + relationship: nid + group_type: group + admin_label: '' + entity_type: node + entity_field: type + plugin_id: field + label: 'Content type' + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + click_sort_column: target_id + type: entity_reference_label + settings: + link: false + group_column: target_id + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false + name: + id: name + table: users_field_data + field: name + relationship: uid + group_type: group + admin_label: '' + entity_type: user + entity_field: name + plugin_id: field + label: Author + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + click_sort_column: value + type: user_name + settings: + link_to_entity: true + group_column: value + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false + moderation_state: + id: moderation_state + table: node_field_revision + field: moderation_state + relationship: none + group_type: group + admin_label: '' + entity_type: node + plugin_id: field + label: 'Moderation state' + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + click_sort_column: value + type: content_moderation_state + settings: { } + group_column: value + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false + changed: + id: changed + table: node_field_revision + field: changed + relationship: none + group_type: group + admin_label: '' + entity_type: node + entity_field: changed + plugin_id: field + label: Updated + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: false + ellipsis: false + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + click_sort_column: value + type: timestamp + settings: + date_format: short + custom_date_format: '' + timezone: '' + tooltip: + date_format: long + custom_date_format: '' + time_diff: + enabled: false + future_format: '@interval hence' + past_format: '@interval ago' + granularity: 2 + refresh: 60 + group_column: value + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false + operations: + id: operations + table: node_revision + field: operations + relationship: none + group_type: group + admin_label: '' + entity_type: node + plugin_id: entity_operations + label: Operations + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + destination: true + pager: + type: full + options: + offset: 0 + pagination_heading_level: h4 + items_per_page: 50 + total_pages: null + id: 0 + tags: + next: 'Next ›' + previous: '‹ Previous' + first: '« First' + last: 'Last »' + expose: + items_per_page: false + items_per_page_label: 'Items per page' + items_per_page_options: '5, 10, 25, 50' + items_per_page_options_all: false + items_per_page_options_all_label: '- All -' + offset: false + offset_label: Offset + quantity: 9 + exposed_form: + type: basic + options: + submit_button: Filter + reset_button: true + reset_button_label: Reset + exposed_sorts_label: 'Sort by' + expose_sort_order: true + sort_asc_label: Asc + sort_desc_label: Desc + access: + type: perm + options: + perm: 'view any unpublished content' + cache: + type: tag + options: { } + empty: + area_text_custom: + id: area_text_custom + table: views + field: area_text_custom + relationship: none + group_type: group + admin_label: '' + plugin_id: text_custom + empty: true + content: 'No moderated content available. Only pending versions of content, such as drafts, are listed here.' + tokenize: false + sorts: { } + arguments: { } + filters: + latest_translation_affected_revision: + id: latest_translation_affected_revision + table: node_revision + field: latest_translation_affected_revision + relationship: none + group_type: group + admin_label: '' + entity_type: node + plugin_id: latest_translation_affected_revision + operator: '=' + value: '' + group: 1 + exposed: false + expose: + operator_id: '' + label: '' + description: '' + use_operator: false + operator: '' + operator_limit_selection: false + operator_list: { } + identifier: '' + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + title: + id: title + table: node_field_revision + field: title + relationship: none + group_type: group + admin_label: '' + entity_type: node + entity_field: title + plugin_id: string + operator: contains + value: '' + group: 1 + exposed: true + expose: + operator_id: title_op + label: Title + description: '' + use_operator: false + operator: title_op + operator_limit_selection: false + operator_list: { } + identifier: title + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + anonymous: '0' + administrator: '0' + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + type: + id: type + table: node_field_data + field: type + relationship: nid + group_type: group + admin_label: '' + entity_type: node + entity_field: type + plugin_id: bundle + operator: in + value: { } + group: 1 + exposed: true + expose: + operator_id: type_op + label: 'Content type' + description: '' + use_operator: false + operator: type_op + operator_limit_selection: false + operator_list: { } + identifier: type + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + anonymous: '0' + administrator: '0' + reduce: false + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + moderation_state: + id: moderation_state + table: node_field_revision + field: moderation_state + relationship: none + group_type: group + admin_label: '' + entity_type: node + plugin_id: moderation_state_filter + operator: in + value: + editorial-draft: editorial-draft + editorial-archived: editorial-archived + group: 1 + exposed: true + expose: + operator_id: moderation_state_op + label: 'Moderation state' + description: '' + use_operator: false + operator: moderation_state_op + operator_limit_selection: false + operator_list: { } + identifier: moderation_state + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + anonymous: '0' + administrator: '0' + reduce: true + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + langcode: + id: langcode + table: node_field_revision + field: langcode + relationship: none + group_type: group + admin_label: '' + entity_type: node + entity_field: langcode + plugin_id: language + operator: in + value: { } + group: 1 + exposed: true + expose: + operator_id: langcode_op + label: Language + description: '' + use_operator: false + operator: langcode_op + operator_limit_selection: false + operator_list: { } + identifier: langcode + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + anonymous: '0' + administrator: '0' + reduce: false + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + moderation_state_1: + id: moderation_state_1 + table: node_field_revision + field: moderation_state + relationship: none + group_type: group + admin_label: '' + entity_type: node + plugin_id: moderation_state_filter + operator: 'not in' + value: + basic_editorial-published: basic_editorial-published + group: 1 + exposed: false + expose: + operator_id: '' + label: '' + description: '' + use_operator: false + operator: '' + operator_limit_selection: false + operator_list: { } + identifier: '' + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + reduce: false + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + filter_groups: + operator: AND + groups: + 1: AND + style: + type: table + options: + grouping: { } + row_class: '' + default_row_class: true + columns: + title: title + type: type + name: name + moderation_state: moderation_state + changed: changed + default: changed + info: + title: + sortable: true + default_sort_order: asc + align: '' + separator: '' + empty_column: false + responsive: '' + type: + sortable: true + default_sort_order: asc + align: '' + separator: '' + empty_column: false + responsive: '' + name: + sortable: false + default_sort_order: asc + align: '' + separator: '' + empty_column: false + responsive: '' + moderation_state: + sortable: true + default_sort_order: asc + align: '' + separator: '' + empty_column: false + responsive: '' + changed: + sortable: true + default_sort_order: desc + align: '' + separator: '' + empty_column: false + responsive: '' + override: true + sticky: true + summary: '' + empty_table: true + caption: '' + description: '' + row: + type: fields + query: + type: views_query + options: + query_comment: '' + disable_sql_rewrite: false + distinct: false + replica: false + query_tags: { } + relationships: + nid: + id: nid + table: node_field_revision + field: nid + relationship: none + group_type: group + admin_label: 'Get the actual content from a content revision.' + entity_type: node + entity_field: nid + plugin_id: standard + required: false + uid: + id: uid + table: node_field_revision + field: uid + relationship: none + group_type: group + admin_label: User + entity_type: node + entity_field: uid + plugin_id: standard + required: false + header: { } + footer: { } + display_extenders: { } + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - url + - url.query_args + - 'user.node_grants:view' + - user.permissions + tags: + - 'config:workflow_list' + moderated_content: + id: moderated_content + display_title: 'Moderated content' + display_plugin: page + position: 1 + display_options: + display_description: '' + display_extenders: { } + path: admin/content/moderated + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - url + - url.query_args + - 'user.node_grants:view' + - user.permissions + tags: + - 'config:workflow_list' diff --git a/recipes/drupal_cms_content_type_base/config/workflows.workflow.basic_editorial.yml b/recipes/drupal_cms_content_type_base/config/workflows.workflow.basic_editorial.yml index 11f48bd10644e2a86febf01fc29b1d7e76abe780..4046cb81fd58806a1ed12e2cc4422b612353c1f4 100644 --- a/recipes/drupal_cms_content_type_base/config/workflows.workflow.basic_editorial.yml +++ b/recipes/drupal_cms_content_type_base/config/workflows.workflow.basic_editorial.yml @@ -8,10 +8,10 @@ label: 'Basic' type: content_moderation type_settings: states: - archived: + unpublished: published: false default_revision: true - label: "Archived / Unpublished" + label: Unpublished weight: 1 draft: published: false @@ -24,24 +24,18 @@ type_settings: default_revision: true weight: 0 transitions: - archive: - label: "Archive / Unpublish" + unpublish: + label: Unpublish from: - published - to: archived + to: unpublished weight: 1 - archived_published: - label: "Restore from archive" - from: - - archived - to: published - weight: 3 create_new_draft: label: "Create new draft" to: draft weight: -1 from: - - archived + - unpublished - draft - published publish: @@ -51,5 +45,6 @@ type_settings: from: - draft - published + - unpublished default_moderation_state: draft entity_types: {} diff --git a/recipes/drupal_cms_content_type_base/recipe.yml b/recipes/drupal_cms_content_type_base/recipe.yml index a011af31f46865cb621b4baaece1826de8b619c6..9d465062f9fb06ca5c6640702382a6fb19a9c0dc 100644 --- a/recipes/drupal_cms_content_type_base/recipe.yml +++ b/recipes/drupal_cms_content_type_base/recipe.yml @@ -1,6 +1,6 @@ -name: 'Content Basics' +name: Content Basics type: Drupal CMS -description: 'Provides basic tools for creating content.' +description: Provides basic tools for creating content. recipes: - core/recipes/content_editor_role # The media library cannot be opened via CKEditor unless at least one media @@ -36,6 +36,8 @@ install: # so install these modules anyway. - field_ui - options + # Allow content types to configure whether editors can easily add menu links to them. + - menu_ui config: # Treat all field storages strictly, since they influence the database layout. strict: @@ -63,10 +65,8 @@ config: shortcut: - shortcut.set.default trash: '*' - content_moderation: - - views.view.moderated_content - scheduler: "*" - scheduler_content_moderation_integration: "*" + scheduler: '*' + scheduler_content_moderation_integration: '*' actions: autosave_form.settings: # Enable autosave for all content types. @@ -83,11 +83,17 @@ config: user.role.content_editor: grantPermissions: - 'access content overview' + - 'administer menu' - 'use text format content_format' - - 'use basic_editorial transition archive' + - 'use basic_editorial transition unpublish' - 'use basic_editorial transition create_new_draft' - 'use basic_editorial transition publish' - - 'use basic_editorial transition archived_published' - 'schedule publishing of nodes' - 'view any unpublished content' - 'view scheduled content' + # Disable the taxonomy and media scheduler views because they are not + # needed and break the navigation menu. + views.view.scheduler_scheduled_media: + disable: {} + views.view.scheduler_scheduled_taxonomy_term: + disable: {} diff --git a/recipes/drupal_cms_content_type_base/tests/src/Functional/ComponentValidationTest.php b/recipes/drupal_cms_content_type_base/tests/src/Functional/ComponentValidationTest.php index e8ef0c5c6420e83ac80e5c214c0ac0b65ae74fd7..6a8f675924ed8028a4071d762b6ee00e38f41ff7 100644 --- a/recipes/drupal_cms_content_type_base/tests/src/Functional/ComponentValidationTest.php +++ b/recipes/drupal_cms_content_type_base/tests/src/Functional/ComponentValidationTest.php @@ -54,6 +54,13 @@ class ComponentValidationTest extends BrowserTestBase { $this->assertTrue($node->isPublished()); $this->getSession()->reload(); $assert_session->statusCodeEquals(200); + + // Create another unpublished page and ensure we can see it in the + // list of moderated content. + $unpublished = $this->drupalCreateNode(['type' => 'page']); + $this->assertFalse($unpublished->isPublished()); + $this->drupalGet("/admin/content/moderated"); + $assert_session->linkExists($unpublished->getTitle()); } } diff --git a/recipes/drupal_cms_events/composer.json b/recipes/drupal_cms_events/composer.json index 0f9380997837ef8417eae63ac2f5ea91ad9d6973..4610d057e2b09cbc0e0dc08991642c9045046474 100644 --- a/recipes/drupal_cms_events/composer.json +++ b/recipes/drupal_cms_events/composer.json @@ -1,6 +1,6 @@ { "name": "drupal/drupal_cms_events", - "description": "A content type and view to help you manage events.", + "description": "Adds an event content type and listing page.", "type": "drupal-recipe", "license": ["GPL-2.0-or-later"], "require": { diff --git a/recipes/drupal_cms_events/config/core.entity_view_display.node.event.card.yml b/recipes/drupal_cms_events/config/core.entity_view_display.node.event.card.yml new file mode 100644 index 0000000000000000000000000000000000000000..592b714195d8d03ba4c3966bec110bcf48b84882 --- /dev/null +++ b/recipes/drupal_cms_events/config/core.entity_view_display.node.event.card.yml @@ -0,0 +1,144 @@ +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.card + - field.field.node.event.field_content + - field.field.node.event.field_description + - field.field.node.event.field_event__date + - field.field.node.event.field_event__file + - field.field.node.event.field_event__link + - field.field.node.event.field_event__location_address + - field.field.node.event.field_event__location_name + - field.field.node.event.field_featured_image + - field.field.node.event.field_geofield + - field.field.node.event.field_tags + - node.type.event + module: + - date_augmenter + - layout_builder + - media + - smart_date + - user +third_party_settings: + layout_builder: + enabled: false + allow_custom: false +id: node.event.card +targetEntityType: node +bundle: event +mode: card +content: + field_description: + type: basic_string + label: hidden + settings: { } + third_party_settings: { } + weight: 2 + region: content + field_event__date: + type: smartdate_default + label: hidden + settings: + timezone_override: '' + format_type: medium + format: default + force_chronological: false + add_classes: false + time_wrapper: true + localize: false + parts: + start: start + end: end + duration: '0' + duration: + separator: ' | ' + unit: '' + decimals: 2 + suffix: h + third_party_settings: + date_augmenter: + instances: + status: + addtocal: false + weights: + order: + addtocal: + weight: 0 + settings: + addtocal: + label: 'Add to calendar' + event_title: '' + location: '' + description: '' + retain_spacing: false + icons: true + max_desc: 60 + ellipsis: true + past_events: false + target: '' + ignore_timezone_if_UTC: true + augmenter_settings: + fields__field_event__date__settings_edit_form__third_party_settings__date_augmenter__instances__augmenter_settings__active_tab: '' + weight: 1 + region: content + field_featured_image: + type: media_thumbnail + label: hidden + settings: + image_link: '' + image_style: '' + image_loading: + attribute: eager + third_party_settings: { } + weight: 0 + region: content + field_when: + type: smartdate_default + label: above + settings: { } + third_party_settings: + date_augmenter: + instances: + status: + addtocal: true + weights: + order: + addtocal: + weight: 0 + settings: + addtocal: + label: 'Add to calendar' + event_title: '' + location: '' + description: '' + retain_spacing: false + icons: true + max_desc: 60 + ellipsis: true + past_events: false + target: '' + augmenter_settings: + fields__field_when__settings_edit_form__third_party_settings__date_augmenter__augmenter_settings__active_tab: '' + weight: 1 + region: content + field_where: + type: entity_reference_entity_view + label: above + settings: + view_mode: teaser + link: false + third_party_settings: { } + weight: 2 + region: content +hidden: + content_moderation_control: true + field_content: true + field_event__file: true + field_event__link: true + field_event__location_address: true + field_event__location_name: true + field_geofield: true + field_tags: true + langcode: true + links: true diff --git a/recipes/drupal_cms_events/config/core.entity_view_display.node.event.teaser.yml b/recipes/drupal_cms_events/config/core.entity_view_display.node.event.teaser.yml index 5f8432163f415e3664c1eec18bcc1745ec856e85..ecf91cf71e6a911459711536b4b84694944a6b2c 100644 --- a/recipes/drupal_cms_events/config/core.entity_view_display.node.event.teaser.yml +++ b/recipes/drupal_cms_events/config/core.entity_view_display.node.event.teaser.yml @@ -4,37 +4,50 @@ dependencies: config: - core.entity_view_mode.node.teaser - field.field.node.event.field_content - - field.field.node.event.field_event__date - field.field.node.event.field_description - - field.field.node.event.field_featured_image + - field.field.node.event.field_event__date - field.field.node.event.field_event__file - - field.field.node.event.field_geofield - field.field.node.event.field_event__link - field.field.node.event.field_event__location_address + - field.field.node.event.field_event__location_name + - field.field.node.event.field_featured_image + - field.field.node.event.field_geofield - field.field.node.event.field_tags - node.type.event module: - - address - - media - - text + - smart_date - user id: node.event.teaser targetEntityType: node bundle: event mode: teaser content: - field_content: - type: text_trimmed + field_description: + type: basic_string label: hidden - settings: - trim_length: 600 + settings: { } third_party_settings: { } weight: 2 region: content - field_description: - type: basic_string + field_event__date: + type: smartdate_default label: hidden - settings: { } + settings: + timezone_override: '' + format_type: medium + format: default + force_chronological: false + add_classes: false + time_wrapper: true + localize: false + parts: + - start + - end + duration: + separator: ' | ' + unit: '' + decimals: 2 + suffix: h third_party_settings: { } weight: 1 region: content @@ -47,21 +60,6 @@ content: third_party_settings: { } weight: 0 region: content - field_event__location_address: - type: address_default - label: hidden - settings: { } - third_party_settings: { } - weight: 2 - region: content - field_tags: - type: entity_reference_label - label: inline - settings: - link: true - third_party_settings: { } - weight: 2 - region: content field_when: type: smartdate_default label: inline @@ -78,11 +76,17 @@ content: weight: 1 region: content links: - weight: 100 + settings: { } + third_party_settings: { } + weight: 3 region: content hidden: - field_event__date: true + content_moderation_control: true + field_content: true field_event__file: true - field_geofield: true field_event__link: true + field_event__location_address: true + field_event__location_name: true + field_geofield: true + field_tags: true langcode: true diff --git a/recipes/drupal_cms_events/config/node.type.event.yml b/recipes/drupal_cms_events/config/node.type.event.yml index fef8fd4f8bf0a401a477aa53b10d2b3a0bc50da1..c6bd71104174dd6cb9860fd88b4236c923d17bad 100644 --- a/recipes/drupal_cms_events/config/node.type.event.yml +++ b/recipes/drupal_cms_events/config/node.type.event.yml @@ -3,6 +3,7 @@ status: true dependencies: module: - scheduler + - menu_ui third_party_settings: scheduler: expand_fieldset: when_required @@ -17,6 +18,9 @@ third_party_settings: unpublish_enable: true unpublish_required: false unpublish_revision: true + menu_ui: + available_menus: { } + parent: '' name: Event type: event description: 'Content which describes something happening at a specific time.' diff --git a/recipes/drupal_cms_events/config/views.view.events.yml b/recipes/drupal_cms_events/config/views.view.events.yml index 0a57f43b150e940353f1c7e69511f9a160864312..dd65ba4815f291a293f7c58024b89ebf470a5295 100644 --- a/recipes/drupal_cms_events/config/views.view.events.yml +++ b/recipes/drupal_cms_events/config/views.view.events.yml @@ -2,7 +2,7 @@ langcode: en status: true dependencies: config: - - core.entity_view_mode.node.teaser + - core.entity_view_mode.node.card - field.storage.node.field_event__date - node.type.event module: @@ -242,7 +242,8 @@ display: row: type: 'entity:node' options: - view_mode: teaser + relationship: none + view_mode: card query: type: views_query options: @@ -276,6 +277,7 @@ display: - 'languages:language_content' - 'languages:language_interface' - url.query_args + - user - 'user.node_grants:view' - user.permissions tags: { } @@ -293,6 +295,7 @@ display: - 'languages:language_content' - 'languages:language_interface' - url.query_args + - user - 'user.node_grants:view' - user.permissions tags: { } @@ -302,7 +305,7 @@ display: display_plugin: block position: 1 display_options: - title: 'Past Events' + title: 'Past events' sorts: field_event__date_value: id: field_event__date_value @@ -433,6 +436,7 @@ display: - 'languages:language_content' - 'languages:language_interface' - url.query_args + - user - 'user.node_grants:view' - user.permissions tags: { } @@ -600,6 +604,7 @@ display: contexts: - 'languages:language_content' - 'languages:language_interface' + - user - 'user.node_grants:view' - user.permissions tags: diff --git a/recipes/drupal_cms_events/file/601c1f74-4633-4069-ae90-57c645568b1c.yml b/recipes/drupal_cms_events/content/file/601c1f74-4633-4069-ae90-57c645568b1c.yml similarity index 73% rename from recipes/drupal_cms_events/file/601c1f74-4633-4069-ae90-57c645568b1c.yml rename to recipes/drupal_cms_events/content/file/601c1f74-4633-4069-ae90-57c645568b1c.yml index 6e4195b00d150bf0a3644961e5b8e0a28a52fba7..5f7f4ba4255eaf05016912f8ac3f5bc6296efc83 100644 --- a/recipes/drupal_cms_events/file/601c1f74-4633-4069-ae90-57c645568b1c.yml +++ b/recipes/drupal_cms_events/content/file/601c1f74-4633-4069-ae90-57c645568b1c.yml @@ -9,10 +9,10 @@ default: target_id: 1 filename: - - value: 'DrupalCon Atlanta.png' + value: 'DrupalCon-Atlanta.png' uri: - - value: 'public://2024-12/DrupalCon Atlanta.png' + value: 'public://2024-12/DrupalCon-Atlanta.png' filemime: - value: image/png @@ -24,4 +24,4 @@ default: value: true created: - - value: 1734408755 \ No newline at end of file + value: 1734408755 diff --git a/recipes/drupal_cms_events/file/DrupalCon Atlanta.png b/recipes/drupal_cms_events/content/file/DrupalCon-Atlanta.png similarity index 100% rename from recipes/drupal_cms_events/file/DrupalCon Atlanta.png rename to recipes/drupal_cms_events/content/file/DrupalCon-Atlanta.png diff --git a/recipes/drupal_cms_events/media/80952560-d94f-4925-b73f-988dd04d2dd8.yml b/recipes/drupal_cms_events/content/media/80952560-d94f-4925-b73f-988dd04d2dd8.yml similarity index 100% rename from recipes/drupal_cms_events/media/80952560-d94f-4925-b73f-988dd04d2dd8.yml rename to recipes/drupal_cms_events/content/media/80952560-d94f-4925-b73f-988dd04d2dd8.yml diff --git a/recipes/drupal_cms_events/recipe.yml b/recipes/drupal_cms_events/recipe.yml index a36a2d0677b12df3352ba0cdaa520aa131076770..8ec1b92cd0a76a828272abfda6ec3a77c119b683 100644 --- a/recipes/drupal_cms_events/recipe.yml +++ b/recipes/drupal_cms_events/recipe.yml @@ -1,6 +1,6 @@ -name: 'Events' -description: 'A content type and view to help you manage events.' -type: 'Drupal CMS' +name: Events +description: Adds an event content type and listing page. +type: Drupal CMS recipes: - core/recipes/document_media_type - core/recipes/tags_taxonomy diff --git a/recipes/drupal_cms_forms/composer.json b/recipes/drupal_cms_forms/composer.json index 687fe6ef23716d89a6d444e5bb1701b288e859f3..c18164246dd9569808adfc1bc806ef04dc2256d7 100644 --- a/recipes/drupal_cms_forms/composer.json +++ b/recipes/drupal_cms_forms/composer.json @@ -1,6 +1,6 @@ { "name": "drupal/drupal_cms_forms", - "description": "Provides a simple contact form, and tools for building more complex forms.", + "description": "Adds a simple contact form, and tools for building forms.", "type": "drupal-recipe", "license": ["GPL-2.0-or-later"], "require": { diff --git a/recipes/drupal_cms_forms/recipe.yml b/recipes/drupal_cms_forms/recipe.yml index e18e9cf8658e05c2022227e692ce6f17c3adf40f..f3ccbd3b7a0371a1e9143ca52249ba9f83fb3b84 100644 --- a/recipes/drupal_cms_forms/recipe.yml +++ b/recipes/drupal_cms_forms/recipe.yml @@ -1,6 +1,6 @@ name: Forms type: Drupal CMS -description: Provides a simple contact form, and tools for building more complex forms. +description: Adds a simple contact form, and tools for building forms. recipes: - drupal_cms_anti_spam - drupal_cms_page diff --git a/recipes/drupal_cms_image/config/image.style.media_library_square_thumbnail.yml b/recipes/drupal_cms_image/config/image.style.media_library_square_thumbnail.yml new file mode 100644 index 0000000000000000000000000000000000000000..5af7f7c6bf46db30be483fed1bb8757c677b5ea0 --- /dev/null +++ b/recipes/drupal_cms_image/config/image.style.media_library_square_thumbnail.yml @@ -0,0 +1,22 @@ +langcode: en +status: true +dependencies: + module: + - focal_point +name: media_library_square_thumbnail +label: 'Media Library Square Thumbnail' +effects: + e1133a5d-4918-4fd3-8b1e-c4b21222cc59: + uuid: e1133a5d-4918-4fd3-8b1e-c4b21222cc59 + id: image_convert + weight: -9 + data: + extension: webp + 10aaa04e-b821-481e-8555-5c29088daa27: + uuid: 10aaa04e-b821-481e-8555-5c29088daa27 + id: focal_point_scale_and_crop + weight: -10 + data: + width: 220 + height: 220 + crop_type: focal_point diff --git a/recipes/drupal_cms_image/recipe.yml b/recipes/drupal_cms_image/recipe.yml index ee4f5c7de11ea292fd9811675c9104832e850031..1b427b10a2438e4205ec4a5fa474497150b78794 100644 --- a/recipes/drupal_cms_image/recipe.yml +++ b/recipes/drupal_cms_image/recipe.yml @@ -1,6 +1,6 @@ name: Images type: Drupal CMS -description: 'Sets up base image configuration including responsive image styles, view modes, focal point-based cropping and SVG images.' +description: Sets up base image configuration including responsive image styles, view modes, focal point-based cropping and SVG images. recipes: - core/recipes/image_media_type install: @@ -38,6 +38,12 @@ config: - langcode - path - created + core.entity_view_display.media.image.media_library: + setComponent: + name: thumbnail + options: + settings: + image_style: media_library_square_thumbnail # Disable the `files` view because it is not clear to most users what the # difference is between "Files" and "Media". We favor media. views.view.files: diff --git a/recipes/drupal_cms_multilingual/LICENSE.txt b/recipes/drupal_cms_multilingual/LICENSE.txt deleted file mode 100644 index 94fb84639c4b6ff359e47a124d8fb4a3aba7a386..0000000000000000000000000000000000000000 --- a/recipes/drupal_cms_multilingual/LICENSE.txt +++ /dev/null @@ -1,339 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Lesser General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - <one line to give the program's name and a brief idea of what it does.> - Copyright (C) <year> <name of author> - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - <signature of Ty Coon>, 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. diff --git a/recipes/drupal_cms_multilingual/composer.json b/recipes/drupal_cms_multilingual/composer.json deleted file mode 100644 index f3d3b421ad0e63c5cf012e6f72b14b415c457548..0000000000000000000000000000000000000000 --- a/recipes/drupal_cms_multilingual/composer.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "drupal/drupal_cms_multilingual", - "description": "Configures multilingual support for all content types.", - "type": "drupal-recipe", - "license": ["GPL-2.0-or-later"], - "require": { - "drupal/core": ">=10.4", - "drupal/hreflang": "^1.14" - } -} diff --git a/recipes/drupal_cms_multilingual/recipe.yml b/recipes/drupal_cms_multilingual/recipe.yml deleted file mode 100644 index f4113ad4442d7c9504699e690a3571e8731c5d0b..0000000000000000000000000000000000000000 --- a/recipes/drupal_cms_multilingual/recipe.yml +++ /dev/null @@ -1,45 +0,0 @@ -name: Multilingual support -type: Drupal CMS -description: Adds support for translations to all content types. -recipes: - - core/recipes/content_editor_role -install: - - content_translation - - hreflang - - language - - node -config: - import: - language: '*' - actions: - core.entity_form_display.node.*.default: - setComponent: - name: langcode - options: - type: language_select - weight: 2 - region: content - node.type.*: - createForEachIfNotExists: - 'language.content_settings.node.%bundle': - target_entity_type_id: node - target_bundle: '%bundle' - language_alterable: true - language.content_settings.node.*: - setThirdPartySettings: - - - module: content_translation - key: enabled - value: true - - - module: content_translation - key: bundle_settings - value: - untranslatable_fields_hide: '1' - user.role.content_editor: - grantPermissions: - - 'create content translations' - - 'delete content translations' - - 'update content translations' - grantPermissionsForEachNodeType: - - 'translate %bundle node' diff --git a/recipes/drupal_cms_multilingual/tests/src/Functional/ComponentValidationTest.php b/recipes/drupal_cms_multilingual/tests/src/Functional/ComponentValidationTest.php deleted file mode 100644 index c15305e12ae43381ca48e8e03844b0637bb0e623..0000000000000000000000000000000000000000 --- a/recipes/drupal_cms_multilingual/tests/src/Functional/ComponentValidationTest.php +++ /dev/null @@ -1,58 +0,0 @@ -<?php - -declare(strict_types=1); - -namespace Drupal\Tests\drupal_cms_multilingual\Functional; - -use Drupal\FunctionalTests\Core\Recipe\RecipeTestTrait; -use Drupal\language\Entity\ConfigurableLanguage; -use Drupal\Tests\BrowserTestBase; - -/** - * @group drupal_cms_multilingual - */ -class ComponentValidationTest extends BrowserTestBase { - - use RecipeTestTrait; - - /** - * {@inheritdoc} - */ - protected $defaultTheme = 'stark'; - - /** - * {@inheritdoc} - */ - protected static $modules = ['filter_test', 'node']; - - /** - * {@inheritdoc} - */ - protected function setUp(): void { - parent::setUp(); - - $dir = realpath(__DIR__ . '/../../..'); - - // The recipe should apply cleanly. - $this->applyRecipe($dir); - // Apply it again to prove that it is idempotent. - $this->applyRecipe($dir); - - $this->drupalCreateContentType(['type' => 'page']); - } - - public function testHreflangAddedToTranslatedContent(): void { - ConfigurableLanguage::createFromLangcode('fr')->save(); - - $node = $this->drupalCreateNode(['type' => 'page']); - $translation = $node->addTranslation('fr')->setTitle('Le traduction'); - $translation->save(); - - $this->drupalGet($node->toUrl()); - // Although there are two languages enabled, there is also an "x-default" - // alternate link. We don't need to inspect these links more closely; we can - // trust the Hreflang module to do its job. - $this->assertSession()->elementsCount('css', 'link[rel="alternate"][hreflang]', 3); - } - -} diff --git a/recipes/drupal_cms_news/composer.json b/recipes/drupal_cms_news/composer.json index 9b194d96f2d5751cd74c62fcb5c8a58253cb99f6..f1132dd99ca2397aee5a84b56eb4deb805d56b54 100644 --- a/recipes/drupal_cms_news/composer.json +++ b/recipes/drupal_cms_news/composer.json @@ -1,6 +1,6 @@ { "name": "drupal/drupal_cms_news", - "description": "Adds a news content type with an overview page and related news items.", + "description": "Adds a news content type and listing page.", "type": "drupal-recipe", "license": ["GPL-2.0-or-later"], "require": { diff --git a/recipes/drupal_cms_news/config/core.entity_view_display.node.news.card.yml b/recipes/drupal_cms_news/config/core.entity_view_display.node.news.card.yml index b3bd77a81e08191c47703d5b1a4a73ee87bbb874..53c840a5cafb4eae97cb628a8de87b08cf8970ff 100644 --- a/recipes/drupal_cms_news/config/core.entity_view_display.node.news.card.yml +++ b/recipes/drupal_cms_news/config/core.entity_view_display.node.news.card.yml @@ -36,12 +36,9 @@ content: third_party_settings: { } weight: 0 region: content - links: - settings: { } - third_party_settings: { } - weight: 2 - region: content hidden: + content_moderation_control: true field_content: true field_tags: true langcode: true + links: true diff --git a/recipes/drupal_cms_news/config/core.entity_view_display.node.news.default.yml b/recipes/drupal_cms_news/config/core.entity_view_display.node.news.default.yml index b71d535ff965c0d517ea3b20bf67f01264b0fc13..df12d6c6b294d8cbb9c13993cb6a000f8c302676 100644 --- a/recipes/drupal_cms_news/config/core.entity_view_display.node.news.default.yml +++ b/recipes/drupal_cms_news/config/core.entity_view_display.node.news.default.yml @@ -24,38 +24,22 @@ third_party_settings: layout_settings: label: '' components: - 68ad074b-b045-43f3-b4ea-c89278e5a851: - uuid: 68ad074b-b045-43f3-b4ea-c89278e5a851 - region: content - configuration: - id: 'field_block:node:news:field_tags' - label_display: '0' - context_mapping: - entity: layout_builder.entity - formatter: - type: entity_reference_label - label: inline - settings: - link: true - third_party_settings: { } - weight: 0 - additional: { } ef3dbec3-d4c2-481e-ae4e-526297acceed: uuid: ef3dbec3-d4c2-481e-ae4e-526297acceed region: content configuration: id: 'field_block:node:news:field_featured_image' + label: 'Featured image' label_display: '0' + provider: layout_builder context_mapping: entity: layout_builder.entity + view_mode: view_mode formatter: - type: media_thumbnail + type: entity_reference_entity_view label: hidden settings: - image_link: '' - image_style: '' - image_loading: - attribute: eager + view_mode: 16_9_wide third_party_settings: { } weight: 1 additional: { } @@ -72,7 +56,7 @@ third_party_settings: label: hidden settings: { } third_party_settings: { } - weight: 2 + weight: 3 additional: { } 43617bd8-2ce9-44c6-975e-1512223b14ea: uuid: 43617bd8-2ce9-44c6-975e-1512223b14ea @@ -85,7 +69,33 @@ third_party_settings: context_mapping: { } views_label: '' items_per_page: none - weight: 3 + weight: 5 + additional: { } + 68ad074b-b045-43f3-b4ea-c89278e5a851: + uuid: 68ad074b-b045-43f3-b4ea-c89278e5a851 + region: content + configuration: + id: 'field_block:node:news:field_tags' + label_display: '0' + context_mapping: + entity: layout_builder.entity + formatter: + type: entity_reference_label + label: inline + settings: + link: true + third_party_settings: { } + weight: 4 + additional: { } + bbd9bda8-e7fd-49dc-9113-3ac04c14aae9: + uuid: bbd9bda8-e7fd-49dc-9113-3ac04c14aae9 + region: content + configuration: + id: 'extra_field_block:node:news:content_moderation_control' + label_display: '0' + context_mapping: + entity: layout_builder.entity + weight: 2 additional: { } third_party_settings: { } id: node.news.default @@ -93,6 +103,11 @@ targetEntityType: node bundle: news mode: default content: + content_moderation_control: + settings: { } + third_party_settings: { } + weight: -20 + region: content field_content: type: text_default label: hidden diff --git a/recipes/drupal_cms_news/config/core.entity_view_display.node.news.teaser.yml b/recipes/drupal_cms_news/config/core.entity_view_display.node.news.teaser.yml index bda2a5cd34207c0d84fda7855b6a270bc70200a6..33ec527fc6c3ade8ee240fd112c1a7f80947f51c 100644 --- a/recipes/drupal_cms_news/config/core.entity_view_display.node.news.teaser.yml +++ b/recipes/drupal_cms_news/config/core.entity_view_display.node.news.teaser.yml @@ -10,79 +10,11 @@ dependencies: - node.type.news module: - layout_builder - - media - user third_party_settings: layout_builder: - enabled: true + enabled: false allow_custom: false - sections: - - - layout_id: layout_onecol - layout_settings: - label: '' - components: - 74b4dd08-5186-410e-8051-32d7ab03084f: - uuid: 74b4dd08-5186-410e-8051-32d7ab03084f - region: content - configuration: - id: 'field_block:node:news:field_featured_image' - label_display: '0' - context_mapping: - entity: layout_builder.entity - formatter: - type: media_thumbnail - label: hidden - settings: - image_link: '' - image_style: 1_1_300x300_focal_point_webp - image_loading: - attribute: lazy - third_party_settings: { } - weight: 0 - additional: { } - 5e828f0c-8ac9-4472-bf84-0fa4e111cc37: - uuid: 5e828f0c-8ac9-4472-bf84-0fa4e111cc37 - region: content - configuration: - id: 'field_block:node:news:field_description' - label_display: '0' - context_mapping: - entity: layout_builder.entity - formatter: - type: basic_string - label: hidden - settings: { } - third_party_settings: { } - weight: 1 - additional: { } - 8e3f0b70-30ce-4a96-bd97-43b4c99f339e: - uuid: 8e3f0b70-30ce-4a96-bd97-43b4c99f339e - region: content - configuration: - id: 'field_block:node:news:field_tags' - label_display: '0' - context_mapping: - entity: layout_builder.entity - formatter: - type: entity_reference_label - label: inline - settings: - link: true - third_party_settings: { } - weight: 2 - additional: { } - 91fb4d49-4984-43ea-9cd6-5489b2416e74: - uuid: 91fb4d49-4984-43ea-9cd6-5489b2416e74 - region: content - configuration: - id: 'extra_field_block:node:news:links' - label_display: '0' - context_mapping: - entity: layout_builder.entity - weight: 3 - additional: { } - third_party_settings: { } id: node.news.teaser targetEntityType: node bundle: news @@ -99,24 +31,14 @@ content: type: entity_reference_entity_view label: hidden settings: - view_mode: small + view_mode: 4_3_medium link: false third_party_settings: { } weight: 0 region: content - field_tags: - type: entity_reference_label - label: inline - settings: - link: true - third_party_settings: { } - weight: 2 - region: content - links: - settings: { } - third_party_settings: { } - weight: 3 - region: content hidden: + content_moderation_control: true field_content: true + field_tags: true langcode: true + links: true diff --git a/recipes/drupal_cms_news/config/node.type.news.yml b/recipes/drupal_cms_news/config/node.type.news.yml index d8075709fbb2741a124a9b6ba4d860aa4d983e3c..536e9e0b1a652a8db421e2d47df6d47fc30b2a86 100644 --- a/recipes/drupal_cms_news/config/node.type.news.yml +++ b/recipes/drupal_cms_news/config/node.type.news.yml @@ -3,6 +3,7 @@ status: true dependencies: module: - scheduler + - menu_ui third_party_settings: scheduler: expand_fieldset: when_required @@ -17,6 +18,9 @@ third_party_settings: unpublish_enable: true unpublish_required: false unpublish_revision: true + menu_ui: + available_menus: { } + parent: '' name: 'News item' type: news description: 'A simple news item, categorized by tags.' diff --git a/recipes/drupal_cms_news/recipe.yml b/recipes/drupal_cms_news/recipe.yml index a918767f1635929b66585d8605c5111ef57d63b1..f3679c4a1aad570a688790c45d4b5acd8ab4fa6e 100644 --- a/recipes/drupal_cms_news/recipe.yml +++ b/recipes/drupal_cms_news/recipe.yml @@ -1,6 +1,6 @@ name: News type: Drupal CMS -description: 'Adds a news content type with an overview page and related news items.' +description: Adds a news content type and listing page. recipes: - drupal_cms_page - core/recipes/tags_taxonomy diff --git a/recipes/drupal_cms_page/composer.json b/recipes/drupal_cms_page/composer.json index bba455e11cf8e8217da3efff870c9e21eb100722..6232b87dbc0bc8b0d2a2e4ee6e3808826d1cc46e 100644 --- a/recipes/drupal_cms_page/composer.json +++ b/recipes/drupal_cms_page/composer.json @@ -1,6 +1,6 @@ { "name": "drupal/drupal_cms_page", - "description": "A basic content type to create simple pages.", + "description": "Adds a content type for simple pages.", "type": "drupal-recipe", "license": ["GPL-2.0-or-later"], "require": { diff --git a/recipes/drupal_cms_page/config/core.entity_view_display.node.page.card.yml b/recipes/drupal_cms_page/config/core.entity_view_display.node.page.card.yml index 39ece7bf853d83467e3420e9c5febc402b47714f..a436757bad94f3a326cd6ff287756cbefc48eb46 100644 --- a/recipes/drupal_cms_page/config/core.entity_view_display.node.page.card.yml +++ b/recipes/drupal_cms_page/config/core.entity_view_display.node.page.card.yml @@ -11,7 +11,6 @@ dependencies: - node.type.page module: - layout_builder - - text - user third_party_settings: layout_builder: @@ -22,21 +21,26 @@ targetEntityType: node bundle: page mode: card content: - field_content: - type: text_default + field_description: + type: basic_string label: hidden settings: { } third_party_settings: { } - weight: 100 + weight: 1 region: content - links: - settings: { } + field_featured_image: + type: entity_reference_entity_view + label: hidden + settings: + view_mode: 16_9_medium + link: false third_party_settings: { } - weight: 101 + weight: 0 region: content hidden: - field_description: true - field_featured_image: true + content_moderation_control: true + field_content: true field_tags: true langcode: true layout_builder__layout: true + links: true diff --git a/recipes/drupal_cms_page/config/core.entity_view_display.node.page.default.yml b/recipes/drupal_cms_page/config/core.entity_view_display.node.page.default.yml index 3eeccc9321a72a5ffc809e1f6b61252b8b239012..2fac30df84f40d3c873c03d62a16e6aa2048fec0 100644 --- a/recipes/drupal_cms_page/config/core.entity_view_display.node.page.default.yml +++ b/recipes/drupal_cms_page/config/core.entity_view_display.node.page.default.yml @@ -36,7 +36,7 @@ third_party_settings: label: hidden settings: { } third_party_settings: { } - weight: 0 + weight: 2 additional: { } eab74fa2-cc48-4424-b6f0-43cf82401880: uuid: eab74fa2-cc48-4424-b6f0-43cf82401880 @@ -46,14 +46,48 @@ third_party_settings: label_display: '0' context_mapping: entity: layout_builder.entity + weight: 3 + additional: { } + b09072a1-7bd8-49c5-ac58-2da953562e12: + uuid: b09072a1-7bd8-49c5-ac58-2da953562e12 + region: content + configuration: + id: 'extra_field_block:node:page:content_moderation_control' + label_display: '0' + context_mapping: + entity: layout_builder.entity weight: 1 additional: { } + bfcb27c2-a42f-4e71-bf84-1841a548d5a6: + uuid: bfcb27c2-a42f-4e71-bf84-1841a548d5a6 + region: content + configuration: + id: 'field_block:node:page:field_featured_image' + label: 'Featured image' + label_display: '0' + provider: layout_builder + context_mapping: + entity: layout_builder.entity + view_mode: view_mode + formatter: + type: entity_reference_entity_view + label: hidden + settings: + view_mode: 16_9_wide + third_party_settings: { } + weight: 0 + additional: { } third_party_settings: { } id: node.page.default targetEntityType: node bundle: page mode: default content: + content_moderation_control: + settings: { } + third_party_settings: { } + weight: -20 + region: content field_content: type: text_default label: hidden @@ -70,4 +104,5 @@ hidden: field_description: true field_featured_image: true field_tags: true + langcode: true layout_builder__layout: true diff --git a/recipes/drupal_cms_page/config/core.entity_view_display.node.page.teaser.yml b/recipes/drupal_cms_page/config/core.entity_view_display.node.page.teaser.yml index 42174fb9c5a1c7bb8017781d3551a7b9575888ef..fc51d9166eec5ac06985ea2dcd352417ef40488f 100644 --- a/recipes/drupal_cms_page/config/core.entity_view_display.node.page.teaser.yml +++ b/recipes/drupal_cms_page/config/core.entity_view_display.node.page.teaser.yml @@ -10,26 +10,32 @@ dependencies: - field.field.node.page.layout_builder__layout - node.type.page module: - - text - user id: node.page.teaser targetEntityType: node bundle: page mode: teaser content: - field_content: - type: text_trimmed + field_description: + type: basic_string label: hidden - settings: - trim_length: 600 + settings: { } third_party_settings: { } - weight: 100 + weight: 1 region: content - links: - weight: 101 + field_featured_image: + type: entity_reference_entity_view + label: hidden + settings: + view_mode: 4_3_medium + link: false + third_party_settings: { } + weight: 0 region: content hidden: - field_description: true - field_featured_image: true + content_moderation_control: true + field_content: true field_tags: true + langcode: true layout_builder__layout: true + links: true diff --git a/recipes/drupal_cms_page/recipe.yml b/recipes/drupal_cms_page/recipe.yml index 82bbd789cf7061ebedf7f6d3bcb935300625a2a0..243db95e79ad47e77c256f549cf0133f60cd4bfb 100644 --- a/recipes/drupal_cms_page/recipe.yml +++ b/recipes/drupal_cms_page/recipe.yml @@ -1,6 +1,6 @@ -name: 'Page' -description: 'A basic content type to create simple pages.' -type: 'Drupal CMS' +name: Basic page +type: Drupal CMS +description: Adds a content type for simple pages. recipes: - core/recipes/tags_taxonomy - drupal_cms_content_type_base diff --git a/recipes/drupal_cms_page/tests/src/Functional/StandardTest.php b/recipes/drupal_cms_page/tests/src/Functional/StandardTest.php index 6dc09222620307069baf8d64bb056ea1cecaf952..d0e4c27fc9456eaad2f830442d689b4718178084 100644 --- a/recipes/drupal_cms_page/tests/src/Functional/StandardTest.php +++ b/recipes/drupal_cms_page/tests/src/Functional/StandardTest.php @@ -37,7 +37,7 @@ class StandardTest extends BrowserTestBase { $assert_session = $this->assertSession(); $assert_session->statusCodeEquals(200); $assert_session->fieldNotExists('Content'); - $assert_session->fieldNotExists('Description'); + $assert_session->fieldNotExists('field_description[0][value]'); $assert_session->fieldNotExists('Featured image'); $assert_session->fieldNotExists('Tags'); // The Body field from Standard should be visible. diff --git a/recipes/drupal_cms_person/composer.json b/recipes/drupal_cms_person/composer.json index 741ffb5df5c97e33fdd10007b48556f1751ba13c..bbaba1b6823a7fc7c4160ccb7ab928a67878f705 100644 --- a/recipes/drupal_cms_person/composer.json +++ b/recipes/drupal_cms_person/composer.json @@ -1,6 +1,6 @@ { "name": "drupal/drupal_cms_person", - "description": "Adds a Person profile content type that provides information about a person.", + "description": "Adds a person profile content type.", "type": "drupal-recipe", "license": ["GPL-2.0-or-later"], "require": { diff --git a/recipes/drupal_cms_person/config/core.entity_view_display.node.person.card.yml b/recipes/drupal_cms_person/config/core.entity_view_display.node.person.card.yml index e59f822cc938765e561a1873bb0bd667879ee949..fc9c4346d358a155bf41bdaf3d892c47c238e51f 100644 --- a/recipes/drupal_cms_person/config/core.entity_view_display.node.person.card.yml +++ b/recipes/drupal_cms_person/config/core.entity_view_display.node.person.card.yml @@ -13,8 +13,6 @@ dependencies: - node.type.person module: - layout_builder - - media - - text - user third_party_settings: layout_builder: @@ -25,54 +23,34 @@ targetEntityType: node bundle: person mode: card content: - field_content: - type: text_default + field_description: + type: basic_string label: hidden settings: { } third_party_settings: { } - weight: 5 + weight: 2 region: content field_featured_image: - type: media_thumbnail + type: entity_reference_entity_view label: hidden settings: - image_link: '' - image_style: '' - image_loading: - attribute: eager - third_party_settings: { } - weight: 1 - region: content - field_person__email: - type: email_mailto - label: inline - settings: { } - third_party_settings: { } - weight: 3 - region: content - field_person__phone_number: - type: basic_string - label: above - settings: { } + view_mode: 4_3_medium + link: false third_party_settings: { } - weight: 6 + weight: 0 region: content field_person__role_job_title: type: basic_string - label: above + label: hidden settings: { } third_party_settings: { } - weight: 7 - region: content - field_tags: - type: entity_reference_label - label: inline - settings: - link: true - third_party_settings: { } - weight: 2 + weight: 1 region: content hidden: - field_description: true + content_moderation_control: true + field_content: true + field_person__email: true + field_person__phone_number: true + field_tags: true langcode: true links: true diff --git a/recipes/drupal_cms_person/config/core.entity_view_display.node.person.default.yml b/recipes/drupal_cms_person/config/core.entity_view_display.node.person.default.yml index 8dbee9b1587972401e7cfa7dfa1325243ca98125..599fd26b206e984608ed072692dccad8a35ceb6e 100644 --- a/recipes/drupal_cms_person/config/core.entity_view_display.node.person.default.yml +++ b/recipes/drupal_cms_person/config/core.entity_view_display.node.person.default.yml @@ -27,41 +27,6 @@ third_party_settings: label: Content context_mapping: { } components: - 824da267-49b6-448a-92ed-4050be30b491: - uuid: 824da267-49b6-448a-92ed-4050be30b491 - region: content - configuration: - id: 'field_block:node:person:field_featured_image' - label_display: '0' - context_mapping: - entity: layout_builder.entity - formatter: - type: media_thumbnail - label: hidden - settings: - image_link: '' - image_style: '' - image_loading: - attribute: eager - third_party_settings: { } - weight: 2 - additional: { } - 4284cc23-a210-4381-8ced-00b7102010dc: - uuid: 4284cc23-a210-4381-8ced-00b7102010dc - region: content - configuration: - id: 'field_block:node:person:field_tags' - label_display: '0' - context_mapping: - entity: layout_builder.entity - formatter: - type: entity_reference_label - label: inline - settings: - link: true - third_party_settings: { } - weight: 3 - additional: { } e53407f0-9221-46a4-b83e-3fdc66b01d03: uuid: e53407f0-9221-46a4-b83e-3fdc66b01d03 region: content @@ -136,14 +101,64 @@ third_party_settings: label: above settings: { } third_party_settings: { } + weight: 3 + additional: { } + 824da267-49b6-448a-92ed-4050be30b491: + uuid: 824da267-49b6-448a-92ed-4050be30b491 + region: content + configuration: + id: 'field_block:node:person:field_featured_image' + label_display: '0' + context_mapping: + entity: layout_builder.entity + formatter: + type: media_thumbnail + label: hidden + settings: + image_link: '' + image_style: '' + image_loading: + attribute: eager + third_party_settings: { } weight: 1 additional: { } - third_party_settings: { }\ + 4284cc23-a210-4381-8ced-00b7102010dc: + uuid: 4284cc23-a210-4381-8ced-00b7102010dc + region: content + configuration: + id: 'field_block:node:person:field_tags' + label_display: '0' + context_mapping: + entity: layout_builder.entity + formatter: + type: entity_reference_label + label: inline + settings: + link: true + third_party_settings: { } + weight: 8 + additional: { } + 5b3a863c-07cd-4486-b22f-84a25e896421: + uuid: 5b3a863c-07cd-4486-b22f-84a25e896421 + region: content + configuration: + id: 'extra_field_block:node:person:content_moderation_control' + label_display: '0' + context_mapping: + entity: layout_builder.entity + weight: 2 + additional: { } + third_party_settings: { } id: node.person.default targetEntityType: node bundle: person mode: default content: + content_moderation_control: + settings: { } + third_party_settings: { } + weight: -20 + region: content field_content: type: text_default label: hidden diff --git a/recipes/drupal_cms_person/config/core.entity_view_display.node.person.teaser.yml b/recipes/drupal_cms_person/config/core.entity_view_display.node.person.teaser.yml index 7c1f47f0c8a777f1a5693a7b272a260e6b325101..6bb62da62cc4118e93b7412aaefcb7570042f4c7 100644 --- a/recipes/drupal_cms_person/config/core.entity_view_display.node.person.teaser.yml +++ b/recipes/drupal_cms_person/config/core.entity_view_display.node.person.teaser.yml @@ -10,84 +10,14 @@ dependencies: - field.field.node.person.field_person__phone_number - field.field.node.person.field_person__role_job_title - field.field.node.person.field_tags - - image.style.4_3_300x225_focal_point_webp - node.type.person module: - layout_builder - - layout_discovery - - media - user third_party_settings: layout_builder: - enabled: true + enabled: false allow_custom: false - sections: - - - layout_id: layout_onecol - layout_settings: - label: '' - components: - 3d8705c6-0e7e-4b35-9472-0f557d68b905: - uuid: 3d8705c6-0e7e-4b35-9472-0f557d68b905 - region: content - configuration: - id: 'field_block:node:person:field_featured_image' - label_display: '0' - context_mapping: - entity: layout_builder.entity - formatter: - type: media_thumbnail - label: hidden - settings: - image_link: '' - image_style: 4_3_300x225_focal_point_webp - image_loading: - attribute: lazy - third_party_settings: { } - weight: 0 - additional: { } - 584239a1-65f1-4ee4-b9ad-706458ca2c8d: - uuid: 584239a1-65f1-4ee4-b9ad-706458ca2c8d - region: content - configuration: - id: 'field_block:node:person:field_description' - label_display: '0' - context_mapping: - entity: layout_builder.entity - formatter: - type: basic_string - label: hidden - settings: { } - third_party_settings: { } - weight: 1 - additional: { } - 673479a2-53cd-4304-aebd-a1b9fb5b27f5: - uuid: 673479a2-53cd-4304-aebd-a1b9fb5b27f5 - region: content - configuration: - id: 'field_block:node:person:field_tags' - label_display: '0' - context_mapping: - entity: layout_builder.entity - formatter: - type: entity_reference_label - label: inline - settings: - link: true - third_party_settings: { } - weight: 2 - additional: { } - 219e0d81-428f-4d9a-be6d-d684f11b1632: - uuid: 219e0d81-428f-4d9a-be6d-d684f11b1632 - region: content - configuration: - id: 'extra_field_block:node:person:links' - label_display: '0' - context_mapping: - entity: layout_builder.entity - weight: 3 - additional: { } - third_party_settings: { } id: node.person.teaser targetEntityType: node bundle: person @@ -101,32 +31,20 @@ content: weight: 1 region: content field_featured_image: - type: media_thumbnail + type: entity_reference_entity_view label: hidden settings: - image_link: '' - image_style: 4_3_300x225_focal_point_webp - image_loading: - attribute: lazy + view_mode: 4_3_medium + link: false third_party_settings: { } weight: 0 region: content - field_tags: - type: entity_reference_label - label: inline - settings: - link: true - third_party_settings: { } - weight: 2 - region: content - links: - settings: { } - third_party_settings: { } - weight: 3 - region: content hidden: + content_moderation_control: true field_content: true field_person__email: true field_person__phone_number: true field_person__role_job_title: true + field_tags: true langcode: true + links: true diff --git a/recipes/drupal_cms_person/config/node.type.person.yml b/recipes/drupal_cms_person/config/node.type.person.yml index c1c6f1d50d8feebce53bf8072b00e3aa40644dd4..14dbbcb9964c4d30fd7cf36e11d30377d960b7da 100644 --- a/recipes/drupal_cms_person/config/node.type.person.yml +++ b/recipes/drupal_cms_person/config/node.type.person.yml @@ -3,6 +3,7 @@ status: true dependencies: module: - scheduler + - menu_ui third_party_settings: scheduler: expand_fieldset: when_required @@ -17,6 +18,9 @@ third_party_settings: unpublish_enable: true unpublish_required: false unpublish_revision: true + menu_ui: + available_menus: { } + parent: '' name: 'Person profile' type: person description: 'Person profile content provides information about a person.' diff --git a/recipes/drupal_cms_person/recipe.yml b/recipes/drupal_cms_person/recipe.yml index cb5c041d7b3b243802d46f3220d4c25f4b6109f8..747444cbee08ec65e8e46a0fcad34efe17e1af0c 100644 --- a/recipes/drupal_cms_person/recipe.yml +++ b/recipes/drupal_cms_person/recipe.yml @@ -1,6 +1,6 @@ -name: 'Person profiles' +name: Person Profiles type: Drupal CMS -description: 'Adds a person profile content type that provides information about a person.' +description: Adds a person profile content type. recipes: - drupal_cms_content_type_base - core/recipes/tags_taxonomy diff --git a/recipes/drupal_cms_privacy_basic/composer.json b/recipes/drupal_cms_privacy_basic/composer.json index bbf8cab52ff66dd655550728f7f65579fde87d7b..77e6797d74b60b4e5c6a1bed42b48b4bf6694f6b 100644 --- a/recipes/drupal_cms_privacy_basic/composer.json +++ b/recipes/drupal_cms_privacy_basic/composer.json @@ -1,6 +1,6 @@ { "name": "drupal/drupal_cms_privacy_basic", - "description": "Sets up a site with basic privacy features like consent management and remote content blocking.", + "description": "Adds basic privacy features such as consent management and remote content blocking.", "type": "drupal-recipe", "license": ["GPL-2.0-or-later"], "require": { @@ -8,7 +8,7 @@ "drupal/core": ">=10.3", "drupal/eca": "^2.1.0", "drupal/drupal_cms_page": "*", - "drupal/klaro": "^3-rc10", + "drupal/klaro": "^3-rc16", "drupal/menu_link_attributes": "^1.5" } } diff --git a/recipes/drupal_cms_privacy_basic/recipe.yml b/recipes/drupal_cms_privacy_basic/recipe.yml index c329ea39b31c2805c7ba262d07111e18bff853e8..2a98c11ec1c84c54cff9bbf78407288305845dfd 100644 --- a/recipes/drupal_cms_privacy_basic/recipe.yml +++ b/recipes/drupal_cms_privacy_basic/recipe.yml @@ -1,5 +1,5 @@ name: Basic Privacy -description: Sets up a site with basic privacy features like consent management and remote content blocking. +description: Adds basic privacy features such as consent management and remote content blocking. type: Drupal CMS recipes: - drupal_cms_page diff --git a/recipes/drupal_cms_project/composer.json b/recipes/drupal_cms_project/composer.json index edded45fb8d38430774a0b384117dcc26ed53744..9ee16af564afca4d6ef76637b6d0a1f0775b3411 100644 --- a/recipes/drupal_cms_project/composer.json +++ b/recipes/drupal_cms_project/composer.json @@ -1,6 +1,6 @@ { "name": "drupal/drupal_cms_project", - "description": "Adds a Project content type that provides information about an example of work to the intended audience.", + "description": "Adds a project content type and listing page.", "type": "drupal-recipe", "license": ["GPL-2.0-or-later"], "require": { diff --git a/recipes/drupal_cms_project/config/core.entity_view_display.node.project.card.yml b/recipes/drupal_cms_project/config/core.entity_view_display.node.project.card.yml index aeb8396b6ae50f7ded1784a4dc20a9b32756677f..1642945141944cf072cb06184b9efaadd93ee720 100644 --- a/recipes/drupal_cms_project/config/core.entity_view_display.node.project.card.yml +++ b/recipes/drupal_cms_project/config/core.entity_view_display.node.project.card.yml @@ -10,13 +10,9 @@ dependencies: - field.field.node.project.field_project__client_logo - field.field.node.project.field_project__client_name - field.field.node.project.field_tags - - image.style.uncropped_500w_webp - node.type.project module: - layout_builder - - link - - media - - text - user third_party_settings: layout_builder: @@ -27,64 +23,35 @@ targetEntityType: node bundle: project mode: card content: - field_content: - type: text_default + field_description: + type: basic_string label: hidden settings: { } third_party_settings: { } weight: 2 region: content field_featured_image: - type: media_thumbnail + type: entity_reference_entity_view label: hidden settings: - image_link: '' - image_style: '' - image_loading: - attribute: eager + view_mode: 16_9_medium + link: false third_party_settings: { } weight: 0 region: content - field_project__client_link: - type: link - label: inline - settings: - trim_length: 80 - url_only: false - url_plain: false - rel: '0' - target: _blank - third_party_settings: { } - weight: 4 - region: content - field_project__client_logo: - type: media_thumbnail - label: inline - settings: - image_link: '' - image_style: uncropped_500w_webp - image_loading: - attribute: lazy - third_party_settings: { } - weight: 5 - region: content field_project__client_name: type: string - label: inline + label: hidden settings: link_to_entity: false third_party_settings: { } - weight: 3 - region: content - field_tags: - type: entity_reference_label - label: inline - settings: - link: true - third_party_settings: { } weight: 1 region: content hidden: - field_description: true + content_moderation_control: true + field_content: true + field_project__client_link: true + field_project__client_logo: true + field_tags: true langcode: true links: true diff --git a/recipes/drupal_cms_project/config/core.entity_view_display.node.project.default.yml b/recipes/drupal_cms_project/config/core.entity_view_display.node.project.default.yml index d7d16394096291aee6fbb6009130b26d21bc9996..cbc5c4a600ae8d0c5a5d8642332b75cff9a36473 100644 --- a/recipes/drupal_cms_project/config/core.entity_view_display.node.project.default.yml +++ b/recipes/drupal_cms_project/config/core.entity_view_display.node.project.default.yml @@ -3,12 +3,13 @@ status: true dependencies: config: - field.field.node.project.field_content + - field.field.node.project.field_description + - field.field.node.project.field_featured_image - field.field.node.project.field_project__client_link - field.field.node.project.field_project__client_logo - field.field.node.project.field_project__client_name - - field.field.node.project.field_description - - field.field.node.project.field_featured_image - field.field.node.project.field_tags + - image.style.uncropped_500w_webp - node.type.project module: - layout_builder @@ -33,17 +34,17 @@ third_party_settings: region: content configuration: id: 'field_block:node:project:field_featured_image' + label: 'Featured image' label_display: '0' + provider: layout_builder context_mapping: entity: layout_builder.entity + view_mode: view_mode formatter: - type: media_thumbnail + type: entity_reference_entity_view label: hidden settings: - image_link: '' - image_style: '' - image_loading: - attribute: eager + view_mode: 16_9_wide third_party_settings: { } weight: 0 additional: { } @@ -61,19 +62,21 @@ third_party_settings: settings: link: true third_party_settings: { } + weight: 7 + additional: { } + b37e7c11-39c6-4c29-b32d-308f7a5f1ca6: + uuid: b37e7c11-39c6-4c29-b32d-308f7a5f1ca6 + region: content + configuration: + id: 'extra_field_block:node:project:content_moderation_control' + label_display: '0' + context_mapping: + entity: layout_builder.entity weight: 1 additional: { } - third_party_settings: { } - - - layout_id: layout_twocol_section - layout_settings: - label: Content - context_mapping: { } - column_widths: 67-33 - components: 811ba61b-54fa-4d59-9c75-245d66da3d99: uuid: 811ba61b-54fa-4d59-9c75-245d66da3d99 - region: first + region: content configuration: id: 'field_block:node:project:field_content' label_display: '0' @@ -84,11 +87,33 @@ third_party_settings: label: hidden settings: { } third_party_settings: { } - weight: 0 + weight: 6 + additional: { } + 635918ab-08d4-46e3-8312-b5c64d8e4752: + uuid: 635918ab-08d4-46e3-8312-b5c64d8e4752 + region: content + configuration: + id: 'field_block:node:project:field_project__client_logo' + label: 'Client logo' + label_display: '0' + provider: layout_builder + context_mapping: + entity: layout_builder.entity + view_mode: view_mode + formatter: + type: media_thumbnail + label: hidden + settings: + image_link: '' + image_style: uncropped_500w_webp + image_loading: + attribute: lazy + third_party_settings: { } + weight: 2 additional: { } 004263b2-05d9-4c2a-b7d2-4ef9394bb5c3: uuid: 004263b2-05d9-4c2a-b7d2-4ef9394bb5c3 - region: second + region: content configuration: id: 'field_block:node:project:field_project__client_name' label: 'Client name' @@ -103,11 +128,11 @@ third_party_settings: settings: link_to_entity: false third_party_settings: { } - weight: 1 + weight: 3 additional: { } ae32e8a9-44e7-433f-8c1f-931fe9497565: uuid: ae32e8a9-44e7-433f-8c1f-931fe9497565 - region: second + region: content configuration: id: 'field_block:node:project:field_project__client_link' label: 'Client link' @@ -126,29 +151,7 @@ third_party_settings: rel: '0' target: _blank third_party_settings: { } - weight: 2 - additional: { } - 635918ab-08d4-46e3-8312-b5c64d8e4752: - uuid: 635918ab-08d4-46e3-8312-b5c64d8e4752 - region: second - configuration: - id: 'field_block:node:project:field_project__client_logo' - label: 'Client logo' - label_display: '0' - provider: layout_builder - context_mapping: - entity: layout_builder.entity - view_mode: view_mode - formatter: - type: media_thumbnail - label: hidden - settings: - image_link: '' - image_style: uncropped_500w_webp - image_loading: - attribute: lazy - third_party_settings: { } - weight: 0 + weight: 5 additional: { } third_party_settings: { } id: node.project.default @@ -156,6 +159,11 @@ targetEntityType: node bundle: project mode: default content: + content_moderation_control: + settings: { } + third_party_settings: { } + weight: -20 + region: content field_content: type: text_default label: hidden @@ -163,6 +171,17 @@ content: third_party_settings: { } weight: 2 region: content + field_featured_image: + type: media_thumbnail + label: hidden + settings: + image_link: '' + image_style: '' + image_loading: + attribute: eager + third_party_settings: { } + weight: 0 + region: content field_project__client_link: type: link label: inline @@ -194,17 +213,6 @@ content: third_party_settings: { } weight: 3 region: content - field_featured_image: - type: media_thumbnail - label: hidden - settings: - image_link: '' - image_style: '' - image_loading: - attribute: eager - third_party_settings: { } - weight: 0 - region: content field_tags: type: entity_reference_label label: inline diff --git a/recipes/drupal_cms_project/config/core.entity_view_display.node.project.teaser.yml b/recipes/drupal_cms_project/config/core.entity_view_display.node.project.teaser.yml index 5e2e9f4b6855b6400a0d9ed6d37333d11b7169b3..aa86e4a6f813c0391fd24e08461351ffd3ad09a1 100644 --- a/recipes/drupal_cms_project/config/core.entity_view_display.node.project.teaser.yml +++ b/recipes/drupal_cms_project/config/core.entity_view_display.node.project.teaser.yml @@ -4,90 +4,20 @@ dependencies: config: - core.entity_view_mode.node.teaser - field.field.node.project.field_content + - field.field.node.project.field_description + - field.field.node.project.field_featured_image - field.field.node.project.field_project__client_link - field.field.node.project.field_project__client_logo - field.field.node.project.field_project__client_name - - field.field.node.project.field_description - - field.field.node.project.field_featured_image - field.field.node.project.field_tags - - image.style.4_3_300x225_focal_point_webp - node.type.project module: - layout_builder - - layout_discovery - - media - user third_party_settings: layout_builder: - enabled: true + enabled: false allow_custom: false - sections: - - - layout_id: layout_onecol - layout_settings: - label: '' - components: - d470152d-60ea-41d8-b241-ac44045f61b0: - uuid: d470152d-60ea-41d8-b241-ac44045f61b0 - region: content - configuration: - id: 'field_block:node:project:field_featured_image' - label_display: '0' - context_mapping: - entity: layout_builder.entity - formatter: - type: media_thumbnail - label: hidden - settings: - image_link: '' - image_style: 4_3_300x225_focal_point_webp - image_loading: - attribute: lazy - third_party_settings: { } - weight: 0 - additional: { } - f48c6293-a94d-41da-8d42-1cf0a10892cd: - uuid: f48c6293-a94d-41da-8d42-1cf0a10892cd - region: content - configuration: - id: 'field_block:node:project:field_description' - label_display: '0' - context_mapping: - entity: layout_builder.entity - formatter: - type: basic_string - label: hidden - settings: { } - third_party_settings: { } - weight: 1 - additional: { } - c030e5f1-c1dc-4559-b061-bacf0552a0be: - uuid: c030e5f1-c1dc-4559-b061-bacf0552a0be - region: content - configuration: - id: 'field_block:node:project:field_tags' - label_display: '0' - context_mapping: - entity: layout_builder.entity - formatter: - type: entity_reference_label - label: inline - settings: - link: true - third_party_settings: { } - weight: 2 - additional: { } - 3a5045ab-d286-41d1-bf0d-2b543df0bab9: - uuid: 3a5045ab-d286-41d1-bf0d-2b543df0bab9 - region: content - configuration: - id: 'extra_field_block:node:project:links' - label_display: '0' - context_mapping: - entity: layout_builder.entity - weight: 3 - additional: { } - third_party_settings: { } id: node.project.teaser targetEntityType: node bundle: project @@ -101,32 +31,20 @@ content: weight: 1 region: content field_featured_image: - type: media_thumbnail + type: entity_reference_entity_view label: hidden settings: - image_link: '' - image_style: 4_3_300x225_focal_point_webp - image_loading: - attribute: lazy + view_mode: 4_3_medium + link: false third_party_settings: { } weight: 0 region: content - field_tags: - type: entity_reference_label - label: inline - settings: - link: true - third_party_settings: { } - weight: 2 - region: content - links: - settings: { } - third_party_settings: { } - weight: 3 - region: content hidden: + content_moderation_control: true field_content: true field_project__client_link: true field_project__client_logo: true field_project__client_name: true + field_tags: true langcode: true + links: true diff --git a/recipes/drupal_cms_project/config/node.type.project.yml b/recipes/drupal_cms_project/config/node.type.project.yml index 1d6c090c60fb1626e13b8bffa58af71525a8db74..093095818d26306c900bc7dde6e8c086413179f4 100644 --- a/recipes/drupal_cms_project/config/node.type.project.yml +++ b/recipes/drupal_cms_project/config/node.type.project.yml @@ -3,6 +3,7 @@ status: true dependencies: module: - scheduler + - menu_ui third_party_settings: scheduler: expand_fieldset: when_required @@ -17,6 +18,9 @@ third_party_settings: unpublish_enable: true unpublish_required: false unpublish_revision: true + menu_ui: + available_menus: { } + parent: '' name: Project type: project description: 'Project content provides information about an example of work to the intended audience.' diff --git a/recipes/drupal_cms_project/recipe.yml b/recipes/drupal_cms_project/recipe.yml index 4d5aa5a822bd2f062ab806c43063ee603d74b8c3..2d8338849008d91238e14fed2f160b5f80067d1b 100644 --- a/recipes/drupal_cms_project/recipe.yml +++ b/recipes/drupal_cms_project/recipe.yml @@ -1,6 +1,6 @@ name: Projects type: Drupal CMS -description: 'Adds a project content type that provides information about an example of work to the intended audience.' +description: Adds a project content type and listing page. recipes: - drupal_cms_page - core/recipes/tags_taxonomy diff --git a/recipes/drupal_cms_remote_video/recipe.yml b/recipes/drupal_cms_remote_video/recipe.yml index ae0ea80e2e628366647cf7875ae55cf87f97ee1a..c776a6b2ce795a28786595f914a541ecf49ab79f 100644 --- a/recipes/drupal_cms_remote_video/recipe.yml +++ b/recipes/drupal_cms_remote_video/recipe.yml @@ -1,6 +1,6 @@ name: Remote Video type: Drupal CMS -description: 'Configures display options for remote video.' +description: Configures display options for remote video. recipes: - core/recipes/remote_video_media_type - drupal_cms_privacy_basic diff --git a/recipes/drupal_cms_search/composer.json b/recipes/drupal_cms_search/composer.json index 1a1548d2dace10e3f3a473afff8d3c2f07e68a50..b5200d6d7a2cebcea61b0060183b6a94fc324b5a 100644 --- a/recipes/drupal_cms_search/composer.json +++ b/recipes/drupal_cms_search/composer.json @@ -1,6 +1,6 @@ { "name": "drupal/drupal_cms_search", - "description": "Provides a simple database-powered search, with autocomplete support.", + "description": "Adds a search to help visitors find content.", "type": "drupal-recipe", "license": ["GPL-2.0-or-later"], "require": { diff --git a/recipes/drupal_cms_search/recipe.yml b/recipes/drupal_cms_search/recipe.yml index 58f0d0f5560c6a2dee7823122a125ca878070291..7f5c75fb672bf53cbd3389ad25941eae480657c6 100644 --- a/recipes/drupal_cms_search/recipe.yml +++ b/recipes/drupal_cms_search/recipe.yml @@ -1,7 +1,6 @@ name: Search type: Drupal CMS -description: Provides a simple database-powered search, with autocomplete support. - +description: Adds a search to help visitors find content. install: - block # Basic search is for node entity type only at the moment. @@ -12,7 +11,6 @@ install: - search_api_exclude - simple_search_form - views - config: strict: false import: diff --git a/recipes/drupal_cms_seo_basic/composer.json b/recipes/drupal_cms_seo_basic/composer.json index c1531a0501beb551826729e3d203cc372650ae73..aa58f3e5ed3a033bc500cf80e7f5f57b968d41fd 100644 --- a/recipes/drupal_cms_seo_basic/composer.json +++ b/recipes/drupal_cms_seo_basic/composer.json @@ -1,6 +1,6 @@ { "name": "drupal/drupal_cms_seo_basic", - "description": "Configures Drupal for basic SEO best practices.", + "description": "Provides basic SEO best practices.", "type": "drupal-recipe", "license": ["GPL-2.0-or-later"], "require": { diff --git a/recipes/drupal_cms_seo_basic/recipe.yml b/recipes/drupal_cms_seo_basic/recipe.yml index d869a6eec13be51fa9dc92fd0ee39ce261f8640d..0897c2a9b93377617692764bf98e89de3499c108 100644 --- a/recipes/drupal_cms_seo_basic/recipe.yml +++ b/recipes/drupal_cms_seo_basic/recipe.yml @@ -1,5 +1,5 @@ name: Basic SEO -description: Configures Drupal for basic SEO best practices. +description: Provides basic SEO best practices. type: Drupal CMS recipes: - core/recipes/content_editor_role diff --git a/recipes/drupal_cms_seo_tools/composer.json b/recipes/drupal_cms_seo_tools/composer.json index a644440e50b9b8356951fbcf0b7a5536c0567461..d66e36dd34ec29392ca1818d02f2c6b3df3bace9 100644 --- a/recipes/drupal_cms_seo_tools/composer.json +++ b/recipes/drupal_cms_seo_tools/composer.json @@ -1,6 +1,6 @@ { "name": "drupal/drupal_cms_seo_tools", - "description": "Adds SEO tools to help configure and manage meta tags, SEO analysis, sitemaps, with an SEO checklist and dashboard.", + "description": "Adds common search engine optimisation tools such as meta tags, XML sitemap, robots.txt management and more.", "type": "drupal-recipe", "license": ["GPL-2.0-or-later"], "require": { diff --git a/recipes/drupal_cms_seo_tools/recipe.yml b/recipes/drupal_cms_seo_tools/recipe.yml index 806b9a4fb8fefcef5e68d7acbc5904d71ee3efa5..8e32252e7088cad40f52118fae04fb99754c8b2e 100644 --- a/recipes/drupal_cms_seo_tools/recipe.yml +++ b/recipes/drupal_cms_seo_tools/recipe.yml @@ -1,5 +1,5 @@ -name: SEO tools -description: Adds SEO tools to help configure and manage meta tags, SEO analysis, sitemaps, with an SEO checklist. +name: SEO Tools +description: Adds common search engine optimisation tools such as meta tags, XML sitemap, robots.txt management and more. type: Drupal CMS recipes: - core/recipes/image_media_type diff --git a/recipes/drupal_cms_starter/composer.json b/recipes/drupal_cms_starter/composer.json index a4d55ec1d0da9020fa57f5df376d21c1b15134d9..10e1dafbfd5384116f40fc7b59b25cf31fb6f4e5 100644 --- a/recipes/drupal_cms_starter/composer.json +++ b/recipes/drupal_cms_starter/composer.json @@ -1,6 +1,6 @@ { "name": "drupal/drupal_cms_starter", - "description": "Sets up a Drupal CMS site with useful features and sample content.", + "description": "Applies the foundational Drupal CMS recipes.", "type": "drupal-recipe", "license": ["GPL-2.0-or-later"], "require": { @@ -23,11 +23,11 @@ "drupal/token": "^1" }, "suggest": { - "drupal/drupal_cms_blog": "Sets up a basic blog, with tagging.", - "drupal/drupal_cms_case_study": "Adds a case study content type that provides detailed information about a subject to the intended audience.", - "drupal/drupal_cms_events": "A content type and view to help you manage events.", - "drupal/drupal_cms_news": "Adds a news content type with an overview page and related news items.", - "drupal/drupal_cms_person": "Adds a person profile content type that provides information about a person.", - "drupal/drupal_cms_project": "Adds a project content type that provides information about an example of work to the intended audience." + "drupal/drupal_cms_blog": "Adds a blog post content type and listing page.", + "drupal/drupal_cms_case_study": "Adds a case study content type and listing page.", + "drupal/drupal_cms_events": "Adds an event content type and listing page.", + "drupal/drupal_cms_news": "Adds a news content type and listing page.", + "drupal/drupal_cms_person": "Adds a person profile content type.", + "drupal/drupal_cms_project": "Adds a project content type and listing page." } } diff --git a/recipes/drupal_cms_starter/recipe.yml b/recipes/drupal_cms_starter/recipe.yml index 39e2ac4b694407a7a827879b862b729e6bf6ed8a..c463603629bcf37ea518908f212de5da0a071cff 100644 --- a/recipes/drupal_cms_starter/recipe.yml +++ b/recipes/drupal_cms_starter/recipe.yml @@ -1,6 +1,6 @@ name: Drupal CMS -description: Applies all the basic Drupal CMS recipes. type: Site +description: Applies the foundational Drupal CMS recipes. recipes: - core/recipes/core_recommended_maintenance - core/recipes/core_recommended_performance diff --git a/recipes/drupal_cms_starter/tests/src/Functional/ContentEditingTest.php b/recipes/drupal_cms_starter/tests/src/Functional/ContentEditingTest.php new file mode 100644 index 0000000000000000000000000000000000000000..c561aac9f5b7a818ec419f8509fc7910e05aa174 --- /dev/null +++ b/recipes/drupal_cms_starter/tests/src/Functional/ContentEditingTest.php @@ -0,0 +1,54 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\drupal_cms_starter\Functional; + +use Composer\InstalledVersions; +use Drupal\FunctionalTests\Core\Recipe\RecipeTestTrait; +use Drupal\Tests\BrowserTestBase; + +/** + * @group drupal_cms_starter + */ +class ContentEditingTest extends BrowserTestBase { + + use RecipeTestTrait; + + /** + * {@inheritdoc} + */ + protected $defaultTheme = 'stark'; + + /** + * @testWith ["drupal/drupal_cms_blog", "blog", false] + * ["drupal/drupal_cms_case_study", "case_study", false] + * ["drupal/drupal_cms_events", "event", false] + * ["drupal/drupal_cms_news", "news", false] + * ["drupal/drupal_cms_page", "page", true] + * ["drupal/drupal_cms_person", "person", false] + * ["drupal/drupal_cms_project", "project", false] + */ + public function testMenuSettingsVisibility(string $recipe_name, string $content_type, bool $has_menu_settings): void { + // Apply the recipe for the given content type. + $dir = InstalledVersions::getInstallPath($recipe_name); + $this->applyRecipe($dir); + + $account = $this->drupalCreateUser(); + $account->addRole('content_editor')->save(); + $this->drupalLogin($account); + $this->drupalGet("/node/add/$content_type"); + + // Check menu settings visibility. + $assert_session = $this->assertSession(); + if ($has_menu_settings) { + $assert_session->pageTextContains('Menu settings'); + } + else { + $assert_session->pageTextNotContains('Menu settings'); + } + // Verify the form loaded without errors. + $assert_session->statusCodeEquals(200); + } + +} diff --git a/recipes/drupal_cms_starter/tests/src/FunctionalJavaScript/PerformanceTest.php b/recipes/drupal_cms_starter/tests/src/FunctionalJavaScript/PerformanceTest.php index fe2d5f2d1e5f9b8a901a78614bfe0ddef641c6cd..01f0c65c988db61bf54ae66d2a3a27902e949b0a 100644 --- a/recipes/drupal_cms_starter/tests/src/FunctionalJavaScript/PerformanceTest.php +++ b/recipes/drupal_cms_starter/tests/src/FunctionalJavaScript/PerformanceTest.php @@ -61,12 +61,9 @@ class PerformanceTest extends PerformanceTestBase { $this->assertSame(1, $performance_data->getCacheTagIsValidCount()); $this->assertSame(0, $performance_data->getCacheTagInvalidationCount()); $this->assertSame(2, $performance_data->getStylesheetCount()); - $this->assertSame(2, $performance_data->getScriptCount()); - // @todo dramatically reduce these numbers once Klaro out of the box - // performance is improved. - // @see https://www.drupal.org/project/drupal_cms/issues/3493438 - $this->assertLessThan(95000, $performance_data->getStylesheetBytes()); - $this->assertLessThan(240000, $performance_data->getScriptBytes()); + $this->assertSame(1, $performance_data->getScriptCount()); + $this->assertLessThan(75000, $performance_data->getStylesheetBytes()); + $this->assertLessThan(16500, $performance_data->getScriptBytes()); } /** @@ -99,12 +96,9 @@ class PerformanceTest extends PerformanceTestBase { $this->assertSame(102, $performance_data->getCacheTagIsValidCount()); $this->assertSame(0, $performance_data->getCacheTagInvalidationCount()); $this->assertSame(3, $performance_data->getStylesheetCount()); - $this->assertSame(5, $performance_data->getScriptCount()); - // @todo dramatically reduce these numbers once Klaro out of the box - // performance is improved. - // @see https://www.drupal.org/project/drupal_cms/issues/3493438 - $this->assertLessThan(370000, $performance_data->getStylesheetBytes()); - $this->assertLessThan(535000, $performance_data->getScriptBytes()); + $this->assertSame(3, $performance_data->getScriptCount()); + $this->assertLessThan(350000, $performance_data->getStylesheetBytes()); + $this->assertLessThan(320000, $performance_data->getScriptBytes()); } }