Skip to content
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

Merged
merged 2 commits into from May 8, 2023
Merged

Add Plus search param #202

merged 2 commits into from May 8, 2023

Conversation

Magellol
Copy link
Member

@Magellol Magellol commented May 8, 2023

@Magellol Magellol marked this pull request as ready for review May 8, 2023 14:00
@Magellol Magellol requested a review from a team as a code owner May 8, 2023 14:00
@Magellol Magellol requested a review from astlouisf May 8, 2023 14:00
@github-actions
Copy link

github-actions bot commented May 8, 2023

size-limit report 📦

Path Size
dist/unsplash-js.cjs.production.min.js 4.21 KB (0%)
dist/unsplash-js.esm.js 4.22 KB (0%)

@Magellol Magellol mentioned this pull request May 8, 2023
@Magellol Magellol changed the base branch from master to fix-ci-jobs May 8, 2023 14:28
Base automatically changed from fix-ci-jobs to master May 8, 2023 16:57
@@ -9,6 +9,7 @@ export type Orientation = 'landscape' | 'portrait' | 'squarish';
export type OrientationParam = {
orientation?: Orientation;
};
export type Plus = 'mixed' | 'only' | 'none';
Copy link

@astlouisf astlouisf May 8, 2023

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?

Copy link
Member Author

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

Copy link

@astlouisf astlouisf May 8, 2023

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?

Copy link
Member Author

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.

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.

Copy link
Member Author

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.

@Magellol Magellol merged commit d97c4f4 into master May 8, 2023
9 checks passed
@Magellol Magellol deleted the add-plus-query-param branch May 8, 2023 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants