Posted on Leave a comment

AWPCHALLENGE: Learning By Doing

AWP CHALLENGE: Learning By Doing

I’m excited to see that our #2019AWPCHALLENGE is going strong. The entries we’ve been getting are showcasing how many highly skilled developers we have in AWP, and encouraging those who are growing quickly to share and get great feedback on their projects.

This round of submissions I think is summed up well with: “Learning by Doing”. Whether it’s a simple snippet, or building tools for others to learn from, these posts contribute great value to any dev’s arsenal. Let’s jump in.

NOTE: AWP members can click on the image links to see the original posts which have much more detail and great conversations. Another reason to join if you haven’t already

Extending WP-Admin JS Objects

Ty Bailey shared his experiments with Mustache and setting Primary Categories.

Sometimes the cleanest code you can build in plugins and themes is the code that extends existing WordPress Core functions and objects. Ty Bailey wanted to dig into available tools in wp-admin and working out how to set primary categories helped him dig into that. He said:

Building this plugin taught me how to tie into existing elements and metaboxes using JavaScript and the `wp` JS object (i.e. `wp.template`).

It’s not yet Gutenberg compatible, so don’t install this on a live site, but Ty would love your feedback on the post or on his Github repo.

SlotFill in Gutenberg

10up’s Ryan Welcher showed us the power of slotFill in Gutenberg

Gutenberg exposes all kinds of new development practices for WordPress developers. AWP Member Ryan Welcher — a Lead Web Engineer at 10up, dropped by to share his experiments with the slotFill pattern in WordPress. Personally, I had to look this up to grasp what’s going on. The Gutenberg handbook describes this as:

Slot and Fill are a pair of components which enable developers to render elsewhere in a React element tree, a pattern often referred to as “portal” rendering. It is a pattern for component extensibility, where a single Slot may be occupied by an indeterminate number of Fills elsewhere in the application.

Ryan’s Github Repo isn’t a “project” as much as a library of examples and explanations of how slotFill extends Gutenberg and how Gutenberg introduces Javascript based filters to WordPress. This is a deep resource worth exploring in detail and the definition of “learn by doing.”

Featured Posts on Term Archive Pages

Russell Heimlich shared his plugin for setting featured posts on Terms for Term Archive pages.

Personally, I’ve often struggled with extending the Terms and Category admin pages and fields. Russell tackles them with a nice JS-based UI for adding “featured posts” to your Term Archive pages. It’s a unique approach for specific needs that I’m sure plenty content-driven websites could find useful.

Check out his Github repo here.

Lighting Round on Going Deep with Debug Logging

Kevin Hoffman walks us through Debug Logging.

Kevin Hoffman returns to the AWP Challenge with a succinct but thorough post on the reason for debug logging and how to take it to the next level. Kevin breaks it down like this:

When developing functionality based on AJAX requests, cron jobs, or other server-side processes, it can be difficult to understand when a problem occurs because there is no error printed on screen. This is where a debug log can become your window into the server-side process so you can see what’s going wrong.

He walks through the basics of debugging logging in WordPress, but then introduces iTerm2 Triggers. He explains that:

iTerm2 users can set up triggers to be alerted when a certain string is detected in the terminal window. A trigger action can be a subtle bell sound or a more in-your-face notification with a customizable message.

Kevin’s post sparked some good conversation on how others do debug logging as well.

Ignition Press

Eric Greenfield’s Ignition Press Starter theme was a big hit.

By far the most popular post of this round was Eric Greenfield’s Ignition Press starter theme. Several users were eager to give it a spin and commented later how nice it is. Eric highlighted it’s main features as:

With sass, postCSS, really cool ACF fields, easy scroll animations and a CSS grid it doesn’t get better!

Check out the website, and the Github repo. Who doesn’t love a free starter theme to play with on a weekend!?

Deleting Local and Remote Github Branches

Ahmad goes deep on deleting Github branches

Last but certainly not least is AWP Admin Ahmad Awais. Ahmad is prolific for sharing his open source projects and being a very energetic and eager educator on all things best practices and open source.

This post was a very deep dive into a routine part of devlife. Ahmad wants to make your life easier by deleting both local and remote Github branches in “one go”. His post came full with:

  • A detailed (and emoji-filled) walkthrough
  • A Youtube video (below)
  • Code Example

Thanks Ahmad!


What are You Learning?

We’re just starting this challenge — we’re going to going strong all year long. So get your snippets, articles, or fullsite projects ready to share. Subscribe to our blog to get notifications of more of these roundups in the future. If you’re already an AWP member, start working on your AWPChallenge for this week for us to include in the round up next week. If you’re not a member, why not!? Join today.

Subscribe for AWP Updates

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Featured Image Photo by Markus Spiske from Pexels

Leave a Reply