Gizra.com: How We Theme in Gizra with PEVB and a Composable Approach

Theming is hard. It’s usually the most time-consuming part in our work. Writing a DB query or baking logic into a Drupal hook is the easy part. The main challenge is making an element look like the design and appear correctly on different devices and browsers.

Our main goals remain the same as from this post:

  1. Standardization in multiple projects
  2. Reduction in cognitive load
  3. Optimization for rewrites

All the code examples in this post are inside our Drupal-starter. You can install it locally, and see all the elements under the Style guide page - https://drupal-starter.ddev.site:4443/style-guide. The Drupal-starter code base is used as the starting point of our projects, so you’ll find it very mature!

Image removed. An example News node on a fresh Drupal starter

A quick reminder is that for theming, we’re using the Pluggable entity view builder module, known as PEVB.

Back to our problem - we don’t want to theme the same things over and over again. This sounds trivial, but I’m sure many are doing that. We have! Here’s an example of two different twig files:

<div class="flex flex-col gap-y-3 md:gap-y-5"> {{ title }} {{ body }} </div> <div class="flex flex-col gap-y-3 md:gap-y-5"> {{ author }} {{ teaser }} {{ date }} </div>

The cards’ contents differ but the wrapper classes are the same. Also, the chances of changing the gap on one twig file and forgetting the other are high. At least for us, on bigger projects, updating the gap on only some files was a common thing.

Let’s think of the designer for a moment. Should the gap between items be 20px or 24px? The answer, for us, is “whatever works best as long as it’s consistent™.” If one card is 20px, then all cards should be the same. To deal with that, we have a limited set of trait methods:

  1. wrapContainerVerticalSpacing (20px)
  2. wrapContainerVerticalSpacingTiny (2px)
  3. wrapContainerVerticalSpacingBig (40px)
  4. wrapContainerVerticalSpacingHuge (60px)

LN Webworks: Drupal Features:The Essentials You Need to Know

Are You Wondering If Drupal Will Fit in With Your Business or Organization? Look No Further. This comprehensive Drupal guide has been composed by experienced Drupal experts to give a detailed introduction into this popular content management system. Due to Drupal's frequent iterations releases, this guide highlights key features essential for regular CMS users. What Makes a Good CMS? A good CMS serves as the cornerstone of your digital presence, so choosing one requires both technical and commercial considerations. Your CMS selection must address both current business challenges and opportunities while looking toward your long-term digital goals. As you evaluate a content management system, it's important to keep in mind the following aspects when assessing it: functional requirements of the CMS; users' technical skill levels and delivery channels; costs involved and associated with content delivery channels. An ideal CMS will meet all these needs and more while serving as the backbone of your digital strategy.

LN Webworks: The Power of Experience-led E-commerce: Combining Content and Commerce with Drupal

An E-commerce business must create a compelling and engaging shopping experience for attracting and retaining customers. To achieve this, E-commerce sites are increasingly turning to experience-led approaches, combining content and commerce to make shopping enjoyable for shoppers. When it comes to the experience-led approach, Drupal is an excellent choice for businesses. Drupal’s flexibility, scalability, and powerful CMS are tailor-made to engage and delight your customers. In this article, you will learn why Drupal is best for experience-led commerce and how Drupal Ecommerce Development Services can help your business stay ahead in the market.  Why use Drupal for Experience-led Commerce? Drupal has gained significant attention in recent years for its ability to deliver exceptional user experience for E-commerce businesses worldwide. Discover why Drupal commerce is the best fit for building Experience-led commerce:

Gizra.com: How AI Tools Streamline Everyday Tasks for Developers

The world of software development is constantly evolving, and with the recent advancements in AI technologies, developers now have powerful tools at their disposal to help with everyday tasks. In this blog post, we will discuss how AI tools like ChatGPT and GitHub CoPilot have made a significant impact on our workflow, increasing productivity and improving the quality of our work.

GitHub CoPilot: The AI-Powered Assistant for Developers

I have been using GitHub CoPilot since August 2022, and it has proven to be an invaluable asset. It has provided the following benefits:

Speeding Up Smaller Tasks

GitHub CoPilot has significantly sped up smaller tasks such as creating demo content in CSV files, updating hooks, and managing dependency injections. This has allowed our developers to focus more on complex tasks and problem-solving.

Dependency Injection is a fundamental part of Drupal development, and it’s a chore that we need to do over and over again. Here’s how CoPilot speeds it up for an existing class:

Your browser does not support the video tag. Injecting renderer service into an existing class

Demo content is essential for our way of developing and it also makes testing much easier. But the creation of such content was, well, boring. Here’s how CoPilot speeds it up:

Your browser does not support the video tag. Generating meaningful demo content in CSV files

Acquia Developer Portal Blog: How to work with Code Studio Automated Code Updates

Image removed.

As a developer, we’ve all experienced the time it takes to maintain a Drupal application, let alone 100s. Pulling the latest code changes, creating a new feature branch, syncing the DB from PROD to grab the latest content, updating composer, exporting configuration and pushing back up. Even if you are already set up with a local or Cloud IDE, this can take some time. Yes, there are tools we can use to speed up this process, drush, hosting CLIs, automated scripts… but again, this is just more to maintain and update to newer versions, when PHP or other software gets released. 

As you know, a CI/CD pipeline is also one of the most valuable tools a team can use to ensure the code is scanned for governance, standards and security. Acquia CI/CD Pipelines has been the solution for many of our clients in order to build