Skip to content

feat(core): make fetch channel aware per locale#1055

Merged
jorgemoya merged 2 commits intomainfrom
add-dynamic-channel
Jul 2, 2024
Merged

feat(core): make fetch channel aware per locale#1055
jorgemoya merged 2 commits intomainfrom
add-dynamic-channel

Conversation

@jorgemoya
Copy link
Copy Markdown
Contributor

What/Why?

Add channel <=> locale config example.
Make client.fetch channel aware by fetching channel id assigned to locale.
Fetch from default channel if no map is found.

Testing

Locally, it requests per channel configured.

@jorgemoya jorgemoya requested a review from a team July 2, 2024 19:05
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Jul 2, 2024

🦋 Changeset detected

Latest commit: 1abc436

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

This PR includes changesets to release 2 packages
Name Type
@bigcommerce/catalyst-core Patch
@bigcommerce/catalyst-client 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

@vercel
Copy link
Copy Markdown

vercel Bot commented Jul 2, 2024

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

Name Status Preview Comments Updated (UTC)
catalyst-latest ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 2, 2024 9:21pm
5 Skipped Deployments
Name Status Preview Comments Updated (UTC)
catalyst-1millionproducts-store ⬜️ Ignored (Inspect) Visit Preview Jul 2, 2024 9:21pm
catalyst-au ⬜️ Ignored (Inspect) Visit Preview Jul 2, 2024 9:21pm
catalyst-test-store ⬜️ Ignored (Inspect) Visit Preview Jul 2, 2024 9:21pm
catalyst-uk ⬜️ Ignored (Inspect) Visit Preview Jul 2, 2024 9:21pm
catalyst-unstable ⬜️ Ignored (Inspect) Visit Preview Jul 2, 2024 9:21pm

Comment thread core/channels.config.ts Outdated
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Returning process.env.BIGCOMMERCE_CHANNEL_ID until we can figure out how to programatically detect if getLocale won't work in getChannelId.

Comment thread core/client/index.ts Outdated
@@ -1,4 +1,8 @@
import { createClient } from '@bigcommerce/catalyst-client';
// import { headers } from 'next/headers';
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👀

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jul 2, 2024

⚡️🏠 Lighthouse report

Lighthouse ran against https://catalyst-latest-kokmeu7z3-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 90
🟢 Accessibility 100
🟢 Best practices 100
🟢 SEO 90

📱 Mobile

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

Category Score
🟠 Performance 81
🟢 Accessibility 100
🟢 Best practices 100
🟢 SEO 92

@jorgemoya jorgemoya added this pull request to the merge queue Jul 2, 2024
Merged via the queue into main with commit 52214a3 Jul 2, 2024
@jorgemoya jorgemoya deleted the add-dynamic-channel branch July 2, 2024 21:22
@github-actions github-actions Bot mentioned this pull request Jul 2, 2024
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