🇺🇸United States @trackleft2

Tucson, AZ 🇺🇸
Account created on 2 April 2014, over 10 years ago
#

Merge Requests

More

Recent comments

🇺🇸United States trackleft2 Tucson, AZ 🇺🇸

I've tested this locally using lando, here is my lando.yml file

name: environment_indicator
recipe: drupal10
config:
  php: '8.3'
  via: apache:2.4
  webroot: web
  database: mariadb:10.6
  xdebug: false
services:
  database:
    type: compose
    services:
      image: mariadb:10.6
      command: docker-entrypoint.sh mariadbd
      restart: always
      ports:
        - '3306'
      environment:
        MARIADB_ALLOW_EMPTY_ROOT_PASSWORD: 'true'
        MARIADB_DATABASE: drupal10
        MYSQL_DATABASE: drupal10
        MARIADB_USER: drupal10
        MARIADB_PASSWORD: drupal10
  appserver:
    overrides:
      environment:
        SIMPLETEST_DB: 'mysql://drupal10:drupal10@database/drupal10'
        SIMPLETEST_BASE_URL: 'http://appserver'
      volumes:
        # Don't share our host working directory as /app. We want /app empty for composer.
        - /app
        # Instead share our host working directory as a standalone package.
        - .:/usr/local/environment_indicator
    build:
      # Create a new Drupal project and use the module as a non-packagist repository.
      - composer create-project --dev drupal/recommended-project:10.3.x /app
      - composer config extra.enable-patching true
      - composer config extra.composer-exit-on-patch-failure true
      - composer config allow-plugins.cweagans/composer-patches true
      - composer require cweagans/composer-patches
      - composer config minimum-stability dev
      - composer config allow-plugins.phpstan/extension-installer true
      - composer require --dev drupal/core-dev:^10.3 drush/drush phpspec/prophecy-phpunit:* phpstan/extension-installer mglaman/phpstan-drupal phpstan/phpstan-deprecation-rules drupal/config_inspector
      - composer require drupal/gin
      - composer require drupal/gin_toolbar
      - composer config repositories.localdev path /usr/local/environment_indicator && composer require drupal/environment_indicator:\*@dev
  node:
    type: node:20
    build:
      - yarn install
  chromedriver:
    type: compose
    services:
      image: seleniarm/standalone-chromium:4.1.4-20220429
      command: /opt/bin/entry_point.sh
tooling:
  # Provide a command to install Drupal.
  install:
    service: appserver
    cmd:
      - /app/vendor/bin/drush --root=/app/web site:install --account-mail=noreply@example.com --account-name=admin --account-pass=admin --db-url=mysql://drupal10:drupal10@database:3306/drupal10 -y --verbose
      # Set gin as the admin theme.
      - /app/vendor/bin/drush theme:install gin
      - /app/vendor/bin/drush config:set -y system.theme admin gin
      # Enable the Environment Indicator module.
      - /app/vendor/bin/drush en -y environment_indicator config_inspector gin_toolbar
      # Set the environment indicator configuration.
      - /app/vendor/bin/drush config:set -y environment_indicator.indicator fg_color '#000000'
      - /app/vendor/bin/drush config:set -y environment_indicator.indicator bg_color '#dd3f8f'
      - /app/vendor/bin/drush config:set -y environment_indicator.indicator name 'Lando'
      #Create login link
      - /app/vendor/bin/drush uli -l https://environmentindicator.lndo.site
  # Provide Drush tooling to automatically know the Drupal root.
  drush:
    service: appserver
    cmd: /app/vendor/bin/drush --root=/app/web
  phpcs:
    service: appserver
    cmd: /app/vendor/bin/phpcs -s --colors --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml web/modules/contrib/environment_indicator
  # Provide PHPCBF tooling to fix coding standards.
  phpcbf:
    service: appserver
    cmd: /app/vendor/bin/phpcbf -s --colors --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml web/modules/contrib/environment_indicator
  # Provide phpstan tooling to check for code quality and deprecated code.
  phpstan:
    service: appserver
    cmd: /app/vendor/bin/phpstan analyse --configuration web/modules/contrib/environment_indicator/phpstan.neon web/modules/contrib/environment_indicator
  # Provide phpunit tooling to run unit tests.
  phpunit:
    service: appserver
    cmd: /app/vendor/bin/phpunit --configuration /app/web/core/phpunit.xml.dist --bootstrap /app/web/core/tests/bootstrap.php /app/web/modules/contrib/environment_indicator
  yarn:
    service: node
    cmd: yarn
  eslint:
    service: node
    cmd: yarn run eslint --color

