Category: News
It’s Showcase Shorts time! Designing a new home for all things UX, a sneak peak at what’s coming in WP 4.3 and a ton more!
Hello Community Members,
Welcome to this edition of ‘Showcase Shorts’ which is full to the brim with updates on our progress in delivering our roadmap.
This time we kick off with our Moodle Workplace update, with updates on our progress with delivering IDEA-131 ‘Manually Assigned Manager’, which will make integration with a wider variety of external HR systems easier in the future.
The Workplace team also completed a number of improvements in support of requests made by our Premium Partners which informed more than half of our priorities this sprint.
For Moodle LMS, the teams progressed with the delivery of the following:
-
IDEA-31, providing ongoing enhancements to the functionality and usability of our Gradebook;
-
IDEA-152, designed to make adding LTI external tools to courses easier for educators;
-
IDEA-16, which will see us enhance our course management, back up & roll-over capabilities;
-
IDEA-158, bringing to life the second phase of our integration with MoodleNet, enabling bi-directional sharing of whole courses between our platforms; and
-
IDEA-183, the newest feature voted for by the MUA, supporting the setting of course-level defaults for course completion.
Our journey towards delivering the most secure version of Moodle LMS ever continues, with more security-focused improvements completed during the sprint.
During the sprint, the Moodle Mobile Applications team proudly released version 4.2 of the Moodle LMS Mobile App, packed full of new features and functionality. Read the announcement for all the details.
We are also continuing our work on making the journey for new users on MoodleCloud easier with the development of a new starter course, designed to help them see the potential of Moodle come to life.
And finally, as always, our Moodle Community Sites team continues to improve the tools we make available to you. We are currently working on improving the UX resources we make available to the community and the searchability of Moodle Plugins.
Until next sprint!
The Moodle Products Team
Specbee: Component-based theming with Drupal’s Single Directory Component
This component-based approach of theming a Drupal application isn’t new but it finally has made it to the core. It gives a whole new frontier for front-end devs to organize their code in a way that is more maintainable with a minimal learning curve. Within SDC, all files necessary to render the component (Twig, CSS, JS, etc.) are grouped together in a single directory. SDC has the potential to revolutionize front-end development in Drupal by empowering developers to leverage the latest front-end techniques, solidifying Drupal’s position as a robust and forward-looking CMS.
Drupal’s current theming approach
The simplest way to work on a Drupal theme has been to add the markup to the html.twig files inside the template folders. For styling and behavior, we create CSS and JS files according to an entity’s need and place them inside the CSS and JS folders respectively. This includes theming header menu, footer menu, blocks, regions, individual content types and their different view modes, different views, etc. These files are then declared in the libraries.yml file where dependencies (if any) can also be mentioned. This way they can be loaded on demand or be made globally available. Apart from this, any preprocessing logic goes into the .theme files, we have the breakpoints.yml to help with responsive designs and of course, .info.yml file without which all the effort is a waste.
While this seems to be a lot of work to be done before we actually do some useful frontend work, there have been some boilerplate code generators like drush theme generate, which intend to generate the folder structure of a theme in an interactive way and create a standard drupal folder structure.
Even though the above structure works well enough for starting a project and can pose no issue for a small project, it can become a bottleneck for enterprise websites where a more sophisticated design system needs to be integrated.
Things start getting cluttered very rapidly. We see a lot of CSS and JS files just filled up to the brim in their folders.
Developers struggle to find the code they can reuse or extend.
Issues like code duplication, code spread across the files, specificity hell, and CSS conflicts crop up.
This often leads to more efforts spent on later development where it is expected that initial development would have helped later.
Our approach to theming in Specbee
At Specbee, we have standardized how we create our themes using an NPM tool called Drupal Theme Init developed by us from scratch which is open-sourced. Being a Yeoman generator, it can easily be installed with NPM/Yarn which then interactively helps in the generation of a custom theme. The idea of the Drupal Theme init is to have a consistent approach to how theme files are scaffolded following Drupal practices and to help out developers to start working on the theme without the hassle of setting the files every time they start a new project. The basic idea of the structure is to compartmentalize SASS into components using the BEM convention. Each CSS files associated with an entity like block, view, content type, etc have its own CSS generated and is attached to that entity either through the twig template or preprocessing. The same goes for the JS files. The extensive use of libraries.yml helps us to limit the amount of CSS and JS we render on the page.
The advantage of setting up the theme this way is we have a system in place for component-based theming without depending on any external libraries or plugins. It helps us to segregate the CSS/JS libraries based on the components to be loaded on the page, which helps with the performance. However, there are still limitations to this approach especially when the project grows in size. The segregation of components into atomic levels becomes a bit of a burden as it requires us to maintain the libraries.yml file with required dependencies. Also, there is no easy way we can do a proper integration of a design system with the current structure easily as we will have to define each component path and its dependency by ourselves in the design system too, to load the components in it.
What is Component-based theming
While the vanilla approach seems fairly basic, there have been huge amounts of advancements done in recent times through contributed modules to have better approaches. One of the popular approaches is imagining the UI as a collection of reusable and consistent units called components. In most cases, this follows Atomic Design where each component is segregated into smaller building blocks. Modules like UI Patterns, Components! or component libraries like PatternLab, Fractal, and Storybook have brought innovative ways which have made the development of themes more streamlined and robust. Component-based theming has a certain edge over traditional theming:
One of the biggest bottlenecks is the backend dependency, where frontend work can’t start without the Backend work. This creates a lag. Using a component-based approach, the front-end can work independently and without much deep knowledge of Drupal things.
Components can be created just from the available design with the required placeholders. The values for these placeholders can be filled later when the backend work is completed
It creates a workflow where we just don’t change the markup in the templates folder and style it as per the requirement. Rather we have smaller structures styled separately and then create a collection of these smaller units into bigger components that can be used by the Drupal templates.
This helps in maintaining the code related to each component in isolation and creates lesser chances of side effects.
It confirms UX consistency across the application.
Helps in the reduction of efforts spent on setting up the feature as changes made in one place reflect across the areas where it is used.
How to do component-based theming in Drupal
One of the prominent ways of following component-based development is using PatternLab which was introduced quite a while back. It initially came in with a Drupal edition which is archived now and replaced by a node-based package. The setting up of the PatternLab requires a Components module to be installed which will help in getting the markup from Twig files outside the templates folder for Drupal. This is followed by installing the patternlab package via npm which gives options to generate twig or mustache-based templates (obviously twig for us). Once this is done we have a ready reckoner style guide, some boilerplate code that helps in the creation of the style guide, and a patterns folder where in we create the components according to the requirements. These components are then included in the html.twig files present inside the templates folder.
While all these steps are fine to perform, there are instances where this is a bit difficult to set up and has a bit of a learning curve to it. The biggest drawback that comes with Patternlab is that all the CSS is aggregated into a single file which then gets dumped into all the pages (which is sometimes also the case with the JS included with it). While this doesn’t matter initially as the basic idea is the reusability of the component, once the project grows this starts affecting the page performance.
How to do component-based theming with SDC
With the initial version of SDC going into the core as an experimental module, there has been a lot of excitement around it. SDC has been touted as the biggest change to Drupal theming since the introduction of Twig. SDC again is not a complete solution for the Frontend Development team but a component-driven approach to theming with an out-of-the-box basic structure. This can still be extended with a number of modules for a certain kind of workflow. The basic idea is everything related to a component stays inside a single directory. This includes the Component Twig file, JS, CSS, other assets, and a single schema YAML file declaring the properties of the component.
Some immediate benefits of using SDC:
All the code related to a component is in a single directory (as the name suggests!).
The libraries for the component are auto-generated which leads to lesser trauma of not declaring the it in libraries.yml file. Although we still might need to add the dependencies to the component.yml file, this is being done in a single place rather than jumping to the libraries.yml file.
There is a far smaller learning curve to implement SDC. If you know the basic of Drupal theming, all you need to do is enable this module and start writing the components.
The power of twig (include/extend/embed) is still available which helps in the reusability of code.
As the components are YML plugins, which can be easily discovered by Drupal and can be easily swapped by a component having the same API structure.
The components can also be rendered through render arrays!
Provides a good mechanism to integrate external libraries to facilitate a Design system.
As the components are organized, the result of that is a consistent look and feel of the end product.
The code becomes more testable as we have units (read components) that can be tested independently
Because we define the schema within a component’s YAML definition, modules can automatically create forms to populate data.
Though it is currently included as an experimental feature in the core, setting up SDC is quite easy. Assuming there is a Drupal 10.1.x installation:
1. Enable the experimental SDC core module.
2. Create or use a custom theme to add SDC. For our purpose we created a custom theme called Ice Cream with Olivero as base theme.
3. For our purpose, let’s use the basic page which comes out of the box. I have repurposed it by adding a custom Title field and making some adjustments to the display which then looks like this:
4. The template twig file consists of basic code:
5. Create a folder called components inside your custom theme. This is similar to how we have a templates folder for Drupal templates.
6. For now, the basic idea is to style the title and description, which will be reusable in nature. Let’s create a component called simple-article. There will be simple-article.component.yml file and simple-article.twig which we will require. Apart from that, we will also add simple-article.css for styling.
7. Let’s create the simple-article.twig file. We will have a basic markup for that.
8. Add the simple-article.component.yml file with the schema mentioned in https://www.drupal.org/node/3352951. The idea is to define what will be the inputs to the twig file. It will look something like this for us:
9. Let’s add some basic styling to the component in simple-article.css.
10. Clear the cache.
11. Abracadabra! The component is now ready to use. But it still needs to be used. Without that, the component sits idle in the components folder.
12. Include this component in the required template file (this is the html.twig file under the templates folder in the custom theme) with format [theme_name:component-name]. Notice the include statement where we are adding the twig variables to be used in the component.
13. The component now gets rendered with our new markup and better styling.
14. Notice the markup. If twig debug is enabled, we get some special icons too with our SDC component rendered.
And that’s it!
References
https://www.drupal.org/docs/develop/theming-drupal/using-single-directory-components/about-single-directory-components
https://www.drupal.org/project/sdc
https://herchel.com/articles/creating-your-first-single-directory-component-within-drupal
Final Thoughts
With the way SDC has been built, there is going to be high-intensity development around it. One of the popular tracks is that modules will automatically detect components and insert their respective forms into Layout Builder, CKEditor, Paragraphs, Blocks, Fields, etc! In addition, SDC right now plays nice with Storybook through a contributed module called CL Server (which has been maintained by SDC project maintainers). Already there are other modules like CL Devel, CL Generator, and even UI Patterns that are getting built around SDC.
This will also help us to upgrade our own theme generator (Drupal Theme Init) which we discussed earlier to give an option of using SDC along with a Design System in place, preferably Storybook. This will help anyone to kickstart SDC implementation instantly paving the way for better theme development.
If you would like to read more such interesting content on Drupal, subscribe to our weekly newsletter today!
DRTiled With Wildfiler | Rubber Duck Dev Show 92
Estonian Tech Agency and Open Voice Network Team to Demonstrate Voice Interoperability
Read the original post at: Read More
The post Estonian Tech Agency and Open Voice Network Team to Demonstrate Voice Interoperability appeared first on Linux.com.
Haiku’s activity report for June 2023
AI Pro Domain- World’s First Chat GPT Plus Powered App & Mega Bonus Package
Mega Bonus Package: https://l.linklyhq.com/l/1qYyP
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
➡️ Jet Video Academy: https://l.linklyhq.com/l/1qYyH
➡️ Largest Digital Assets Bundle: https://l.linklyhq.com/l/1qYyT
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
✅ Bio Link: https://bio.link/tech_info
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
DISCLAIMER: This video’s description may include affiliate links. If you purchase or subscribe to products through these links, I may receive a small commission at no extra cost to you.
Thank you for the support!
New Buick Avenir LaCrosse 2023
The appearance of the new generation LaCrosse adopts the latest “PURE Design” pure design concept, the front of the car has a stronger sense of pressure, and the overall style is more youthful and sporty.
The obverse is the family’s latest cornice and wing shape. The oversized trapezoidal grille features rich parametric rhythmic undulations built in. The thick, twisted chrome-plated stripes on both sides and the black lower lip outline a very sharp-looking “grin” stance. The wing-type headlights have a sharp shape and the vertically arranged lamp beads are as clear as diamonds. The curved daytime running lights have good resonance with the chrome-plated finish below. Standard LED light source and automatic lighting, this state-of-the-art model uses a matrix LED light source, has 15 independent irradiation areas and provides 9 intelligent lighting modes.
The body size is 4996/1866/1475 mm in length, width and height, respectively, and the wheelbase is 2905 mm. Compared with the previous model, the length has decreased by 34 mm, the height has been increased by 8 mm. Compared with the B-class sedan of the same level, it has a more advantageous wheelbase, more adequate length and width.
The four-spoke multi-function steering wheel has a fixed shape, with the exception of entry-level models, it is made of leather that feels comfortable to touch, but its overall size is huge. The horizontal lever multifunctional control area adopts a combination of integrated pressure + lever, and the left side is used to control the eCruise Pro intelligent driving aid, which reaches L2 assist level.
The car is equipped with the Buick eConnect smart connection system, which provides Qualcomm 8155 car-class chips. The operation is smooth, and the UI interface is simple and straightforward. However, the layout of the function menu is relatively traditional. The main menu is located at the bottom instead of the popular left and right Side screen. The system combines online maps, entertainment, voice interaction, OTA upgrade, supports wireless CarPlay interconnection, and is very practical.
The volume of the luggage compartment has been reduced compared to the previous generation and is 506 Liters.
In terms of power, it provides two turbocharged engines, 1.5T and 2.0T. The 1.5T engine has been retuned with a maximum power of 132kW (180Ps), an increase of 8kW over the previous model and maximum torque. 250Nm transmission, WLTC comprehensive fuel consumption 6.28L/100km, 2.0T engine added to 48V system, max power still 174kW (237Ps), max torque 350Nm, match with 9AT automatic manual transmission, WLTC comprehensive fuel consumption 6.59 L/100km, Acceleration from 0 to 100 takes 7.2 seconds.
Source: https://www.pcauto.com.cn/hj/article/2109309.html#ad=20420
Deaf woman who nurses injured swifts back to life opens “UK’s first” migratory bird orphanage and…
Carly Ahlen said at peak times she may care for 20 to 30 parentless swifts at a time.
This comes as almost half of the nation’s swifts have disappeared over the last 25 years, putting them on the red list of endangered birds.
Other red list migratory birds, such as Housemartens, will be welcomed at her new Swift Station rehabilitation clinic, Kent.
The founder of animal rescue charity Gabo Wildlife takes in babies who have tried to fly too early, fallen from a nest due to extreme heat, or have been starved because their parent has disappeared. If the mother bird stops returning it is likely to have died.
The Gabo Wildlife website states: “Our Swift station evolved from the founder of Gabo Wildlife, Carly Ahlen, and her idea for the UK’s first wildlife clinic dedicated exclusively to the rescue and rehabilitation of migratory birds, such as swifts, house martins and swallows, due to lack of specialists who follow good practices and optimal protocol.
“Common swifts feed upon insects solely. Feeding any alternative will have serious consequences and, worse yet, death.”
Miss Ahlen is profoundly deaf and has spent years caring for hundreds of swifts, with people travelling from North London and Essex to bring her vulnerable chicks.
The trained marine mammal medic helps them regain strength and weight before she lets them fly away.
They are insectivores and she feeds them crickets, bee drone larvae and supplements.
Swifts tend to fly 42 days after they hatch, and through years of experience the rescuer has learned the ideal weight for them to succeed.
She has observed the birds do push ups to build muscle before taking off on migration that could cover 800 kilometres a day.
The birds spend their lives almost entirely in the air and feed, sleep and mate in flight, landing only to nest.
The bird carer said: “They fly incredible distances and are exhausted but so faithful to a nest site, returning year after year to the same site, but when they try to enter the nesting site they find it demolished or building works commenced and they’ve no energy left searching for another nesting site, it’s a terrible time for swift in UK.
“Because swifts feed on the wing they can’t pick up food, so I have to hand fed everyone of them, hourly.
“I use a good pound (500-600 grams) of insects to pull one common swift through for 4 weeks, it’s very expensive and time consuming but swifts captured my heart and curiosities since I was a little girl, I would call them, flying angels and no one knew anything about them but now I have event many, many secrets about their behaviours and they continue to fill me with admiration.
“I put them together in groups of similar ages, they are very good tempered, they communicate and ores on others. I haven’t encountered an aggressive swift yet.”
Diablo 4 – Helltide T4 – Coop Necro sorcerer
LIVE : ⏩ *Twitch :* https://www.twitch.tv/noxetobs
⬇ *Abonnez vous* ⬇
N’oubliez pas, si cela vous plais Abonnez vous, ca fait plaisir, ca ne vous coute rien et nous ca nous aide beaucoup *https://www.dailymotion.com/gameoverblog*
⬇ *Liens et contact direct* ⬇
*Site web :* https://Gameoverblog.com
⏩ *Youtube Abonne toi ici :* https://cutt.ly/H5jcjJZ
⏩ *Dailymotion Abonne toi ici :* https://www.dailymotion.com/gameoverblog
➤ *Twitter :* https://twitter.com/Gameoverblog
➤ *Facebook/Meta :* https://cutt.ly/Y5YT5Tj
⬇ *Offre, réductions et bon plans* ⬇
Tu veux des jeux pas chers et faire une bonne action en même temps ? N’attends plus
➤ *Humble Bundle :* https://www.humblebundle.com/?partner=gameoverblog
⬇ *Partenaires* ⬇
➤ *Insta :* https://www.instagram.com/art.poulpy_
#Coop #Jeux #Blog #Discord #twitch #twitter #youtube #poulpy #insta #Gameoverblog #wordpress #blog #decouverte