Discover the innovative journey of Drupal Gutenberg through the insights of Thor Andre Gretland, Head of Sales and Business Advisor at Frontkom. In an exclusive interview with The DropTimes, Thor Andre unveils how Gutenberg is revolutionizing the Drupal ecosystem, enhancing content creation, and bridging communities. Learn about the groundbreaking collaboration between WordPress and Drupal, the challenges addressed, and the future of open-source CMS development. From improving user experience to addressing digital marketing needs, this interview is a deep dive into the evolving world of content management.
Originally from Drupal.org aggregator https://ift.tt/2LDGdQU
0 Comments
Rector is a tool for making changes to PHP code, which powers tools that assist with upgrading deprecated code in Drupal. When I recently made some refactoring changes in Drupal Code Builder, which were too complex to do with search and replace regexes, it seemed like a good opportunity to experiment with Rector, and learn a bit more about it. Besides, I'm an inveterate condiment-passer: I tend to prefer spending longer on a generalisation of a problem than on the problem itself, and the more dull the problem and the more interesting the generalisation, the more the probability increases. So faced with a refactoring from this return from the
to this:
which was going to be tedious as hell to do in a ton of files, obviously, I elected to spend time fiddling with Rector. The first thing I'll say is that the same sort of approach as I use with migrations works well: work with a small indicative sample, and iterate small changes. With a migration, I will find a small number of source rows which represent different variations (or if there is too much variation, I'll iterate the iteration multiple times). I'll run the migration with just those sources, examine the result, make refinements to the migration, then roll back and repeat. With Rector, you can specify just a single class in the code that registers the rule to RectorConfig in the rector.php file, so I picked a class which had very little code, as the dump() output of an entire PHP file's PhpParser analysis is enormous. You then use the rule class's I rewrote
Returning NULL from With the arrays that made it through the filter, I needed to make a new node that's a class instantiation, to replace the array, passing the same values to the Rector's list of commonly used PhpParser nodes was really useful here. A
This doesn't have any parameters yet, but running Rector on this with my sample set showed me it was working properly. Rector has a dry run option for development, which shows you what would change but doesn't write anything to files, so you can run it over and over again. What's confusing is that it also has a cache; until I worked this out I was repeatedly confused by some runs having no effect and no output. I have honestly no idea what the point is of caching something that's designed to make changes, but there is an option to disable it. So the command to run is: Once that worked, I needed to convert array items to constructor parameters. Fortunately, the value from the array items work for parameters too:
That gave me the values. But I wanted named parameters for my constructor, partly because they're cool and mostly because the CodeFile class's Inspecting the
Using named parameters here too to make the code clearer to read! It's also possible to copy over any inline comments that are above one node to a new node:
The constructor parameters are passed as a parameter to the
Once this was all working, I decided to do some more refactoring in the CodeFile class in DrupalCodeBuilder. The changes I was making with Rector made it more apparent that in a lot of cases, I was passing empty values. Also, the Changes like this are really easy to do (though by this point, I had made a git repository for my Rector rule, so I could make further enhancements without breaking what I'd got working already).
And that's my Rector rule done. Although it's taken me far more time than changing each file by hand, it's been far more interesting, and I've learned a lot about how Rector works, which will be useful to me in the future. I can definitely see how it's a very useful tool even for refactoring a small codebase such as DrupalCodeBuilder, where a rule is only going to be used once. It might even prompt me to undertake some minor refactoring tasks I've been putting off because of how tedious they'll be. What I've not figured out is how to extract namespaces from full class names to an import statement, or how to put line breaks in the Originally from Drupal.org aggregator https://ift.tt/SIt4JQm
Introducing Operations Site Runner: a self-hosted CI/CD platform using GitHub Actions and DDEV. admin
I've been building and designing automation systems for almost 20 years. I built DevShop on top of Aegir to implement continuous integration and quality control over 10 years ago. Running CI systems is hard. Really hard. There needs to be an active task runner. A dashboard. API integrations. Tooling. Network Access. It can be incredibly complicated. In the Enterprise? Forget it. I've been imagining a new system for many years, and here it is. Originally from Drupal.org aggregator https://ift.tt/jFSVxCQ Drupal Association blog: 5 Unmissable Attractions to Explore Around DrupalCon Portland 20245/3/2024 Portland, Oregon – the Rose City, home to an array of charming experiences that extend beyond the walls of this year's much-anticipated DrupalCon. While knowledge sharing and the industry buzz at the Oregon Convention Center will undoubtedly be the main draw, the locale offers a diversity of attractions, from serene parks to bustling markets. For those fortunate enough to attend DrupalCon, it would be a miss not to maximize your time and immerse yourself in the unique culture Portland has to offer. Here are five more local attractions, in addition to our previous recommendations, that promise to enrich your DrupalCon experience and provide unforgettable memories. 1. Cruise the City on E-Scooters around Peace Memorial ParkSW corner of NE Oregon St and, NE Lloyd Blvd, Portland, OR 97232 Arriving in Portland, the first thing visitors often notice is the city's commitment to sustainability and the vibrant outdoor lifestyle. What better way to experience this than by gliding through the renowned bike paths and urban green gardens on an E-Scooter? A stone's throw away from the Oregon Convention Center, Peace Memorial Park provides a picturesque setting that is perfect for a leisurely ride. With the Willamette River flowing alongside and the skyscrapers beyond the riverbank, this sanctuary of serenity is a stark contrast to the bustling city center. 2. Discover the charm of Portland’s most historic rose garden400 SW Kingston Ave, Portland, OR 97205, United States Known as the City of Roses, Portland proudly hosts the International Rose Test Garden, the oldest of its kind in the United States that has been in continuous operation. With the arrival of spring, there's no better moment to witness the garden's vibrant first blooms. Showcasing over 10,000 roses across 610 varieties, the garden not only offers a breathtaking display but also serves a crucial role in the cultivation and testing of new rose species. As a sanctuary for hybrid roses from across the globe, the garden continues its legacy of innovation and preservation in the heart of Portland. 3. Savor Artisanal Coffee at Roseline Coffee Cafe & Roastery321 NE Davis St, Portland, OR 97232 Portland is known for its craft coffee culture, and Roseline Coffee Cafe & Roastery stands as a testament to this. Just moments from the convention center, this local favorite offers a welcoming reprieve from the conference crowds. Here, you can try blends and single-origin roasts that represent the pinnacle of Portland's coffee craft. Whether you’re an espresso aficionado or simply in need of a caffeine hit, the experience at Roseline will elevate your DrupalCon visit. 4. Explore Exhibitions At The Portland Art Museum1219 SW Park Ave, Portland, OR 97205 Just a brief drive from the Oregon Convention Center, the Portland Art Museum stands as Oregon's largest and one of the nation's oldest art institutions. Nestled within two historic buildings in Portland’s South Park Blocks, a key part of the city's cultural district, the museum boasts an extensive and diverse art collection. Visitors can purchase Portland Art Museum tickets online or at the museum, with adult admission priced at $25. The Museum offers a wide array of exhibitions, from in-depth retrospectives of individual artists to comprehensive historical surveys and significant traveling exhibitions from across the globe. These exhibitions showcase pieces from the museum's own collection alongside masterpieces loaned from other museums and private collections worldwide. 5. Immerse Yourself in the Quirkiness of the Portland Saturday Market2 SW Naito Pkwy, Portland, OR 97204 If your stay in Portland includes the weekend, the Portland Saturday Market offers a vibrant immersion into the local eccentricity and artisanal zeal that define the City of Roses. A visit to this lively gathering can be enriching and is just a short drive away from the Oregon Convention Center. Wandering through the maze of stalls, you’ll find an array of handcrafted delights – from jewelry to leather goods, pottery to fine art – all lovingly crafted by the city’s talented makers. The sounds of live music and the aroma of delectable local cuisine will captivate your senses, while the palpable sense of community will remind you of the inclusive spirit that saturates Portland's identity. Whether you're making a purchase or simply taking in the scene, the Saturday Market encapsulates the heart and soul of the city, making it a must-visit destination. --- With these five enriching experiences, your DrupalCon excursion will extend far beyond the convention doors. You'll build lasting connections with both the Drupal community and the diverse tapestry of Portland. Whether you're charting a solo adventure or teaming up with fellow tech enthusiasts, these local highlights are poised to enhance your trip with a delightful blend of tranquility, creativity, and community. Originally from Drupal.org aggregator https://ift.tt/dvb2p6y
Step behind the curtain of DrupalCon Portland's keynote lineup and immerse yourself in a world of innovation and expertise. Join us as we unveil exclusive insights from industry leaders, including Cristina Chumillas, Janez Urevc, Ted Bowman, Fran Garcia-Linares, Jürgen Haas, and Mateu Aguiló Bosch, offering a tantalizing glimpse into the transformative sessions awaiting attendees
Originally from Drupal.org aggregator https://ift.tt/eYGNhDq Congratulations to the inaugural members of the new Project Update Working Group. This is a new working group tasked with helping maintainers prepare contributed projects for the next major release of Drupal core. The inaugural members are as follows:
The group will work in the coming weeks to establish processes and changes required to Drupal.org to facilitate the role. If you wish to get in touch and say congratulations, you can find them in the #project-update-working-group channel on slack. Originally from Drupal.org aggregator https://ift.tt/onCi038 For higher ed institutions, the need to manage updates for multiple websites is an ongoing struggle. Each site should reflect the distinct identity of a given school or department. But as each website’s CMS, frontend design, and backend architecture diverge, any organization will need to grapple with the necessary upkeep. Columbia School of Professional Studies (SPS) faced this situation with three separate websites. One site presents summer courses, another targets high school students with pre-college offerings, and the third is the traditional SPS website. Each domain serves a different audience and is managed by a small team. As each website continued to diverge, users found it difficult to recognize them as part of the same school. Worse yet, the three websites were on two different versions of Drupal and had grown difficult to maintain, as one platform was reaching its end of life. SPS came to Four Kitchens seeking an upstream solution to provide relief. In this preview ofan upcoming presentation at DrupalCon Portland 2024’s Higher Education Summit, the Config Split module has a newer feature that cleared the way for an efficient resolution. How an upstream platform streamlines diverging websitesColumbia SPS needed a solution that would resolve multiple nagging issues. In much the same way that a design system streamlines operations by creating a centralized content resource, an upstream platform enables multiple websites to share a single codebase. Along with bringing the organization’s Drupal instances into alignment and reducing technical debt, the approach offered three core advantages:
To make sure each site could still offer a distinct experience, Columbia didn’t want to share content or merge each website into one. They primarily wanted to make each easier to manage for their team. Offer shared (but distinct) experiences through Config SplitCreating an upstream platform for Columbia SPS hinged on the Configuration Split Drupal module. Put simply, this module allows you to apply a different configuration to a website to suit specific scenarios. You can use Config Split to make sure you only see error logs on your test environment (not your live site). However, Columbia SPS still wanted its three websites to offer distinct features. To enable this flexibility, we used a newer feature in the 2.x versions of the module called Config Patch. This feature allows Columbia SPS to apply part of a website configuration to each website. For example, each university website may share the same article structure. But one website can support a distinctive CTA component at the bottom. Columbia SPS now has that flexibility — and it doesn’t cause chaos from a website maintenance standpoint. With Config Patch, Columbia can use a single code repository to maintain three sites that have their own distinct details within the same baseline features. We also provided SPS with a base demo site that keeps Config Split from allowing too much flexibility. Adding rules to settings.php provides a home for the logic for each site to make sure they follow the proper configuration. Plus, the demo site functions as a mold if the organization needs to add a new website. Along with providing support for the organization’s current needs, the upstream platform provides support for the future. Avoiding pitfalls of upstream platforms in higher edImplementing an upstream solution for Columbia SPS enabled the university to run its separate sites more efficiently and provide a more consistent experience. Just as importantly, the institution escaped the shadow of a Drupal 7 migration, which stands as a major benefit for the organization. However, adopting an upstream platform carries its own complications. For all the advantages Columbia SPS gained, the organization also needs to be mindful of a few potential pitfalls of an upstream platform:
Upstream platforms offer efficiency and consistency for higher edNavigating the specific needs for multiple websites is a persistent challenge for higher ed institutions. On the one hand, delivering a consistent experience drawn from a single codebase is easier to manage, especially for a small, centralized IT team. On the other hand, individual departments and schools have specific design and functionality needs. They should be able to offer website experiences distinct from the look and feel of your core website. With an upstream platform, you gain the functionality to serve both needs. The solution introduces new complexity, but with an experienced development partner, a multisite platform allows your team to work more efficiently. Better still, if your organization needs to maintain multiple platforms as your websites have diverged, you gain key benefits from addressing needed upgrades. Would this kind of solution help your organization? Let us know how we can help. DetailsIf you’re going to DrupalCon Portland 2024, please make sure to attend the Higher Education Summit to hear directly from Mike and the team at Columbia SPS. Where: Oregon Convention Center (777 NE Martin Luther King Jr. Blvd, Portland, OR 97232), Room C123-124 When: Thursday, May 9, 2024, 9:00am – 4:00pm The post Aligning diverging websites with an upstream platform through Drupal appeared first on Four Kitchens. Originally from Drupal.org aggregator https://ift.tt/FgydXwn Navigation module makes use of Layout Builder to construct the navigation toolbar. There have been some questions about this decision in Slack. This post discusses the background. In #3397058: Convert navigation sections to blocks and use the menu system the navigation module added a plugin system and config entity for 'navigation blocks'. These were very nearly identical to block plugins and block config entities. The primary difference was the config entities did not depend on a theme like block config entities do. In #3411099: Create an administration UI for managing Navigation Blocks a UI was added for editing and managing navigation blocks. This duplicated further code from the block module. #3438895: Add the new Navigation to core as an Experimental module was the issue to add the navigation module to core. This point was the first time that many core committers had looked at the code. As part of a Framework Manager review of the issue, the amount of duplication between the block and navigation modules was raised. Until this point the navigation module lived in contrib and did not have a chance to change code in core. But now that it was a merge request against core, changing core was a possibility. As a result the Framework Managers made an attempt to modify the theme-assumption in the block system to support the navigation use-case. This resulted in a less than ideal scenario where Block::getTheme() could return null or an empty string in some scenarios. Whilst it was possible to fix all calls in core, the impact this could have on contrib and custom code felt like it would be problematic. At this point the idea of using Layout Builder's section storage as a data-model for the blocks in navigation was floated. Layout Builder's section storage provides a data-model that allows placing and configuring block plugins but without block config entities. There is no dependency between these block placements and a theme. Layout Builder also includes an API for limiting which blocks can be used where, which was also a requirement for the navigation module. Not all block plugins would work inside the navigation toolbar. The Framework Managers worked on the core merge request to assess the feasibility of this change. The net result was the removal of 4,000 lines of code but with largely the same functionality. As a result, the version of the navigation module that was committed to Drupal 10.3.0 and 11.x depends on the Layout Builder module. Sites who don't use Layout Builder for building entity displays can continue to use their preferred approach. Having Layout Builder enabled doesn't change how entities are rendered unless you enable it on a per entity-bundle-display basis. Prior to 10.3 there were performance issues from the number of block plugins derived by Layout Builder. But from 10.3 sites can now control and prevent this. The Navigation initiative has created a list of follow-up issues for the usability of Layout Builder when configuring the navigation toolbar. Some of these overlap with existing usability issues for Layout Builder. In addition the recently announced Experience builder initiative will invest in improving Layout Builder usability. Finally, the Dashboard initiative is also using Layout Builder for handling block placements. When we standardise on a solution and work together to improve it, it will lead to improvement across the board. Originally from Drupal.org aggregator https://ift.tt/lWsNezh
Click to set custom HTML
Click to set custom HTML
|
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
April 2023
Categories |