-
Notifications
You must be signed in to change notification settings - Fork 0
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
MWPW-160266-integrate search api #95
Conversation
… empty, so in that case send empty geo query param in order to search return some values)
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.
Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit
eslint
🚫 [eslint] <object-shorthand> reported by reviewdog 🐶
Expected property shorthand.
headers: headers, |
Unexpected console statement.
console.error('There was a problem with your fetch operation:', error); |
🚫 [eslint] <lines-between-class-members> reported by reviewdog 🐶
Expected blank line between class members.
dme-partners/edsdme/blocks/search/SearchCards.js
Lines 112 to 120 in c7be473
async handleActions() { | |
const cardsData = await this.getCards(); | |
const cards = cardsData.cards; | |
const count = cardsData.count; | |
this.cards = cards; | |
this.paginatedCards = cards; | |
this.countAll = count.all; | |
this.contentTypeCounter = { countAll: count.all, countAssets: count.assets, countPages: count.pages }; | |
} |
🚫 [eslint] <prefer-destructuring> reported by reviewdog 🐶
Use object destructuring.
const cards = cardsData.cards; |
🚫 [eslint] <prefer-destructuring> reported by reviewdog 🐶
Use object destructuring.
const count = cardsData.count; |
🚫 [eslint] <no-multi-spaces> reported by reviewdog 🐶
Multiple spaces found before 'count'.
this.countAll = count.all; |
🚫 [eslint] <max-len> reported by reviewdog 🐶
This line has a length of 106. Maximum allowed is 100.
this.contentTypeCounter = { countAll: count.all, countAssets: count.assets, countPages: count.pages }; |
🚫 [eslint] <indent> reported by reviewdog 🐶
Expected indentation of 2 spaces but found 4.
} |
🚫 [eslint] <prefer-const> reported by reviewdog 🐶
'numberOfPages' is never reassigned. Use 'const' instead.
let numberOfPages = Math.ceil(this.contentTypeCounter.countAll / this.cardsPerPage); |
🚫 [eslint] <object-curly-spacing> reported by reviewdog 🐶
A space is required after '{'.
return Array.from({length: numberOfPages}, (value, index) => index + 1); |
🚫 [eslint] <object-curly-spacing> reported by reviewdog 🐶
A space is required before '}'.
return Array.from({length: numberOfPages}, (value, index) => index + 1); |
🚫 [eslint] <max-len> reported by reviewdog 🐶
This line has a length of 116. Maximum allowed is 100.
const lastCardIndex = this.contentTypeCounter.countAll < endIndex ? this.contentTypeCounter.countAll : endIndex; |
🚫 [eslint] <no-unused-vars> reported by reviewdog 🐶
'pagesNumArray' is assigned a value but never used.
const pagesNumArray = Array.from({ length: this.totalPages }, (_, i) => i + min); |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## stage #95 +/- ##
==========================================
- Coverage 83.37% 83.00% -0.37%
==========================================
Files 10 10
Lines 3181 3184 +3
==========================================
- Hits 2652 2643 -9
- Misses 529 541 +12 ☔ View full report in Codecov by Sentry. |
|
edsdme/blocks/search/SearchCards.js
Outdated
// eslint-disable-next-line consistent-return | ||
async getCards() { | ||
const url = new URL( | ||
'https://14257-dxpartners-stage.adobeioruntime.net/api/v1/web/dx-partners-runtime/search-apc/search-apc?', |
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.
@SonjaPopovic we could already swap the domain for io-partners-dx.stage.adobe.com
we will also need to add a switch here to check the environment and use the prod runtime domain, although there are no prod open search indexes currently so the action won't work.
…ed on component. define domain for api based on env
before:
https://stage--dme-partners--adobecom.hlx.page/channelpartners/drafts/dragana/search
after: https://mwpw-160266-integrate-search-api--dme-partners--adobecom.hlx.page/channelpartners/drafts/dragana/search?georouting=off