Brian Perry, Drupal API Client expert, discusses the benefits of Drupal API Client, its role in normalizing JSON API, agnosticism in JS frameworks, and the use of TypeScript. They touch on creating instances, module applicability, potential core integration, and the roadmap. The episode also covers the Iconify Icons module and its features for adding icons to Drupal sites.
Drupal API Client simplifies API interactions for JavaScript developers on decoupled sites.
Integrating Drupal API Client involves creating instances in JavaScript projects, enhancing efficiency without custom code.
Deep dives
Overview of Drupal's API Client
Drupal's API Client, a JavaScript utility, simplifies interacting with Drupal's APIs, catering to JavaScript developers on decoupled sites. Offering features like data fetching and authentication, it enhances efficiency without complex custom code.
Utilizing the Drupal API Client
Integrating the Drupal API Client involves creating an instance of the client in your JavaScript project, whether outside Drupal in a JavaScript framework or within Drupal using a library. By following the documentation and interactive code sandbox, developers can swiftly achieve hello world results.
Future Roadmap and Enhancements
The roadmap for the Drupal API Client includes TypeScript improvements, schema generation capabilities, and a potential GraphQL package. Additionally, utilities for media entities and image presets are under consideration, aiming to streamline interaction with Drupal's APIs.
Collaboration and Community Engagement
Engagement opportunities are available through async Slack meetings in the Drupal API client channel, biweekly on Thursdays. Users are encouraged to share feedback, use cases, and ideas for the project, fostering collaboration and continuous enhancement.
Today we are talking about Drupal’s API Client, What it does, and why you might need it with guest Brian Perry. We’ll also cover Iconify Icons as our module of the week.
Have you ever wanted to empower your content creators to place icons from a massive, open source library into your Drupal site? There’s a module for that.
How old: created on May 22 of this year, so less than two weeks ago, by David Galeano (gxleano) of Factorial
Versions available: 1.0.0 which supports Drupal 9.3 or newer, right up to Drupal 11
Maintainership
Actively maintained
Security coverage
Test coverage
Documentation
Number of open issues: 2 open issues, neither of which are bugs
Usage stats:
1 site
Module features and usage
Out of the box the module provides both a CKEditor button for placing icons, and a new field type. It even provides a new form element that can be used in custom forms, a render element you can use to programmatically put an icon into something like a custom block, and a Twig extension that can be used to place icons in templates.
According to the project page, the Iconify icon library includes more than 200,000 icons, though in my limited experimentation it seems like there are some duplicates between icon sets. Speaking of which, Iconify provides over 150 different icon sets, and in this module’s configuration you can specify which ones you want to be available on your site.
Placing an icon is as simple as using an autocomplete to search the names of the icons available, and a preview is shown for each of the matches found.
The field widget and the CKEditor button both give content creators options for what size and color to use for the icons. For myself I’d prefer to lock some of those options down (for example, make that part of the field’s display configuration instead), but I’m sure that could be added as part of a different widget.
I can think of a few Drupal sites I’ve built where this would have been really handy, so I’m interested to play around with this module some more, and see how it evolves.
Get the Snipd podcast app
Unlock the knowledge in podcasts with the podcast player of the future.
AI-powered podcast player
Listen to all your favourite podcasts with AI-powered features
Discover highlights
Listen to the best highlights from the podcasts you love and dive into the full episode
Save any moment
Hear something you like? Tap your headphones to save it with AI-generated key takeaways
Share & Export
Send highlights to Twitter, WhatsApp or export them to Notion, Readwise & more
AI-powered podcast player
Listen to all your favourite podcasts with AI-powered features
Discover highlights
Listen to the best highlights from the podcasts you love and dive into the full episode