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

fix(core): dedupe requests in various pages #1927

Merged
merged 11 commits into from
Jan 23, 2025
Merged

fix(core): dedupe requests in various pages #1927

merged 11 commits into from
Jan 23, 2025

Conversation

jorgemoya
Copy link
Contributor

@jorgemoya jorgemoya commented Jan 23, 2025

What/Why?

  • Dedupe requests in various pages by properly caching/memoizing the function per page render.
  • Fix an issue with quick search result.

Testing

Tested and see less function calls that call fetch.

Copy link

vercel bot commented Jan 23, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
catalyst-canary ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 23, 2025 8:51pm
4 Skipped Deployments
Name Status Preview Comments Updated (UTC)
catalyst ⬜️ Ignored (Inspect) Jan 23, 2025 8:51pm
catalyst-au ⬜️ Ignored (Inspect) Visit Preview Jan 23, 2025 8:51pm
catalyst-soul ⬜️ Ignored (Inspect) Visit Preview Jan 23, 2025 8:51pm
catalyst-uk ⬜️ Ignored (Inspect) Visit Preview Jan 23, 2025 8:51pm

@jorgemoya jorgemoya requested a review from a team as a code owner January 23, 2025 18:56
Copy link

changeset-bot bot commented Jan 23, 2025

🦋 Changeset detected

Latest commit: 44ed32a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@bigcommerce/catalyst-core Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

const brandSearch = await fetchFacetedSearch({ brand: [slug] });
const brand = cacheBrandFacetedSearch(slug);
const brandSearch = await fetchFacetedSearch(brand);
// const brandSearch = await fetchFacetedSearch({ brand: [slug] });
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// const brandSearch = await fetchFacetedSearch({ brand: [slug] });

@jorgemoya jorgemoya added this pull request to the merge queue Jan 23, 2025
Merged via the queue into canary with commit 43351ab Jan 23, 2025
9 checks passed
@jorgemoya jorgemoya deleted the dedupe-requests branch January 23, 2025 20:55
@github-actions github-actions bot mentioned this pull request Jan 23, 2025
Copy link
Contributor

⚡️🏠 Lighthouse report

Lighthouse ran against https://catalyst-canary-10o668qih-bigcommerce-platform.vercel.app

🖥️ Desktop

We ran Lighthouse against the changes on a desktop and produced this report. Here's the summary:

Category Score
🟢 Performance 99
🟢 Accessibility 92
🟠 Best practices 78
🟠 SEO 82

📱 Mobile

We ran Lighthouse against the changes on a mobile and produced this report. Here's the summary:

Category Score
🟠 Performance 83
🟢 Accessibility 92
🟠 Best practices 78
🟠 SEO 85

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.

2 participants