-
Notifications
You must be signed in to change notification settings - Fork 29
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
Support component search by provider #990
Conversation
✅ Deploy Preview for blissful-goodall-fa23f6 ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
@disulliv @mpcen ready for review For additional notes on search api behaviour, see clearlydefined/service#942. |
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
7ca72e8
to
84e6371
Compare
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.
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!
@disulliv On the UI, searching for components is always within a certain provider. It is initially set to be npm, at PageBrowse (line 37). |
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
84e6371
to
bf4736d
Compare
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.
Ignore feedback. PR has already been merged
Address feedback in #1000 |
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.
Task: #957