Add Plus search param#202
Conversation
size-limit report 📦
|
3360d7f to
38fbf7e
Compare
| export type OrientationParam = { | ||
| orientation?: Orientation; | ||
| }; | ||
| export type Plus = 'mixed' | 'only' | 'none'; |
There was a problem hiding this comment.
Do we want a mixed variant? If we look at the Orientation filter the mixed variant is implied by the absence of the orientation value. Shouldn't we mirror this "convention" for the Plus param?
There was a problem hiding this comment.
Good question. I think we should keep mixed here because it matches API's behaviour as in mixed or undefined equals mixed. Orientation doesn't have any value encapsulating all orientations so we have to use undefined. I think it's a difference in design
There was a problem hiding this comment.
Makes sense that we want to mirror API. Should this be raised to API to ensure a more consistent api before making it widely available?
There was a problem hiding this comment.
Here's the relevant slack thread: https://crewlabs.slack.com/archives/C4LRBSTG9/p1683568502846389 — I think third party apps already use the plus query params (we can track this because it needs special permissions) so any changes would be a breaking change.
There was a problem hiding this comment.
Ha! So the plus parameter was already available when you added the filter.
There was a problem hiding this comment.
If you're talking about unsplash.com filter, then it was about during the same time.
Relevant blog post: https://unsplash.com/blog/you-can-now-filter-images-by-license/