Skip to content

Add Plus search param#202

Merged
Magellol merged 2 commits into
masterfrom
add-plus-query-param
May 8, 2023
Merged

Add Plus search param#202
Magellol merged 2 commits into
masterfrom
add-plus-query-param

Conversation

@Magellol
Copy link
Copy Markdown
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
Copy Markdown

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
@Magellol Magellol force-pushed the add-plus-query-param branch from 3360d7f to 38fbf7e Compare May 8, 2023 14:28
Base automatically changed from fix-ci-jobs to master May 8, 2023 16:57
Comment thread src/types/request.ts
export type OrientationParam = {
orientation?: Orientation;
};
export type Plus = 'mixed' | 'only' | 'none';
Copy link
Copy Markdown
Contributor

@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
Copy Markdown
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
Copy Markdown
Contributor

@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
Copy Markdown
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.

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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.

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.

2 participants