• Using BrowserSync with Drupal 8

    John Ferris

    TL;DR: Just here for Browsersync setup? Skip to the steps.

    I’m always looking for ways to reduce the time between saving a file and seeing changes on the screen.

    When I first started working with Drupal, back in the day, I would ftp changes to a server and refresh the page. Once I found Transmit, I could mount a remote directory locally and automatically save files to the server. At the time, my mind was blown by the efficiency of it. In hindsight, it seems so archaic.

  • Radios, Checkboxes, and Drupal’s Admin Interface

    James Nettik

    Custom styled form elements are a common thing to see in a design. That’s because default form styles vary visually from browser to browser and OS to OS. It makes sense that we’d want these elements styled consistently. Styling them is pretty straightforward, with the exception of select dropdowns which can be more complex. Recently, I ran into an unexpected problem when working on a site that needed a branded admin experience.

  • Testing for the Brave and True: Part Zero

    Gabe Sullice

    "If you're not testing, you're doing it wrong." I can't remember how many times I've heard those words. Each time, I'd feel a little pang of guilt, a little bit of shame that every day, I wrote code for myself and clients that wasn't tested. I'd be frustrated with the developers who repeated that mantra. Sure, it was easy to say, but hard to live up to. How do I test? What do I test? Should I test? How would I justify the costs?

  • Javascript Testing with AVA

    Peter Weber

    Testing is a part of every developer’s job. Good tests ensure code we write does what we expect. In Javascript, we have many tools at our disposal, such as the excellent developer panels in Chrome and Firefox.

    Filed under:
     CodeJavaScript
  • Refactorability

    Rob Ballou

    As a programmer, I spend almost all my time hanging out with code. This code may be my own, other co-workers’, or code from an open source project. And I may be contributing this code at different points in that project's lifecycle: starting out, initial development, maintenance, debugging, adding new features, etc. Given the amount of time I have been working on various projects as a programmer, I spend more time – and place more value on – considerations around the ability for anyone to step into this code and maintain it, debug it, or refactor it.

    Filed under:
     CodeDrupalJavaScript
  • Adding Descriptions to Drupal 7 Checkboxes and Radios

    James Nettik

    Recently, I was creating a form that provided a list of options as checkboxes and needed to include helper text for each individual checkbox. While the Form API in Drupal 7 has a #description attribute, for checkboxes and radios it applies that as text for the entire group. After a lot of looking, there didn't seem to be a way that allowed for passing descriptions into each item in the #options array that is expected.

    Filed under:
     CodeDrupalDrupal Planet

Pages