Drupal Planet

Blue Drop Shop: Drupal Recording Initiative: #DrupalCampNJ and #FLDC20

16 hours ago
Drupal Recording Initiative: #DrupalCampNJ and #FLDC20 kthull Mon, 02/24/2020 - 15:48

I post updates on LinkedIn and to backers of the Drupal Recording Initiative, but I suppose blasting these via Planet Drupal is also a good idea. Well, at least until Drupal.tv adds that functionality (you can track that issue here).

Enjoy!

 

That puts the total number of captured sessions at 2,147. If you find these session recordings valuable, please consider supporting my efforts. The US is fairly well covered...so now it is time to focus on the rest of the world.

Drupal Association blog: Drupal contribution culture - your opinions, experience and perspectives matter

16 hours 42 minutes ago

How do we encourage those capable of giving back to Drupal to start doing so and once they are contributing how do we encourage them to do more? Dries highlighted this conundrum during his keynote at DrupalCon Amsterdam 2019.

Whilst various mechanisms exist to recognise contributions in Drupal, if we are to cultivate and grow contribution culture we need to move beyond the current status quo. At DrupalCon the Contribution Recognition Committee was proposed and self nomination invited.

The purpose of this committee is to recommend solutions for how we recognize contributions to the Drupal project made by both individual and organizational contributors, and to advise the Drupal Association on how to weight each type of contribution relative to the others.” Tim Lehnen, Chief Technology Officer Drupal Association.

What have we achieved so far?

For several months now, newly appointed committee members have been researching and discussing contribution culture within Drupal and open source. To ensure recommendations are truly representative of organisation and individual contributions we are keen to canvas opinions and perspectives from far and wide.

Share your opinions, ideas and perspectives

An online survey is available now for those using or contributing to Drupal so they can provide insights which will be considered in our recommendations as a committee. I encourage you to participate and help us to reach members of the Drupal community in your local area.

Complete the survey today

Flocon de toile | Freelance Drupal: Starting a migration with Migrate programmatically

19 hours 39 minutes ago
Migrate, a module integrated into the Drupal 8 Core, is a powerful solution for setting up data import processes from any data source (CSV, XML, Database, JSON, etc.) to a Drupal 8 project. The purpose of this post is not to explore all the facets of Migrate, as they are numerous and are already covered in many blog posts or official documentation, but rather to address a particular point: how to programmatically launch a migration?

eiriksm.dev: Creating a Behat step definition with arguments over multiple lines

3 days 16 hours ago

Here is a quick tip if you want to create a step definition that has an argument with multiple lines. A multiline string argument if you like.

I wanted to test that an email was sent, with a specific subject, to a specific person, and containing a specific body text.

My idea was to create a step definition that looked something like this:

Then an email has been sent to "[email protected]" with the subject "Subject example" and the body “one of the lines in the body plus this is the other line of the body, after an additional line break”

So basically my full file is now this:

@api @test-feature Feature: Test this feature Scenario: I can use this definition Then an email has been sent to "[email protected]" with the subject "Subject example" and the body “one of the lines in the body plus this is the other line of the body, after an additional line break”

My step definition looks like this:

/** * @Then /^an email has been sent to :email with the subject :subject and the body :body$/ */ public function anEmailHasBeenSentToWithTheSubjectAndTheBody($email, $subject, $body) { throw new PendingException(); }

Let’s try to run that.

$ ./vendor/bin/behat --tags=test-feature In Parser.php line 393: Expected Step, but got text: " plus this is the other line of the body, after an additional line break”" in file: tests/features/test.feature

Doing it that way simply does not work. You see, by default a line break in the Gherkin DSL has an actual meaning, so you can not do a line break in your argument, expecting it to just pass along everything up until the closing quote. What we actually want is to use a PyString. But how do we use them, and how do we define a step to receive them? Let’s start by converting our step definition to use the PyString multiline syntax:

@api @test-feature Feature: Test this feature Scenario: I can use this definition Then an email has been sent to "[email protected]" with the subject "Subject example" and the body """ one of the lines in the body plus this is the other line of the body, after an additional line break """

Now let’s try to run it:

