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-151250: Implemented filtering cards by partner level #14

Merged
merged 15 commits into from
Jun 14, 2024

Conversation

saragajic11
Copy link
Collaborator

@saragajic11 saragajic11 commented Jun 3, 2024

Resolves: MWPW-151250 and MWPW-151916

***Example with collection tags authored ('public' tag for complexQuery will be added whether the cooke is set or not; if the cookie is set, an additional tag for complexQuery, depending on the cookie/level, will be added. For collectionsTags, the portal specific tag (caas:adobe-partners/spp), component specific tag (caas:adobe-partners/collections/news), and all authored tags should be added):
Before:
https://stage--dx-partners--adobecom.hlx.page/solutionpartners/drafts/dragana/partner-news-collection-tags
After:
https://mwpw-151250-partner-lvl-cards--dx-partners--adobecom.hlx.page/solutionpartners/drafts/dragana/partner-news-collection-tags

***Without collection tags authored:
Before:
https://stage--dx-partners--adobecom.hlx.page/solutionpartners/drafts/dragana/partner-news
After:
https://mwpw-151250-partner-lvl-cards--dx-partners--adobecom.hlx.page/solutionpartners/drafts/dragana/partner-news

***Example of the page with an incorrect portal (complexQuery will not be added, and for collectionTags if not authored caas:adobe-partners/${portal} will not be added:
Before: https://stage--dx-partners--adobecom.hlx.page/SPP/drafts/dragana/partner-news
After: https://mwpw-151250-partner-lvl-cards--dx-partners--adobecom.hlx.page/SPP/drafts/dragana/partner-news

Keep in mind that partner_data cookie needs to be set manually for now.

  • Added complexQuery (depends on portal and level)
  • Added collectionTags (one specific for the portal, one specific for the component, and the list of authored tags)
  • If there are no cards, after loader (if response.ok), the loader will be switched with a 'no results' msg

Copy link

aem-code-sync bot commented Jun 3, 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

@codecov-commenter
Copy link

codecov-commenter commented Jun 3, 2024

Codecov Report

Attention: Patch coverage is 23.18841% with 53 lines in your changes missing coverage. Please review.

Project coverage is 83.73%. Comparing base (91d6edb) to head (dc6f680).

Files Patch % Lines
eds/components/PartnerCards.js 18.46% 53 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##            stage      #14      +/-   ##
==========================================
- Coverage   85.28%   83.73%   -1.55%     
==========================================
  Files           8        8              
  Lines        2460     2509      +49     
==========================================
+ Hits         2098     2101       +3     
- Misses        362      408      +46     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

aem-code-sync bot commented Jun 3, 2024

@cod17828 cod17828 self-requested a review June 3, 2024 12:01
eds/components/PartnerCards.js Outdated Show resolved Hide resolved
eds/components/PartnerCards.js Outdated Show resolved Hide resolved
eds/components/PartnerCards.js Outdated Show resolved Hide resolved
@draganatrajkovic draganatrajkovic requested a review from zagi25 June 3, 2024 12:28
@aem-code-sync aem-code-sync bot temporarily deployed to mwpw-151250-partner-lvl-cards June 3, 2024 12:37 Inactive
@Ben-Zahler Ben-Zahler changed the title Implemented filtering cards by partner level MWPW-151250: Implemented filtering cards by partner level Jun 3, 2024
try {
let cookies = document.cookie.split(';').map(cookie => cookie.trim());
let partnerDataCookie = cookies.find(cookie => cookie.startsWith('partner_data='));
if (!partnerDataCookie) return '';
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we need a public tag to handle this case, but I did not create it yet...

@aem-code-sync aem-code-sync bot temporarily deployed to mwpw-151250-partner-lvl-cards June 4, 2024 10:30 Inactive
@aem-code-sync aem-code-sync bot temporarily deployed to mwpw-151250-partner-lvl-cards June 4, 2024 10:30 Inactive
@aem-code-sync aem-code-sync bot temporarily deployed to mwpw-151250-partner-lvl-cards June 10, 2024 11:55 Inactive
@aem-code-sync aem-code-sync bot temporarily deployed to mwpw-151250-partner-lvl-cards June 12, 2024 15:07 Inactive
@aem-code-sync aem-code-sync bot temporarily deployed to mwpw-151250-partner-lvl-cards June 12, 2024 16:23 Inactive
@draganatrajkovic draganatrajkovic requested a review from zagi25 June 13, 2024 11:38
@aem-code-sync aem-code-sync bot temporarily deployed to mwpw-151250-partner-lvl-cards June 13, 2024 12:39 Inactive
@aem-code-sync aem-code-sync bot temporarily deployed to mwpw-151250-partner-lvl-cards June 14, 2024 10:24 Inactive
@aem-code-sync aem-code-sync bot temporarily deployed to mwpw-151250-partner-lvl-cards June 14, 2024 10:26 Inactive
@Ben-Zahler Ben-Zahler merged commit 41259c0 into stage Jun 14, 2024
5 checks passed
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.

5 participants