New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Plus
search param
#202
Conversation
size-limit report 📦
|
3360d7f
to
38fbf7e
Compare
@@ -9,6 +9,7 @@ export type Orientation = 'landscape' | 'portrait' | 'squarish'; | |||
export type OrientationParam = { | |||
orientation?: Orientation; | |||
}; | |||
export type Plus = 'mixed' | 'only' | 'none'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ha! So the plus parameter was already available when you added the filter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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/