🇺🇸United States trackleft2 Tucson, AZ 🇺🇸

This works for me, I wonder if we need a follow-up issue to add the email field. Otherwise all required fields are accounted for in this MR.

"email": "{{Department/College email address}}",

🇺🇸United States trackleft2 Tucson, AZ 🇺🇸

trackleft2 made their first commit to this issue’s fork.

🇺🇸United States trackleft2 Tucson, AZ 🇺🇸

Also, if you could please update the gitlab-ci.yml file to enforce that merge requests pass the eslint job.

eslint:
  allow_failure: false

See https://www.drupal.org/docs/develop/git/using-gitlab-to-contribute-to-dr...

🇺🇸United States trackleft2 Tucson, AZ 🇺🇸

I've added additional comments on the merge request, thanks.

🇺🇸United States trackleft2 Tucson, AZ 🇺🇸

Honestly, I'm not sure this is the right approach as each new integration seems to require a new entrypoint.
page_top needs hook_page_top
toolbar needs hook_toolbar
The new navigation module is entirely different using blocks and experience builder.

My recommendation is to just move each integration into a sub module instead of as a plugin.
See toolbar as submodule 🌱 Move toolbar integration into submodule. Active
See navigation as sub module Support for core navigation experimental module Needs work

Additionally, we should add a config option to disable page_top so that disabling does not depend on the toolbar integration.

🇺🇸United States trackleft2 Tucson, AZ 🇺🇸

I've attempted to do the bare minimum required to enable this module's integrations to be plugin based.

I've included a README.md so that future developers can start developing plugins quickly.

I've created two new plugins:
- Toolbar
- Page top

I've created a post_update.php implementation to make the necessary configuration schema changes.

🇺🇸United States trackleft2 Tucson, AZ 🇺🇸

Hi @arunsahijpal, thank you for your effort in attempting to resolve this issue.

I've added some comments on the merge request and changed the status back to needs work.

🇺🇸United States trackleft2 Tucson, AZ 🇺🇸

trackleft2 created an issue.

🇺🇸United States trackleft2 Tucson, AZ 🇺🇸

Do we need a new Drupal core issue to propose creating a new test trait for the config import export transformation api? If so where would we propose adding it? Maybe here? https://git.drupalcode.org/project/drupal/-/tree/11.x/core/modules/confi...

Are we talking about this file? https://git.drupalcode.org/project/config_filter/-/blob/8.x-1.x/tests/sr...

🇺🇸United States trackleft2 Tucson, AZ 🇺🇸

I've started a draft change record, please feel free to edit it. https://www.drupal.org/node/3487924

🇺🇸United States trackleft2 Tucson, AZ 🇺🇸
🇺🇸United States trackleft2 Tucson, AZ 🇺🇸
🇺🇸United States trackleft2 Tucson, AZ 🇺🇸
🇺🇸United States trackleft2 Tucson, AZ 🇺🇸
🇺🇸United States trackleft2 Tucson, AZ 🇺🇸

trackleft2 created an issue.

🇺🇸United States trackleft2 Tucson, AZ 🇺🇸

Nightwatch fail says

   Timed out while waiting for element <.admin-toolbar__expand-button[aria-expanded=true]> to be present for 5000 milliseconds. - expected "visible" but got: "not found" (5157ms)

Found here https://git.drupalcode.org/project/drupal/-/blob/11.x/core/modules/navig...

🇺🇸United States trackleft2 Tucson, AZ 🇺🇸

New idea! Add option to field_group configuration for applying the spaceless filter to the template, and then turn the filter on if that option is selected.

Maybe something like this:

$form['field_group']['spaceless'] = [
  '#type' => 'checkbox',
  '#title' => t('Enable Spaceless Filter'),
  '#description' => t('Select this option to remove unnecessary whitespace between HTML elements in this field group. While this can lead to cleaner HTML output and potentially enhance rendering performance, be aware that it may affect the visual spacing of elements in some themes or contexts. Use with caution to ensure it meets your design needs.'),
];
🇺🇸United States trackleft2 Tucson, AZ 🇺🇸

Looks like Drupal will be adding a spaceless replacement in 📌 Twig Filter "spaceless" is deprecated Active .

I've been testing adding the apply spaceless filter in the https://git.drupalcode.org/project/field_group/-/blob/4.x/templates/fiel... file, however I've found that some content editors have been relying on the space added between elements, and removing it causes unintended display changes.

