Planet Drupal

Aten Design Group: Placing Components with Drupal's Extra Fields

1 month ago

One of the challenges front-end developers face is adding new components to entity templates that exist outside of what is defined in the Field API; or in other words, adding dynamic components that aren’t really fields. Often this can be easily done by throwing the custom markup in a .html.twig file and calling it a day. But if you’re working on something that needs to be reusable, or if you’re collaborating with a site builder who doesn’t write code, the custom template route can be limiting.

Enter hook_entity_extra_field_info().

Content Moderation: A “Pseudo-Field” in Core

Drupal’s documentation says this hook “exposes ‘pseudo-field’ components on content entities.” You can see this hook in action with the Content Moderation module in core. All moderation-enabled entities can have an option box, placed via that entity’s Manage Display page, that contains a widget to update an entity’s moderation state in place rather than clicking through to the edit page.

The moderation option isn’t a real field. Rather, it’s what Drupal calls a “Pseudo Field.” But by using hook_entity_extra_field_info(), you wouldn’t know the difference. The moderation option can be moved around and configured for various display modes, just like “real” fields.

Using hook_entity_extra_field_info in a Custom Module

On a recent project, we needed to integrate a newer commenting service called Coral Talk. After searching, we learned that no module existed to integrate this service in Drupal. This presented a perfect use case for an Extra Field, and only needed two hooks for the bulk of the work:

