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

MWPW-160266-integrate search api #95

Merged
merged 4 commits into from
Oct 21, 2024

Conversation

Sonja Popovic added 2 commits October 17, 2024 12:21
… empty, so in that case send empty geo query param in order to search return some values)
Copy link

aem-code-sync bot commented Oct 17, 2024

Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
In case there are problems, just click a checkbox below to rerun the respective action.

  • Re-run PSI checks
  • Re-sync branch
Commits

Copy link
Contributor

@github-actions github-actions bot left a 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.


⚠️ [eslint] <no-console> reported by reviewdog 🐶
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.

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-commenter
Copy link

codecov-commenter commented Oct 17, 2024

Codecov Report

Attention: Patch coverage is 25.00000% with 6 lines in your changes missing coverage. Please review.

Project coverage is 83.00%. Comparing base (5156bfb) to head (a8eaa59).
Report is 7 commits behind head on stage.

Files with missing lines Patch % Lines
edsdme/components/PartnerCards.js 25.00% 6 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

Copy link

aem-code-sync bot commented Oct 17, 2024

// 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?',
Copy link
Collaborator

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
@SonjaPopovic SonjaPopovic merged commit 53c91b2 into stage Oct 21, 2024
17 of 22 checks passed
@SonjaPopovic SonjaPopovic deleted the MWPW-160266-integrate-search-api branch October 21, 2024 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants