Account created on 1 October 2009, over 14 years ago
#

Merge Requests

Recent comments

🇨🇦Canada bwaindwain

Seems to be the same as https://www.drupal.org/project/fontyourface/issues/3405354 🐛 Error deleting local font in Drupal 10 Needs review

🇨🇦Canada bwaindwain

Seems to be the same as https://www.drupal.org/project/fontyourface/issues/3400161 🐛 Local Fonts deleting error RTBC

🇨🇦Canada bwaindwain

Created a merge request to see if the tests would pass.

🇨🇦Canada bwaindwain

... and YES, we are interested in an official D10 release!

🇨🇦Canada bwaindwain

seems to be a duplicate of https://www.drupal.org/project/antibot/issues/3419789 🐛 TypeError: implode() RTBC

🇨🇦Canada bwaindwain

Add before & after screenshots to summary. Thanks @Sandeep_k.

🇨🇦Canada bwaindwain

I think this has been fixed in 10.2.1. See https://www.drupal.org/project/drupal/issues/3340154 🐛 Link-widget throws exception when rebuilding a form with an invalid uri Fixed .

🇨🇦Canada bwaindwain

Is your server running nginx and php-fpm? See nginx config suggestions at: https://www.drupal.org/node/2888767

🇨🇦Canada bwaindwain

I tried 2.x and I think the issue of #6 is still happening. I've opened a new issue at https://www.drupal.org/project/pwa/issues/3403529 🐛 Offline assets missing for pages added via hook Needs review .

🇨🇦Canada bwaindwain

Switched to 2.0.x branch and added a new branch and merge request for this feature.

🇨🇦Canada bwaindwain

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

🇨🇦Canada bwaindwain

I've forked the code, created a branch and committed a change, but I can't seem to create the merge request for some reason...

🇨🇦Canada bwaindwain

Created an issue fork with a commit which adds the schema yml file

🇨🇦Canada bwaindwain

Created an issue fork with a commit which adds the cancel button

🇨🇦Canada bwaindwain

@marcoka The YOURMODULE_preprocess_field() adds the thumbnail URL as a data-thumbnail attribute on the <iframe>. Then the JS gets the image URL and applies as a background-image style to the parent <div>.

🇨🇦Canada bwaindwain

Delete confirmation modals have cancel buttons. There lots of modals in views config with cancel buttons. Layout builder delete confirmation has cancel.

🇨🇦Canada bwaindwain

Changed the 'steps to reproduce' to use taxonomy instead of layout builder which seems a bit simpler. Updated screenshot.

🇨🇦Canada bwaindwain

my first gitlab merge request

🇨🇦Canada bwaindwain

@roshni27 you need to click Save blocks and then Place block relatively quickly. It may help to increase the time limit.

🇨🇦Canada bwaindwain

Patch #2 increased the opacity on hover, making the "x" even lighter. This preserves the original intent, making it darker on hover.

🇨🇦Canada bwaindwain

This adds a few more paths and works better for us.

🇨🇦Canada bwaindwain

Tested patch #8 in Drupal 10.1.0 and it works great. Thanks @Gauravvvv

I don't know why the tests failed

🇨🇦Canada bwaindwain

I think this may have caused a bug with browser resizing. See https://www.drupal.org/project/drupal/issues/3359465 🐛 Layout builder off-canvas positioning problem when resizing browser Needs work

🇨🇦Canada bwaindwain

@marcoka Checkout our solution posted at https://www.drupal.org/project/cookies/issues/3275259#comment-15045350 In the Cookies Video module, Use thumbnail image as background Postponed

🇨🇦Canada bwaindwain

The PHP warnings are:

Warning: Undefined array key "thumbnail_width_metadata_attribute" in Drupal\media\Entity\Media->getThumbnailWidth() (line 285 of core/modules/media/src/Entity/Media.php).
Warning: Undefined array key "thumbnail_height_metadata_attribute" in Drupal\media\Entity\Media->getThumbnailHeight() (line 310 of core/modules/media/src/Entity/Media.php).

Fix looks good to me. +1 RTBC

🇨🇦Canada bwaindwain

Here's how we accomplished this for our project in a custom module. Maybe this will help someone or stimulate the brain cells.

First, add the Drupal oembed thumbnail to the iframe.

/**
 * Implements hook_preprocess_HOOK() for fields.
 */
function YOURMODULE_preprocess_field(&$variables) {
  $formatter = $variables['element']['#formatter'];
  if ($formatter === 'oembed') {
    /** @var \Drupal\media\Entity\Media */
    $media = $variables['element']['#object'];
    /** @var \Drupal\file\Entity\File */
    $thumbnail = $media->get('thumbnail')->entity;
    /** @var \Drupal\Core\File\FileUrlGeneratorInterface */
    $file_url_generator = \Drupal::service('file_url_generator');
    foreach (Element::children($variables['items']) as $item) {
      if ($thumbnail_uri = $thumbnail->getFileUri()) {
        $thumbnail_path = $file_url_generator->generateString($thumbnail_uri);
        $variables['items'][$item]['content']['#attributes']['data-thumbnail'] = $thumbnail_path;
        $variables['items'][$item]['content']['#attached']['library'][] = 'YOURMODULE/remote_video';
      }
    }
  }

Then, move the thumbnail image to the cookies overlay as a background-image with JS.

/**
 * @file
 * Handles cookie consent events for remote videos.
 */
(function (Drupal, $) {
  'use strict';

  var videoSelectors = 'iframe.media-oembed-content.cookies-video';

  Drupal.behaviors.YOURMODULECookiesRemoteVideo = {

    consentDenied: function (context) {
      $(videoSelectors, context).each(function (i, element) {
        if (element.dataset.thumbnail) {
          let wrapper = element.closest(".cookies-fallback--video--wrap")
          if (wrapper) {
            wrapper.style.backgroundImage = "url(" + element.dataset.thumbnail + ")";
          }
        }
      });
    },

    attach: function (context) {
      var self = this;
      document.addEventListener('cookiesjsrUserConsent', function (event) {
        var service = (typeof event.detail.services === 'object') ? event.detail.services : {};
        if (typeof service.video !== 'undefined' && !service.video) {
          self.consentDenied(context);
        }
      });
    }
  };

})(Drupal, jQuery);

Add a bit of CSS to blur and lighten the background-image.

.cookies-fallback--video--wrap {
  background: none;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.cookies-fallback--video--overlay {
  background: #ffffff99;
  backdrop-filter: blur(4px);
  border: none;
}
🇨🇦Canada bwaindwain

For 2.x, see https://www.drupal.org/project/simple_password_reveal/issues/3354096 Change checkbox text to just "Hide password" for 2.x Needs review

Production build 0.69.0 2024