My new approach is to copy the field-group-html-element.html.twig file into my themes as element specific templates like...
field-group-html-element--h1.html.twig and then wrapping the children variable in the spaceless filter like:

{#
/**
 * @file
 * Default theme implementation for a fieldgroup html element.
 *
 * Available variables:
 * - title: Title of the group.
 * - title_element: Element to wrap the title.
 * - children: The children of the group.
 * - wrapper_element: The html element to use
 * - attributes: A list of HTML attributes for the group wrapper.
 *
 * @see template_preprocess_field_group_html_element()
 *
 * @ingroup themeable
 */
#}
<{{ wrapper_element }} {{ attributes }}>
{% if title %}
  <{{ title_element }}{{ title_attributes }}>{{ title }}</{{ title_element }}>
{% endif %}
{% if collapsible %}
  <div class="field-group-wrapper">
{% endif %}
{% apply spaceless %}{{children}}{% endapply %}
{% if collapsible %}
  </div>
{% endif %}
</{{ wrapper_element }}>

🇺🇸United States trackleft2 Tucson, AZ 🇺🇸

I've updated the database fixture to include just what is added into the database when the media module is enabled plus two text formats that have the media_embed filter enabled.

🇺🇸United States trackleft2 Tucson, AZ 🇺🇸

Thanks, nice work!

🇺🇸United States trackleft2 Tucson, AZ 🇺🇸

Not sure we need a full dump like this. This doesn't need to be unique to umami and could probably use one of the existing figures in system.

The issue is that the standard recipe does not have a format that has a media_embed filter enabled.

OK, I'll do it the hard way.

🇺🇸United States trackleft2 Tucson, AZ 🇺🇸

trackleft2 made their first commit to this issue’s fork.

🇺🇸United States trackleft2 Tucson, AZ 🇺🇸

FYI the throbber doesn't work correctly when the navigation is collapsed

🇺🇸United States trackleft2 Tucson, AZ 🇺🇸

@michaellander I've separated the toolbar integration into a separate module 🌱 Move toolbar integration into submodule. Active

🇺🇸United States trackleft2 Tucson, AZ 🇺🇸

trackleft2 changed the visibility of the branch 3477869-adding-a-collegeoruniversity-tag to hidden.

🇺🇸United States trackleft2 Tucson, AZ 🇺🇸

trackleft2 created an issue.

🇺🇸United States trackleft2 Tucson, AZ 🇺🇸

This merge request separates out the Tinycon and favicon functionality into separate libraries from the environment_indicator/drupal.environment_indicator library.

Using the favicon option in environment_indicator.settings and the Drupal libraries and javascript APIs we can serve the Tinycon and favicon libraries.

🇺🇸United States trackleft2 Tucson, AZ 🇺🇸

Setting priority to major since this is one of the key settings in this module.

🇺🇸United States trackleft2 Tucson, AZ 🇺🇸

trackleft2 created an issue.

🇺🇸United States trackleft2 Tucson, AZ 🇺🇸
🇺🇸United States trackleft2 Tucson, AZ 🇺🇸

trackleft2 created an issue.

🇺🇸United States trackleft2 Tucson, AZ 🇺🇸

Does MergeFilter need to be deprecated?

🇺🇸United States trackleft2 Tucson, AZ 🇺🇸

Should be merged after 📌 Address PHPCS error messages Active lands.

🇺🇸United States trackleft2 Tucson, AZ 🇺🇸

@arunsahijpal what about the gitlab part from the issue summary?

Configure gitlab to not allow merging if stylelint job doesn't pass.

🇺🇸United States trackleft2 Tucson, AZ 🇺🇸

trackleft2 created an issue.

🇺🇸United States trackleft2 Tucson, AZ 🇺🇸

OK, but there will probably be merge conflicts with 📌 Fix cspell issues Active that you'll need to account for.

🇺🇸United States trackleft2 Tucson, AZ 🇺🇸

Point at default branch instead of the ancient 8.x branch

🇺🇸United States trackleft2 Tucson, AZ 🇺🇸

Adding new types 

🇺🇸United States trackleft2 Tucson, AZ 🇺🇸

@yevko, please mark as reviewed and tested if you are sure about your testing.

@tess bakker we might need an issue about trimming the input to remove any slashes, and possibly a post_update.php implementation to update config for any sites who might have a trailing slash.

🇺🇸United States trackleft2 Tucson, AZ 🇺🇸

trackleft2 made their first commit to this issue’s fork.

🇺🇸United States trackleft2 Tucson, AZ 🇺🇸

trackleft2 made their first commit to this issue’s fork.

Production build 0.71.5 2024