Talking Drupal #454 - Drupal API Client

June 10, 2024

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.

Listen:

direct Link

Topics

  • Brian what is new with you!
  • Elevator pitch for Drupal API Client
  • What was Pitchburg like
  • Is this a normalizer for JSON API
  • Why is this JS framework agnostic
  • What is typescript and how does Drupal API Client use it
  • Looking at the quick start guide the second step is to create an instance, where do you do that
  • Who is this module for
  • Will Drupal API Client be added to core
  • What is on the roadmap
  • How does this relate to Chapter Three and Next.js
  • What is the spin up time
  • How will Starshot impact this
  • Brief description:
    • 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.
  • Module name/project name:
  • Brief history
    • 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.