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

Support component search by provider #990

Merged
merged 1 commit into from
Sep 27, 2022

Conversation

qtomlinson
Copy link
Collaborator

@qtomlinson qtomlinson commented Jul 8, 2022

  1. Added provider to the pattern string for coordinates suggestion
    The search api call in service ignores provider type.
    For example, the following call return co-ordinates with provider other than npmjs:
    curl -X GET "https://dev-api.clearlydefined.io/definitions?pattern=jw&type=npm" -H "accept: /"
    This is probably by design: the suggestion api only takes the pattern
    string into account.

When provider is included in the pattern string, the search result
reflects the provider specification. The solution is to pass the
provider information when searching in PageBrowse.

  1. Also trigger search when provider is changed

Task: #957

@netlify
Copy link

netlify bot commented Jul 8, 2022

Deploy Preview for blissful-goodall-fa23f6 ready!

Name Link
🔨 Latest commit bf4736d
🔍 Latest deploy log https://app.netlify.com/sites/blissful-goodall-fa23f6/deploys/631ba510b9f3440009bee388
😎 Deploy Preview https://deploy-preview-990--blissful-goodall-fa23f6.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@qtomlinson qtomlinson marked this pull request as ready for review July 8, 2022 19:23
@qtomlinson
Copy link
Collaborator Author

@disulliv @mpcen ready for review For additional notes on search api behaviour, see clearlydefined/service#942.

qtomlinson added a commit to qtomlinson/website that referenced this pull request Jul 11, 2022
1. Added provider to the pattern string for coordinates suggestion
The search api call in service ignores provider type.
For example, the following call return results contains co-ordinates
with provider other than npmjs:
curl -X GET "https://dev-api.clearlydefined.io/definitions?pattern=jw&type=npm" -H "accept: */*"
This is probably by design: the suggestion api only takes the pattern
string into account.

When provider is included in the pattern string, the search result
reflects the provider specification. The solution is to pass the
provider information when searching in PageBrowse.

2. Also trigger search when provider is changed

Task: clearlydefined#990
@qtomlinson qtomlinson force-pushed the qt/search_with_provider branch 2 times, most recently from 7ca72e8 to 84e6371 Compare July 11, 2022 16:35
@qtomlinson
Copy link
Collaborator Author

@disulliv @mpcen any feedback?

Copy link
Contributor

@disulliv disulliv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not super familiar with this part of the code, but what happens if the provider is empty or we don't want to specify the provider?

edit - sorry about the slow response, it's been a busy few weeks!

@qtomlinson
Copy link
Collaborator Author

@disulliv On the UI, searching for components is always within a certain provider. It is initially set to be npm, at PageBrowse (line 37).
image

@mpcen
Copy link
Member

mpcen commented Aug 8, 2022

Can we hold off merging this until searching is fixed. I'm current looking at the search issues

1. Added provider to the pattern string for coordinates suggestion
The search api call in service ignores provider type.
For example, the following call returns co-ordinates with provider other than npmjs:
curl -X GET "https://dev-api.clearlydefined.io/definitions?pattern=jw&type=npm" -H "accept: */*"
This is probably by design: the suggestion api only takes the pattern
string into account.

When provider is included in the pattern string, the search result
reflects the provider specification. The solution is to pass the
provider information when searching in PageBrowse.

2. Also trigger search when provider is changed

Task: clearlydefined#957
@qtomlinson qtomlinson force-pushed the qt/search_with_provider branch from 84e6371 to bf4736d Compare September 9, 2022 20:41
@mpcen mpcen merged commit 5da3303 into clearlydefined:master Sep 27, 2022
Copy link
Member

@mpcen mpcen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ignore feedback. PR has already been merged

@qtomlinson qtomlinson deleted the qt/search_with_provider branch September 27, 2022 23:33
@qtomlinson
Copy link
Collaborator Author

Address feedback in #1000

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.

3 participants