$ ./vendor/bin/behat --tags=test-feature @api @test-feature Feature: Test this feature Scenario: I can use this definition # tests/features/test.feature:3 Then an email has been sent to "[email protected]" with the subject "Subject example" and the body """ one of the lines in the body plus this is the other line of the body, after an additional line break """ 1 scenario (1 undefined) 1 step (1 undefined) 0m0.45s (32.44Mb) >> default suite has undefined steps. Please choose the context to generate snippets:

A bit closer. Our output actually tells us that we have a missing step definition, and suggests how to define it. That’s better. Let’s try the suggestion from the output, now defining our step like this:

/** * @Then an email has been sent to :email with the subject :subject and the body */ public function anEmailHasBeenSentToWithTheSubjectAndTheBody2($email, $subject, PyStringNode $string) { throw new PendingException(); }

The difference here is that we do not add the variable name for the body in the annotation, and we specify that we want a PyStringNode type parameter last. This way behat will know (tm).

After running the behat command again, we can finally use the step definition. Let's have a look at how we can use the PyString class.

/** * @Then an email has been sent to :email with the subject :subject and the body */ public function anEmailHasBeenSentToWithTheSubjectAndTheBody2($email, $subject, PyStringNode $string) { // This is just an example. $mails = $this->getEmailsSomehow(); // This is now the important part, you get the raw string from the PyStringNode class. $body_string = $string->getRaw(); foreach ($mails as $item) { // Still just an example, but you probably get the point? if ($item['to'] == $mail && $item['subject'] == $subject && strpos($item['body'], $body_string) !== FALSE) { return; } } throw new \Exception('The mail was not found'); }

And that about wraps it up. Writing tests are fun, right? As a bonus, here is an animated gif called "Testing".

DrupalCon News: Announcing the Sessions for DrupalCon Minneapolis

3 days 20 hours ago

The accepted sessions for the next DrupalCon are now posted—and what an impressive lineup!

Curated content for the 45-minute sessions is packed with compelling insight, information, and your chance to learn the latest in Drupal. As you look at a session online (such as the one shown below), note its right-hand box with its designated track, tags that further explain its content, the experience level it’s geared toward, and a special button to add it to your DrupalCon schedule! 
 

Ixis.co.uk - Thoughts: Can Drupal be used for mobile apps?

4 days 5 hours ago
Any website being developed these days is built on top of a responsive framework allowing pages to adapt and re-layout content based on the size of the viewing device.  Perfect for mobile and tablet devices alongside traditional desktop screens.  So why are mobile apps still chased after by people? What’s wrong with their responsive website?

DrupalEasy: DrupalEasy Podcast 224 - Jacob Rockowitz, Ted Bowman

4 days 23 hours ago

Direct .mp3 file download.

We talk with Jacob Rockowiz about the Webform variants and A/B testing and Ted Bowman about Drupal 9 info.yml files.

URLs mentioned DrupalEasy News Sponsors Subscribe

Subscribe to our podcast on iTunes, Google Play or Miro. Listen to our podcast on Stitcher.

If you'd like to leave us a voicemail, call 321-396-2340. Please keep in mind that we might play your voicemail during one of our future podcasts. Feel free to call in with suggestions, rants, questions, or corrections. If you'd rather just send us an email, please use our contact page.

Droptica: Drupal Agency Experts Heading To DrupalCamp London 2020

5 days 4 hours ago
DrupalCamp London is a great event for all Drupal agencies. It is a conference that brings together hundreds of Drupal experts from around the world. It's a great opportunity to meet people who use, develop, design and support the Drupal platform. Therefore, as usually we will be there this year as well. Droptica is a sponsor of DrupalCamp London 2020 We are proud to sponsor and participate in this year's DrupalCamp London. The event will take place on March 13-15, 2020 in London.

Gizra.com: Form Modes & Wizard Tutorial for Drupal 8

5 days 13 hours ago

My appreciation for form API in Drupal is on the same level as my attempt to avoid it when it comes to user facing forms. Both are pretty high. The reasons I love it are because it’s extendible and security is built in. I’ve worked with a few other frameworks in different languages, and my impression is that Drupal’s form API is significantly more advanced than any other solution I’ve seen.

The reason I try to avoid it, on the other hand, is mainly because it’s hard to create forms that satisfy the end users, and achieve their expectations. Basically, forms are bulky, and going with a mix of JS/Ajaxy solutions is often a pain. Having a JS form (i.e. some JS widget that builds and controls the entire form), that POSTs to a RESTful endpoint takes more code, but often times provides a more streamlined user experience.

Not sure why and how, but over the years we’ve been tasked quite a few times with creating form wizards. It’s frequently used for more complex registrations, like for students, or alumnus applying for different programs. In the early Drupal 7 days we went with CTools’ wizard, and then switched to Elm (i.e. a JS form) along with RESTful endpoints. Drupal 8 however has one major feature that makes it very appealing to work once more with form API - that is “Form modes.”

This post has an example repo, that you should be able to reliably download and run locally thanks to DDEV. I will not try to cover every single line of code - but rather share the concepts behind our implementation, with some references to the code. The audience is intermediate-level Drupal developers, that can expect to have a good sense of how to use Form modes to build wizards after reading this post and going over the code.

Before diving in, it’s important to recognize that “wizards” come in many flavors. I personally hold the opinion that a generic module cannot be (easily) built to accommodate all cases. Instead, I look at Drupal 8 with its core and a couple of contrib modules as the “generic” solution to build complex - sprinkled with lots of custom business logic - wizards.

Nonprofit Drupal posts: February Drupal for Nonprofits Chat -- Pantheon, NTC Planning

5 days 16 hours ago

Our normally scheduled call to chat about all things Drupal and nonprofits will happen TOMORROW, Thursday, February 20, at 1pm ET / 10am PT. (Convert to your local time zone.)

This month, in addition to our usual free-for-all, we'll be talking about hosting on Pantheon. There has been a lot of discussion in the community and on the Drupal Slack #nonprofits channel about some of the pricing changes they have implemented. If you would like to discuss and contribute to the conversation, please join us.

We will also have an update on our community's plans for the upcoming Nonprofit Technology Conference (20NTC).

All nonprofit Drupal devs and users, regardless of experience level, are always welcome on this call.

Feel free to share your thoughts and discussion points ahead of time in our collaborative Google doc: https://nten.org/drupal/notes

This free call is sponsored by NTEN.org but open to everyone.

REMINDER: New call-in information -- we're on Zoom now!

  • Join the call: https://zoom.us/j/308614035
    • Meeting ID: 308 614 035
    • One tap mobile
      • +16699006833,,308614035# US (San Jose)
      • +16465588656,,308614035# US (New York)
    • Dial by your location
      • +1 669 900 6833 US (San Jose)
      • +1 646 558 8656 US (New York)
  • Follow along on Google Docs: https://nten.org/drupal/notes
  • Follow along on Twitter: #npdrupal

View notes of previous months' calls.

Lullabot: Drupal 9 Olivero: Turning Conversation into a Core Initiative

5 days 19 hours ago

One of the biggest benefits of an open-source community like Drupal is the ability to collaborate with fantastic people that you wouldn’t otherwise have the opportunity to work with. However, when you have an idea that you think would be a good initiative for a Drupal core release (such as Drupal 9) you might find yourself thinking: "How do I even begin? How can I advocate for my idea?” We all find ourselves asking these questions as we navigate the complex journey of turning an idea into a core initiative.

TEN7 Blog's Drupal Posts: Mike Gifford of OpenConcept Consulting: Accessibility is a Journey

5 days 19 hours ago
Summary

Mike Gifford’s mission is to build better and more inclusive software. He’s a Drupal 8 Core Accessibility Maintainer, founder of OpenConcept, an accessibility consulting firm, and all-around gem of the Drupal community. Mike’s been spearheading website accessibility improvements for over a decade, and we’re thrilled to have him on our podcast. You’ll learn a lot from this episode!

Guest

Mike Gifford of OpenConcept Consulting

Tag1 Consulting: Adding Collaborative Capabilities to the Gutenberg Editor with Yjs - Tag1 Team Talk #011

5 days 20 hours ago
Content collaboration has long been table stakes for content management systems like WordPress and Drupal, but what about real-time peer-to-peer collaboration between editors who need direct interaction to work on their content? The WordPress Gutenberg team has been working with Tag1 Consulting and the community of Yjs, an open-source real-time collaboration framework, to enable collaborative editing on the Gutenberg editor. Currently an experimental feature that is available in a Gutenberg pull request, shared editing in Gutenberg portends an exciting future for editing use cases beyond just textual content.Read more preston Wed, 02/19/2020 - 08:53
Checked
1 hour 37 minutes ago
Drupal.org - aggregated feeds in category Planet Drupal
Subscribe to Drupal Planet feed