TIL
Sometimes we learn stuff and we share it with you fine people.
Back to all blog posts
-
· Barry Hess · TIL
TIL: Easily Support Gravatars in Rails
We’re building some software where we’d like to display avatars for email contacts even if they aren’t users of our software. While Gravatar is a relic of Web 2.0, we’ve found that there are still a significant number of people who have their email addresses in that system.
Here’s how I streamlined displaying an avatar for an email address if it exists in the Gravatar system.
-
· Patrick Filler · TIL
TIL: Listen for JavaScript events only once!
A common thing I find myself doing in Javascript is adding some event driven behavior that I only want to happen once. Let’s say I have a big button that starts the process of lowering a certain spy into a pool of certain doom — I don’t want a second button press to awkwardly start him back at the top again!
-
· James Adam · TIL
TIL: Tapback Keyboard Shortcuts
If you use Mac, and you use Messages on your Mac, you will probably know that in the not-too-distant past, simple reactions to messages were added: what Apple calls Tapbacks.
These are great for a quick way to say yes (or no, or WTF!?!), but they are a bit of a pain to actually send. You have you right-click on the message, then choose "Tapback...", then click the icon you want, and for a quick reaction, that's not exactly fast.
Well, imagine my delight when I learned today that you can send Tapback reactions using only your keyboard.
To send one in reply to the last message you recieved, just hit Cmd-T and then the numbers 1 to 6 to select the reaction.
-
· Matthew Lettini · TIL
TIL: Use touch-action: manipulation; to avoid double-tap-to-zoom
Recently we built and launched A Good Enough Guestbook, a place where you can send us doodles and they’ll print out on our little printer. It’s quite lovely and fun, and you should send us a doodle. We might also have more in store for these printers in the future.
In the meantime, it took a bit of finagling to get the doodle interface feeling just right. One issue we ran into was that users would sometimes tap “Undo” a whole bunch in rapid succession. This undo’d just fine, but on mobile devices it would also unexpectedly zoom the page in. While this is often a good accessibility behavior of double-tapping a webpage, it’s unwanted in this interface.
-
· Barry Hess · TIL
TIL: Rails has_one Nested Attributes Tweaking
In a project I'm working on right now I've been using a Rails nested form and a couple of things caught me off guard.
-
· Matthew Lettini · TIL
TIL: System Colors are supported in CSS, but they’re unreliable
I’ve said this before: We’re primarily a web shop here at Good Enough, but occasionally we come up with ideas that we think would work really well as a native desktop or mobile application. Still, we prototype those ideas on the web first.
Recently, I wanted to try and make one of these web prototypes look and resemble a native Mac app as much as possible. My first inclination was just not to use any CSS at all, but that’s pretty limiting. Then I found CSS System Colors.
-
· James Adam · TIL
TIL: Turbo Stream and personalised content
Hotwire and Turbo are great for very quickly and easily adding real-time updating of webpages without requiring the browser to reload the whole page.
But if the information you want to stream back from your server to the client has anything specific to the current user — like using the name "You" instead of "James" — you might hit an issue. So far I haven't found this written up on the web anywhere, so hopefully this will help someone else with the same problem.
-
· Barry Hess · TIL
TIL: Blocking Password App Autocomplete on Form Fields
I wanted to disable password managers, particularly 1Password, from interacting with a username field in Contact Me. It was pretty simple in the end:
<%= form.text_field :username, "data-lpignore": true, "data-1p-ignore": true %>
-
· James Adam · TIL
TIL: Managing Raspberry Pi software with a bit less pain
For the printer project I'm working on, most of the software behind it runs "in the cloud", but there's some software that needs to run beside each printer, to check for new things to print and manage the process of downloading and sending those things to the printer component itself.
In the current incarnation of the project, this "on the desk" software runs on a small Raspberry Pi computer, which acts as a simple bridge between your Wi-Fi and the printer, funnelling data from our servers to thing that will actually print it out.
-
· Matthew Lettini · TIL
TIL: Don’t forget your Web Manifest file
We’re primarily a web shop. We’re dipping our toes into mobile app development, but our collective expertise is in making products and services for the web. And like everyone else, our use of the web has shifted from our desktops and laptops to our phones.
As we’re creating and prototyping new ideas, we keep developing websites that we think might also be good apps. So a few of us are using “Add to Home Screen” on these products, which has mostly been great, but we ran into something annoying: we couldn’t figure out how to hide the Safari toolbars as we navigate this new website-as-app.