/** * Implements hook_entity_extra_field_info(). */ function coral_talk_entity_extra_field_info() { // Load commenting configuration. $config = \Drupal::config(coral_talk.settings'); $extra = [];   // Loop over the content types configured to have comments // and get their bundle name. foreach ($config->get('content_types') as $bundle) { if ($bundle) { // Add info for Extra Field to nodes only, specific to configured // content types. This determines what shows on Manage Display. $extra['node'][$bundle]['display'][‘coral_talk_comments'] = [ 'label' => t(‘Coral Talk Comments'), 'description' => t('Place commenting on the page.'), 'weight' => 100, 'visible' => TRUE, ]; } }   // Return our new extra field. return $extra; }

After a cache clear, this new field will appear on the configured content types’ Manage Display page and can be placed on the content type along with the other fields for that content type. Now that the field is defined, it needs some info for what should be rendered to the page. This is handled by Drupal’s hook_ENTITY_TYPE_view() hook.

/** * Implements hook_ENTITY_TYPE_view(). */ function coral_talk_node_view( array &$build, \Drupal\Core\Entity\EntityInterface $entity, \Drupal\Core\Entity\Display\EntityViewDisplayInterface $display, $view_mode ) { // 1. Check to see if our new field should be rendered on the entity display. // 2. Determine whether the user has permission to add comments. $condition = ( $display->getComponent(‘coral_talk_comments') && \Drupal::currentUser()->hasPermission('create coral comment') );   if ($condition) { $config = \Drupal::config(coral_talk.settings');   // Add the new field to the $build array with a call to a custom theme // hook to render the comments. Pass necessary config into comment // settings. $build[‘coral_talk_comments'] = [ '#theme' => 'coral_talk_comments', '#domain' => $config->get('domain') ?? '', ]; } }

After another cache clear, we’ll now see our comments being rendered to our content types in whichever view mode they’re enabled on. The moves setup of comments outside of code and into a place that’s more accessible and flexible for various users.

This approach is great for simple scenarios. One drawback, however, is that it’s not possible to define any custom configuration options for these pseudo fields. Each extra field is identical, and any configuration has to be hard coded in these hooks. This presents challenges for site builders, who might want to configure comments differently per content type however. Fortunately, there is a solution in contrib that changes how Extra Fields are defined and allows for developers to add configuration to each field. In the next post, we’ll explore the Extra Field Settings Provider module.

Hook 42: Speaker Notes: Attending DrupalCon as a Presenter

1 month ago

DrupalCon 2019 was a bit different for me. I have attended previous DrupalCons, usually sitting in the back of the room just taking in all that I could from experts around the world. This year, however, I had the opportunity to be a speaker. Not only was I afforded the opportunity to speak, but I had two separate sessions accepted.

OPTASY: What Makes the End-User Experience in Drupal 8 Stand Out?

1 month ago
What Makes the End-User Experience in Drupal 8 Stand Out? adriana.cacoveanu Wed, 04/17/2019 - 07:30

What makes Drupal a great choice from a UX standpoint? What features are responsible for the enhanced end-user experience in Drupal 8? Those features that enable you to easily create an intuitive and enjoyable visitor experience on your own Drupal-based website/application.

And to constantly improve it...

Is it all those performance enhancements that it ships with? Or maybe its “responsive out-of-the-box” nature? Or rather its multilingual capabilities?
 

1. But First: 7 Evergreen Ways to Improve Your Website's UX

It goes without saying that, in order to create an enjoyable, rich user experience on your Drupal 8 website, you'll need to:
 

Amazee Labs: DrupalCon Seattle Recap - A week to remember

1 month ago
DrupalCon Seattle Recap - A week to remember

I was so excited about going to DrupalCon Seattle, I started packing one week in advance. Granted, I decided to travel light, so my carry-on suitcase quickly showed the task wouldn’t take long.

Maria Comas Tue, 04/16/2019 - 20:04

Every DrupalCon I have been lucky enough to attend has been special in their own way. This was my first time going back to the States after moving out almost two years ago, so after an airport hiccup (protip: make sure to apply for a new ESTA if you happen to renew your passport after you felt very accomplished getting it ready so much time in advance) I was happy to set my regular-sized foot onto its northwest corner.  

The week started very nicely, with some time to explore the city and enjoy a selection of its fine food. As there weren’t any sessions on until Wednesday, Tuesday was mostly hanging out with teammates and other friendly faces in the contribution room.

 Anyone else noticed how in the US bathroom stall’s doors never quite make it to the edge?

After a delicious and fun dinner where all Amazees gathered, it was party time. One of the highlights of the week was getting to attend the Museum of Pop Culture at Pantheon’s party, which featured some awesome exhibits. My favourite part was a sound lab where one could learn how to play real instruments (Louie Louie anyone?).

“Next DrupalCon we need a setlist."

Wednesday and Thursday were packed with brain-revving sessions. Gatsby, data-fetching strategies, and front-end performance were a few of the topics that got a lot of circulation on the printed schedule. But it was diversity and inclusion that rightfully took the main stage at the keynotes. Dries Buytaert began his speech acknowledging that Open Source is not a meritocracy, and Marcy Sutton and Nythia Ruff closed with essential insights on how to use our collective power to build inclusive communities and products.

All in all, there were many moments that made this past week remarkable. Many involved spending time with the team, others meeting new people. Some were expected, like the Women in Drupal luncheon. Others were not, like the Movement BoF that got me walking as if I was auditioning for the Ministry of Silly Walks.

One remarkable moment was definitely getting to give my (first ever) presentation at a DrupalCon (I can confirm, the Speakers-only room has special catering!). All of these moments made me once more very grateful for being able to be a part of this. I’m looking forward next time I get to play suitcase Tetris and find out what will make the next DrupalCon a one-of-a-kind experience.

Nonprofit Drupal posts: April Drupal for Nonprofits Chat

1 month ago

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

On the agenda this month is a report-back from DrupalCon Seattle -- including the Nonprofit Summit -- and anything else related to Drupal and nonprofits that's on our minds.

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

We have an hour to chat so bring your best Drupal topics and let's do this thing!

Some examples to get your mind firing: how do I recreate [feature] on my Drupal 7 site in Drupal 8? I need to explain [complicated thing] to a non-technical stakeholder -- any advice? How can I get Drupal and my CRM to play nicely?

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

View notes of previous months' calls.

OSTraining: How to Add Drupal Webforms to Content Types

1 month ago

An OSTraining member asked us if it was possible to connect Webforms to their content.

I can imagine a lot of use-cases for this. For example, if you have an "Events" content type, you might want a form so visitors can contact the event organizer. Or if you have a "Business" content type, it might be useful for people to contact the business.

This can be done thanks to a module called "Webform Extra Field" and in this tutorial I'll show you how.

Promet Source: How to Simplify Setup of Complex Drupal Sites with Docker and Expresso PHP

1 month ago
The ever increasing complexity and functionality of Drupal sites does not need to translate into increasingly steeper development costs. In the past, Drupal sites were relatively homogeneous with the occasional multi-domain or multi-site implementation. Today, as sites become more complex, with features such as headless integration with non-Drupal software, the overhead of reproducing an environment locally can become very costly.  Docker was created to bridge the gap between a homogeneous Drupal implementation and a complex integration with non-Drupal software.  

orkjerns blogg: Demo: Updating Drupal core automatically

1 month 1 week ago
Demo: Updating Drupal core automatically admin Tue, 04/16/2019 - 09:56

Last week Drupalcon North America was held in Seattle, where Dries opened the conference with the traditional "Driesnote". In the presentation, Dries talked about automated updates for Drupal, a thing I am very passionate about myself. He then went on to say:

I hope that in Drupalcon Amsterdam...in six months… I will be able to stand on stage and actually give some sort of demo. That would be my goal. So obviously… I would need your help with that… but that would be fantastic.

This triggered a thought: with the tools we have today, and as composer support is fairly decent, we can actually demo this somewhat utopic goal now. Which is why I made a video of just that. So without further ado: here is the demo!

 

Automatic updates and the future

This demo demonstrates tools that are available now. Instead of only focusing on those tools (and promoting violinist.io), I want to expand on the subject of automated updates in Drupal, and its future.

Like for Dries, automatic updates is an important issue to me. Not only because I promote running automated composer updates with violinist.io, but because having these features will make Drupal more viable for hobbyists and beginners. Which in turn is something that can help us reach more users, and increase our diversity. Consequently, having automated updates is important for the “non-professional” group of Drupal users.

In the presentation, Dries also points out some important positive effects of having automated updates. First, it will help securing your site (or your client's site) when time-critical security updates are released. Second, it will make it easier for organizations and agencies to maintain websites. This means that having automated updates is important for the “professional” group of Drupal users as well.

This brings us to the next segment, which mostly applies to agencies and organizations using Drupal professionally. Two issues are often raised about having automated updates. First, that moving and/or overwriting the files of your codebase is a security risk. Second, that updating files on your live server can be a no-go. Maybe you have a version control system in place. Or perhaps you have a continuous integration/deployment pipeline. Or, you have setups that deploy their codebase to multiple front-servers. The two issues are valid concerns, but usually they are less of a concern to "non-professional" users. This implies that having automated updates is important for the “professional” AND “non-professional”, but the preferred implementation for these two groups might conflict.

In my personal opinion, we can support both. Let me explain how.

My suggestion is that we can have a system in place that is pluggable in all parts. This means that the "non-professional" can use plugins that are useful for updating via the file system, and hopefully set-and-forget the automatic updates for their site. It also means that the "professional", the one with the pipeline and version control, could have entirely different plugins for updates. To get back to the video above, a pre-flight check (which is how we determine if we can update) can mean checking for pull requests for the available update, and checking that the tests pass. The plugin for updating could simply merge the pull request, since automated deploys are run for the master branch. Now, different teams have different requirements, but this means that you could use a Pantheon or Platform.sh plugin for automated updates. Or, maybe you have a custom plugin for your team that you use across projects.

I believe this feature can help automation for "professional" teams of all sizes, and make the very same system usable for "non-professionals" that want to set-and-forget. This is also why I believe having automated updates in core, is in no way in conflict with doing automated updates like in the video above. It will only complement the toolbox we currently have!

If you want to read more about the Automatic Updates initiative, there is more info here. It is an exciting future, and we can all help out in making the future more user-friendly and secure. I know I will!

Jeff Geerling's Blog: DrupalCon Seattle 2019 is a wrap! It's all about the people

1 month 1 week ago

I'm on the flight home from this year's North American DrupalCon. Couldn't sleep, so thought I'd jot down a few words after a great experience in Seattle.

Last year, some remember seeing me walking the halls in Nashville akin to a zombie. But not the hungry, flesh-eating kind... more like the thin, scraggly, zoned-out kind. Last year my health was very poor. I went to DrupalCon mostly because it was the first DrupalCon within driving distance of St. Louis since DrupalCon Chicago several years ago. In hindsight it might not have been the best idea, and I had to skip a number of events due to my health.

Since that time, I experienced a grueling surgery and recovery, and learned to live with my new friend, the stoma. (Warning: scatalogical humor ahead—hey, it's my coping mechanism!).

Promet Source: Drupal Don’ts: Pitfalls to Avoid for Site Success

1 month 1 week ago
Success with Drupal development often depends as much on knowing what NOT to do as much as what to do. If you are not “Thinking in Drupal," you are likely to develop a Drupal site using strategies that are not conducive to a: Drupal-friendly site that allows changes to be made to configuration without writing code; Site that is as accessible as it could be; and/or A low-maintenance coding strategy. Let’s take a look at common Drupal development practices that do not reflect “Thinking in Drupal.”  

Dries Buytaert: State of Drupal presentation (April 2019)

1 month 1 week ago

Last week, many Drupalists gathered in Seattle for DrupalCon North America, for what was the largest DrupalCon in history.

As a matter of tradition, I presented my State of Drupal keynote. You can watch a recording of my keynote (starting at 32 minutes) or download a copy of my slides (153 MB).

Making Drupal more diverse and inclusive

DrupalCon Seattle was not only the largest, but also had the most diverse speakers. Nearly 50% of the DrupalCon speakers were from underrepresented groups. This number has been growing year over year, and is something to be proud of.

I actually started my keynote by talking about how we can make Drupal more diverse and inclusive. As one of the largest and most thriving Open Source communities, I believe that Drupal has an obligation to set a positive example.

I talked about how Open Source communities often incorrectly believe that everyone can contribute. Unfortunately, not everyone has equal amounts of free time to contribute. In my keynote, I encouraged individuals and organizations in the Drupal community to strongly consider giving time to underrepresented groups.

Improving diversity is not only good for Drupal and its ecosystem, it's good for people, and it's the right thing to do. Because this topic is so important, I wrote a dedicated blog post about it.

Drupal 8 innovation update

I dedicated a significant portion of my keynote to Drupal 8. In the past year alone, there have been 35% more sites and 48% more stable modules in Drupal 8. Our pace of innovation is increasing, and we've seen important progress in several key areas.

With the release of Drupal 8.7, the Layout Builder will become stable. Drupal's new Layout Builder makes it much easier to build and change one-off page layouts, templated layouts and layout workflows. Best of all, the Layout Builder will be accessible.

Drupal 8.7 also brings a lot of improvements to the Media Library.

We also continue to innovate on headless or decoupled Drupal. The JSON:API module will ship with Drupal 8.7. I believe this not only advances Drupal's leadership in API-first, but sets Drupal up for long-term success.

These are just a few of the new capabilities that will ship with Drupal 8.7. For the complete list of new features, keep an eye out for the release announcement in a few weeks.

Drupal 7 end of life

If you're still on Drupal 7, there is no need to panic. The Drupal community will support Drupal 7 until November 2021 — two years and 10 months from today.

After the community support ends, there will be extended commercial support for a minimum of three additional years. This means that Drupal 7 will be supported for at least five more years, or until 2024.

Upgrading from Drupal 7 to Drupal 8

Upgrading from Drupal 7 to Drupal 8 can be a lot of work, especially for large sites, but the benefits outweigh the challenges.

For my keynote, I featured stories from two end-users who upgraded large sites from Drupal 7 to Drupal 8 — the State of Georgia and Pegasystems.

The keynote also featured quietone, one of the maintainers of the Migrate API. She talked about the readiness of Drupal 8 migration tools.

Preparing for Drupal 9

As announced a few months ago, Drupal 9 is targeted for June 2020. June 2020 is only 14 months away, so I dedicated a significant amount of my keynote to Drupal 9.

Making Drupal updates easier is a huge, ongoing priority for the community. Thanks to those efforts, the upgrade path to Drupal 9 will be radically easier than the upgrade path to Drupal 8.

In my keynote, I talked about how site owners, Drupal developers and Drupal module maintainers can start preparing for Drupal 9 today. I showed several tools that make Drupal 9 preparation easier. Check out my post on how to prepare for Drupal 9 for details.

Thank you

I'm grateful to be a part of a community that takes such pride in its work. At each DrupalCon, we get to see the tireless efforts of many volunteers that add up to one amazing event. It makes me proud to showcase the work of so many people and organizations in my presentations.

Thank you to all who have made this year's DrupalCon North America memorable. I look forward to celebrating our work and friendships at future events!

Sooper Drupal Themes: Drupal vs. TYPO3: the Enterprise CMS Battle of the Century

1 month 1 week ago
Drupal and TYPO3

Depending on your needs, you can choose a more simplistic CMS like Wordpress. However, when it comes to businesses and enterprises, a CMS like wordpress won’t cut it. This leaves us with two popular open source options, TYPO3 and Drupal. Both are priding themselves to be the go to CMS for enterprises. In this article, I’m going to make a comparison of both TYPO3 and Drupal.

First things first. TYPO3 is an open source content management system that is written in PHP. Its author, Kasper Skårhøj, has released it in 1998. Drupal is also written in PHP, its author Dries Buytaert, first released it in the year 2000, making TYPO3 the older CMS between them both.

Drupal and Typo3 are the only CMS in the top 10 most used platforms that are aimed at Enterprise organizations.

Market Share

By the end of 2018 TYPO3 had a market share of 1.5%, making it the 8th most used CMS at this time. This means that out of all websites in the world, 1.5% of them were built using TYPO3. Drupal on the other hand, had a market share of 4.6%, making it the third most popular CMS to date. Despite the fact that Drupal is slightly younger, it still managed to capture a larger audience compared to TYPO3. But why is that?

Open Source CMS

Drupal and TYPO3 are both open source. What this means is that the code is available to the general public. This results in developers being able to add different pieces of code by themselves, constantly improving the software. Both have dedicated communities which aim to further improve the performance of the CMS’s.

Performance

When it comes to the performance, both of these platforms have a wide range of modules and extensions. The modules and extensions are basically improvements on the core of both. Thus resulting in a high performance and flexibility on both sides. When it comes to extensions, TYPO3 has 60.000+ of them available, making sure that there is something specific to fulfill any users needs. Drupal also boasts a wide variety of modules, which gives the CMS the ability to cater to the needs of every user. Unlike Drupal, TYPO3 also runs an internal language called TypoScript. Users can leverage it to build additional elements including dynamic content.

Drupal allows the creation and management of different types of content such as text, blogs, videos, podcasts, images etc.

TYPO3 is also able to handle forms, tables, images and different pieces of multimedia. It also allows a lot of control over the layout of the page.

Language support

TYPO3 is famed for its massive availability in over 50 languages. However, Drupal is available in over 100 languages. This makes it even more impressive when it comes to the high degree at which Drupal is able to help with the needs of its users.

Scalability

Scalability is defined by the desirable property of a website to be able to handle a growing amount of work in a timely and elegant manner. Both were engineered to be able to handle large amounts of data and traffic. This makes them both desirable for large enterprise websites.

Security

Security is one of the areas that both systems are putting a lot of effort in. Given the fact that they have to protect the costly data of large universities, enterprises and businesses, both are taking this matter seriously. Drupal and TYPO3 both have security teams that are constantly searching for vulnerabilities to report to the communities, while also working on fixing the issues. These are the reasons why both Drupal and TYPO3 are both trusted by enterprises and business when it comes to security issues.

Cost Of Implementation

Compared to CMS that are not Enterprise-grade, Drupal and TYPO3 are both more difficult to be installed and be properly customized. Both systems are offering plenty of options for developers to be able to specifically customize the website to meet the user specific needs. This comes at a price however. The price to be paid for such high customizability comes in the form of a steep learning curve. This makes it hard for beginners to fully maximize the potential of both CMS’s. On top of that, learning TYPO3 seems to be more complicated than to learn Drupal. Because of the simple fact that TYPO3 uses also TypoScript. It is the internal language of the system which has to be learned in order to master the CMS.  

One advantage with Drupal is that you can install our visual page editor module and provide a state-of-the-art design and editing experience to your client or your communication department

Conclusion

In conclusion, both CMS’s are legit options when it comes to developing huge scale websites for businesses or enterprises. However, choosing one of them rests entirely on each user’s specific needs. Also, Drupal still has a larger market than TYPO3. Even though it is the younger of them both. This means that Drupal is able to better cater to the specific needs of its users, compared to its competition.

Sven Decabooter: How to add classes / attributes to Drupal 8 local tasks

1 month 1 week ago
How to add classes / attributes to Drupal 8 local tasks

Drupal 8 allows you to define custom tabs (a.k.a. local tasks) in your custom module.
For theming purposes, it might be necessary to add a class, ID, or other HTML attribute to the tab link.

Here is how this can be achieved when defining the local task in your [modulename].links.task.yml:

entity.node.custom: route_name: entity.node.custom base_route: entity.node.canonical title: 'Custom local task / tab' options: attributes: class: - 'my-custom-class'

If you want to add an attribute to a local task that is not defined in your custom module, you could use a preprocess function in your theme or module:

/** * Implements hook_preprocess_menu_local_task(). */ function MYTHEME_preprocess_menu_local_task(&$variables) { /** @var \Drupal\Core\Url $url */ $url = $variables['link']['#url']; if ($url instanceof \Drupal\Core\Url && $url->getRouteName() == 'entity.node.custom') { $variables['link']['#options']['attributes']['class'][] = 'my-custom-class'; } }

Replace the route name in the example above, with the route name of the tab you wish to change the HTML attributes for.

Sven Decabooter Mon, 04/15/2019 - 11:17

Jeff Geerling's Blog: Running Drupal in Kubernetes with Docker in production

1 month 1 week ago

Since 2014, I've been working on various projects which containerized Drupal in a production environment. There have always been a few growing pains—there will for some time, as there are so few places actually using Docker or containers in a production environment (at least in a 'cloud native' way, without tons of volume mounts), though this is changing. It was slow at first, but it's becoming much more rapid.

You might think that Drupal and Docker work together nicely. They definitely can and do, in many cases, as we see with local development environments built around Docker, like Docksal, Ddev, Lando, and even Drupal VM. But local development environments, where the Drupal codebase is basically mounted as a volume into a Docker container that runs the code, differ radically from production, where the goal is to 'contain' as much of production into a stateless container image as possible, so you can scale up, deploy, and debug most efficiently.

Drupal blog: The privilege of free time in Open Source

1 month 1 week ago

This blog has been re-posted and edited with permission from Dries Buytaert's blog.

Open Source communities often incorrectly believe that everyone can contribute. Unfortunately, not everyone has equal amounts of free time to contribute.

On this page:

In Open Source, there is a long-held belief in meritocracy, or the idea that the best work rises to the top, regardless of who contributes it. The problem is that a meritocracy assumes an equal distribution of time for everyone in a community.

Open Source is not a meritocracy

I incorrectly made this assumption myself, saying: The only real limitation [to Open Source contribution] is your willingness to learn.

Today, I've come to understand that inequality makes it difficult for underrepresented groups to have the "free time" it takes to contribute to Open Source.

For example, research shows that women still spend more than double the time as men doing unpaid domestic work, such as housework or childcare. I've heard from some of my colleagues that they need to optimize every minute of time they don't spend working, which makes it more difficult to contribute to Open Source on an unpaid, volunteer basis.

Or, in other cases, many people's economic conditions require them to work more hours or several jobs in order to support themselves or their families.

Systemic issues like racial and gender wage gaps continue to plague underrepresented groups, and it's both unfair and impractical to assume that these groups of people have the same amount of free time to contribute to Open Source projects, if they have any at all.

What this means is that Open Source is not a meritocracy.

Free time is a mark of privilege, rather than an equal right. Instead of chasing an unrealistic concept of meritocracy, we should be striving for equity. Rather than thinking, "everyone can contribute to open source", we should be thinking, "everyone deserves the opportunity to contribute".

Time inequality contributes to a lack of diversity in Open Source

This fallacy of "free time" makes Open Source communities suffer from a lack of diversity. The demographics are even worse than the technology industry overall: while 22.6% of professional computer programmers in the workforce identify as women (Bureau of Labor Statistics), less than 5% of contributors do in Open Source (GitHub). And while 34% of programmers identify as ethnic or national minorities (Bureau of Labor Statistics), only 16% do in Open Source (GitHub).

It's important to note that time isn't the only factor; sometimes a hostile culture or unconscious bias play a part in limiting diversity. According to the same GitHub survey cited above, 21% of people who experienced negative behavior stopped contributing to Open Source projects altogether. Other recent research showed that women's pull requests were more likely to get accepted if they had a gender-neutral username. Unfortunately, examples like these are common.

Taking action: giving time to underrepresented groups

While it's impossible to fix decades of gender and racial inequality with any single action, we must do better. Those in a position to help have an obligation to improve the lives of others. We should not only invite underrepresented groups into our Open Source communities, but make sure that they are welcomed, supported and empowered. One way to help is with time:

  • As individuals, by making sure you are intentionally welcoming people from underrepresented groups, through both outreach and actions. If you're in a community organizing position, encourage and make space for people from underrepresented groups to give talks or lead sprints about the work they're interested in. Or if you're asked to, mentor an underrepresented contributor.
  • As organizations in the Open Source ecosystem, by giving people more paid time to contribute.

Taking the extra effort to help onboard new members or provide added detail when reviewing code changes can be invaluable to community members who don't have an abundance of free time. Overall, being kinder, more patient and more supportive to others could go a long way in welcoming more people to Open Source.

In addition, organizations within the Open Source ecosystem capable of giving back should consider financially sponsoring underrepresented groups to contribute to Open Source. Sponsorship can look like full or part-time employment, an internship or giving to organizations like Girls Who CodeCode2040Resilient Coders or one of the many others that support diversity in technology. Even a few hours of paid time during the workweek for underrepresented employees could help them contribute more to Open Source.

Applying the lessons to Drupal

Over the years, I've learned a lot from different people's perspectives. Learning out in the open is not always easy, but it's been an important part of my personal journey.

Knowing that Drupal is one of the largest and most influential Open Source projects, I find it important that we lead by example.

I encourage individuals and organizations in the Drupal community to strongly consider giving time and opportunities to underrepresented groups. You can start in places like:

When we have more diverse people contributing to Drupal, it will not only inject a spark of energy, but it will also help us make better, more accessible, inclusive software for everyone in the world.

Each of us needs to decide if and how we can help to create equity for everyone in Drupal. Not only is it good for business, it's good for people, and it's the right thing to do.

Special thanks to the Drupal Diversity and Inclusion group for discussing this topic with me.

 April 10, 2019

 3 min read time

 Permalink

Amazee Labs: DrupalCon Seattle Day 4 Recap: Amazee Sessions

1 month 1 week ago
DrupalCon Seattle Day 4 Recap: Amazee Sessions

DrupalCon been a very productive conference so far. The first two days of pre-conference sprinting resulted in fixing the testing pipeline of the webpack module, a prototype for using Drupal as a datasource for Gatsby using GraphQL instead of JSON:API and even solved an unexpected issue for the devel module to provide a way to load dump an entity with all its references embedded inside. You can read more about these solutions here.

Blazej Owczarczyk Fri, 04/12/2019 - 17:45

After a good Wednesday afternoon, breathing in the calming air of Seattle, Thursday came and it started for me with a breakfast with Victor. He ordered his favourite meal - the Fresh French Croissant and after a short meal, we headed to the venue.

I decided to start the day with the Web components BoF led by Salem Ghoweri. Pega systems use web components a lot and it was interesting to learn about the advantages and pitfalls. IE 11 seems to be the biggest obstacle, especially when it comes to the shadow dom. Polyfilling it is very expensive computationally, so what they did is to actually ditch the shadow dow in browsers that don’t support it natively. In general, looks like web components are getting traction and IE is the main problem, so same as 5 years ago.

The next spot was the GraphQL 101: What, Why, How session by my friend Maria Comas. It started with a brief history of the query language followed by its definition.

I learned that the reason to build the GraphQL spec at Facebook was because of the need to find a tool that is powerful enough to handle everything Facebook does while staying simple enough so that it’s easy to comprehend by the product developers. The thing Maria likes most about GraphQL is that it is a tool that changes human behaviour.

The session finished on time and there were hardly any questions so we had time to get the best seats for the next Amazee session:  CSS-in-JS and Drupal sitting in a tree... by John Albin Wilkins. On our way there Victor, grave as always decided to make use of his hipster camera and take this photo of me. No comment.

John is a natural so his sessions are always entertaining and packed with great content. In this one, he compared 3 different ways of doing CSS-in-js which are:

  • CSS in object literals

  • CSS in template literals and

  • CSS in files (CSS modules)

The session summarized the two years of our adventures with the topic while doing both fully and progressively decoupled projects. TLDR; John recommends CSS modules, mostly because it’s the only tool that makes it possible to share the styles between javascript and Drupal. If you’re interested in this topic I would encourage you to check out the recording for the reasoning and lots of interesting details.

After that, I headed to the Considerations of Federated Search and Drupal session by Adam Bergstein. The ability to find content that originates from many different websites is a hard topic which is required by the enterprise clients quite often, so I thought it might be interesting.

Nerdstein started with a high level, generic overview of the system. The structure is similar to what we have in Drupal migrations. He recommended using scrapy. It’s a tool from the python ecosystem which is great because there are many great data manipulation and natural language processing packages. Scrapy also has many destination plugins, e.g. for elastic search, so it’s easy to insert data directly into the search index.

Next, there was lunch and an unexpected booth on the way there - a box with cute, fluffy creatures.

I’m not really sure how they ended up there but they definitely made lots of people happy. Here are some photos. Hopefully, they will make you happy as well.

Checked
57 minutes 24 seconds ago
Drupal.org - aggregated feeds in category Planet Drupal
Subscribe to Planet Drupal feed