humanmade / humanmade/tachyon

Accept standard argument formats for "false" attributes passed through query args

Open
#143 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
TypeScript
Stars
295
Forks
4
Avg merge
15d 7h
Merged PRs (30d)
1

Description

_(Leaving this issue here just so I don't forget about it over the weekend.)_

While troubleshooting an issue trying to bypass the automatic webp formatting with @smccafferty, we noted that none of the expected formats (`?webp=false`, `?webp=0`, `?webp=no`) for setting the `webp` query argument to false worked as we'd expected. I guess this makes sense, because URL query parameters are interpreted as strings both by the `URLSearchParameters()` js API and by AWS Lambda's `queryStringParams`. But it was surprising that 'false', '0', and 'no' all evaluated as true.

Sean was able to work out that setting the attribute to an empty string, like `?webp=`, works for disabling webp. But I'd like to see a more intuitive interface.

Contributor guide

Open the contributing guide

Research direction

Start by locating where the webp query argument is read and converted into an attribute value in the TypeScript AWS service. Check how query-string values are currently interpreted, then define completion as intuitive false formats such as false, 0, and no disabling WebP consistently, with coverage for the supported formats.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, typescript
Domain
api, backend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.