Skip to content

chore: some updates on storefront#267

Merged
hmbanan666 merged 2 commits intomainfrom
storefront-update
Dec 16, 2025
Merged

chore: some updates on storefront#267
hmbanan666 merged 2 commits intomainfrom
storefront-update

Conversation

@hmbanan666
Copy link
Copy Markdown
Collaborator

@hmbanan666 hmbanan666 commented Dec 16, 2025


Summary by cubic

Adds a new Pins carousel to the storefront homepage, refreshes the header/home hero with the new logo, and moves the color mode control to the header for easier access. Also updates Nuxt-related dependencies.

  • New Features

    • Added PinsBlock.vue: auto-scrolling carousel with image/review items and placeholder images to ensure a minimum of 9 tiles.
    • Updated homepage layout: new logo (logo-full.png) and inserted the Pins block.
    • Moved color mode toggle from Navigation to Header using UColorModeButton.
  • Dependencies

    • Bumped workspace packages (Nuxt, @nuxt/image, @nuxt/ui, eslint, vite, vue-tsc, nuxt-auth-utils, devtools, i18n).
    • Regenerated pnpm-lock.yaml to reflect updates.

Written for commit ccf1462. Summary will update automatically on new commits.

Summary by CodeRabbit

  • New Features

    • Color mode toggle added to the header; removed from the main navigation.
    • New pins carousel on the homepage showcasing reviews and images.
  • Style

    • Improved responsive layout and image panel behavior for mobile/desktop.
    • Updated homepage imagery.
  • Chores

    • Bumped project dependencies to newer versions.

✏️ Tip: You can customize this high-level summary in your review settings.

@hmbanan666 hmbanan666 self-assigned this Dec 16, 2025
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Dec 16, 2025

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Walkthrough

Moves the color-mode toggle from navigation into the header, adds a new PinsBlock carousel component and inserts it on the home page, adjusts hero layout and image, and updates multiple workspace dependency versions.

Changes

Cohort / File(s) Summary
Color mode UI
apps/web-storefront/app/components/Header.vue, apps/web-storefront/app/components/Navigation.vue
Adds UColorModeButton to Header.vue (props: color="neutral", variant="outline", size="lg"). Removes the rendered <ColorModeToggle /> from Navigation.vue and leaves a commented placeholder referencing <UColorModeButton />. No runtime logic changes.
New Pins carousel component
apps/web-storefront/app/components/PinsBlock.vue
Adds PinsBlock.vue: a setup-style Vue component rendering a horizontal carousel of pins; filters out type: 'empty', pads to a minimum count (9) with placeholders, supports review_quote_with_image and image pin types, includes auto-scroll with mouse-aware play/pause and interval lifecycle cleanup.
Home page updates
apps/web-storefront/app/pages/index.vue
Inserts <PinsBlock :pins="[]" /> above categories, changes responsive layout orientation and sizing, replaces hero image sushi-heart-light.pnglogo-full.png, and adjusts image/text container sizing and ordering.
Workspace dependency bumps
pnpm-workspace.yaml
Bumps multiple Nuxt and tooling package versions (e.g., @nuxt/devtools, @nuxt/image, @nuxtjs/i18n, nuxt, @nuxt/ui, vite, vue-tsc, eslint, lint-staged, nuxt-auth-utils) without structural changes to workspace groups.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

  • Files warranting extra attention:
    • apps/web-storefront/app/components/PinsBlock.vue — review preparedPins filtering/padding logic, carousel options, auto-scroll interval and mouse tracking, lazy-loading handling, and cleanup on unmount.
    • apps/web-storefront/app/pages/index.vue — verify responsive layout changes and the hero image replacement render correctly across breakpoints.
    • apps/web-storefront/app/components/Header.vue & Navigation.vue — ensure the new toggle placement doesn't introduce layout regressions; confirm commented placeholder in Navigation.vue is safe to keep.

Possibly related PRs

Poem

🐇 I hopped through code and found a spin,
Pins now glide and logos grin,
A button moved to crown the head,
Dependencies nudged up ahead,
I nibble carrots, then commit — let's win! 🥕✨

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The PR title 'chore: some updates on storefront' is vague and generic, using non-descriptive language that fails to convey the specific changes made. Consider a more descriptive title that highlights the main changes, such as 'feat: add PinsBlock carousel component and update homepage layout' or 'chore: refresh storefront with PinsBlock carousel and new logo'.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch storefront-update

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4ec623e and ccf1462.

📒 Files selected for processing (1)
  • apps/web-storefront/app/pages/index.vue (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/web-storefront/app/pages/index.vue
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@socket-security
Copy link
Copy Markdown

socket-security bot commented Dec 16, 2025

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updated@​nuxt/​image@​1.11.0 ⏵ 2.0.09910091 +385100
Updated@​nuxtjs/​i18n@​10.1.2 ⏵ 10.2.198 +110093 +197 -1100
Updatedeslint@​9.38.0 ⏵ 9.39.294 -310010097 +2100
Updated@​nuxt/​devtools@​3.0.0 ⏵ 3.1.19810010097 -1100
Updated@​nuxt/​ui@​4.1.0 ⏵ 4.2.19810010099 +1100

View full report

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (2)
apps/web-storefront/app/components/Navigation.vue (1)

39-41: Remove commented-out code rather than leaving it in place.

Since the color mode toggle has been moved to Header.vue, this commented block is dead code. Keeping commented-out code clutters the codebase and can cause confusion about intent.

-  <!-- <div class="shrink-0 flex items-center gap-1.5 py-2 px-2">
-    <UColorModeButton />
-  </div> -->
apps/web-storefront/app/components/PinsBlock.vue (1)

82-85: Consider defining a proper Pin type instead of using any[].

Using any reduces type safety. Define an interface for the pin structure to improve maintainability and enable IDE support:

interface Pin {
  id: string
  type: 'review_quote_with_image' | 'image' | 'empty'
  user?: { name: string; avatarUrl?: string }
  text?: string
  mediaUrl?: string
  // ... other fields
}

const { pins } = defineProps<{ pins: Pin[] }>()

The type casting on line 85 (as unknown as ShallowRef<...>) suggests a potential type mismatch with useTemplateRef - verify this works correctly at runtime.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3fadfe4 and 4ec623e.

⛔ Files ignored due to path filters (3)
  • apps/web-storefront/public/logo-full.png is excluded by !**/*.png
  • apps/web-storefront/public/slider-test.jpg is excluded by !**/*.jpg
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (5)
  • apps/web-storefront/app/components/Header.vue (1 hunks)
  • apps/web-storefront/app/components/Navigation.vue (1 hunks)
  • apps/web-storefront/app/components/PinsBlock.vue (1 hunks)
  • apps/web-storefront/app/pages/index.vue (1 hunks)
  • pnpm-workspace.yaml (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: cubic · AI code reviewer
  • GitHub Check: build
🔇 Additional comments (7)
apps/web-storefront/app/components/Header.vue (1)

31-36: LGTM!

The UColorModeButton is added with consistent styling props (color, variant, size) matching other buttons in the header. Placement within the left flex container is appropriate.

pnpm-workspace.yaml (2)

37-37: Verify that @nuxt/ui ^4.2.1 supports the components used in this PR.

The PR uses UColorModeButton, UCarousel with autoScroll plugin, and UPageCard. Confirm these components and their APIs are available in this version.


15-31: Verify Node.js version compatibility and check for custom image providers or Sass usage.

Major version bumps in this update have breaking changes that may require attention:

  • @nuxt/image ^2.0.0: The biggest breaking change is how providers are defined. All providers now use a default export with the defineProvider wrapper. Most apps can upgrade with no code changes, but if you have custom providers, you'll need to update them to use defineProvider. Nuxt Image v2 requires Nuxt 3.1+. If you're on Nuxt 3.0.x, you'll need to upgrade to at least 3.1 first. Since the workspace specifies Nuxt 4.2.2, this requirement is met.

  • vite ^7.3.0: Vite no longer supports Node.js 18, which reached its EOL. Node.js 20.19+ / 22.12+ is now required. Additionally, support for the Sass legacy API is removed. Vite now only supports the modern API. Verify the project's Node.js version constraints and check for any Sass legacy API usage.

apps/web-storefront/app/pages/index.vue (2)

2-9: LGTM!

Layout adjustments for responsive design are well-structured. The image source update and responsive width classes (w-full md:w-76) provide appropriate scaling.


21-23: Passing an empty array shows only placeholder content.

The PinsBlock receives an empty array, which will render 9 placeholder items with /slider-test.jpg. If this is intentional placeholder content for demo purposes, consider adding a comment. Otherwise, this may need to be wired to actual data.

apps/web-storefront/app/components/PinsBlock.vue (2)

87-94: LGTM - cleanup pattern works correctly.

Nesting onBeforeUnmount inside onMounted is valid in Vue 3 and ensures the interval is properly cleaned up. The defensive optional chaining on emblaApi access is appropriate.


96-113: Hardcoded placeholder image path should be configurable or removed.

The path /slider-test.jpg used for placeholder items is hardcoded and may not exist in all deployment environments. Move this to a configuration constant or environment variable, or replace with a proper placeholder service if intended for production use.

Comment on lines +23 to +26
<NuxtLink
:to="undefined"
class="h-full self-start"
>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

NuxtLink with :to="undefined" renders as a non-navigable element.

If pins should be clickable with destinations, the to prop should reference item.url or similar. If navigation is not needed, consider removing the NuxtLink wrapper entirely to avoid confusion.

-      <NuxtLink
-        :to="undefined"
-        class="h-full self-start"
-      >
+      <div class="h-full self-start">
         <UPageCard
           ...
         </UPageCard>
-      </NuxtLink>
+      </div>

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In apps/web-storefront/app/components/PinsBlock.vue around lines 23 to 26, the
NuxtLink is rendered with :to="undefined" which produces a non-navigable
element; either set the to prop to the actual destination (e.g., :to="item.url"
or a computed route based on the pin) so each pin is clickable, or remove the
NuxtLink wrapper and replace it with a plain element when navigation is not
required; update the template accordingly and ensure any related tests or
accessibility attributes are adjusted.

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

3 issues found across 8 files

Prompt for AI agents (all 3 issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="apps/web-storefront/app/components/PinsBlock.vue">

<violation number="1" location="apps/web-storefront/app/components/PinsBlock.vue:24">
P2: NuxtLink has `to` set to `undefined`, creating a non-functional link. Either provide a valid route or remove the NuxtLink wrapper if navigation isn&#39;t needed.</violation>

<violation number="2" location="apps/web-storefront/app/components/PinsBlock.vue:90">
P2: Unsafe property access after optional chaining. If `plugins()` returns an object without `autoScroll`, this will throw. Continue the optional chain: `?.autoScroll?.play()`.</violation>
</file>

<file name="apps/web-storefront/app/pages/index.vue">

<violation number="1" location="apps/web-storefront/app/pages/index.vue:3">
P2: The gradient uses identical colors (`from-secondary-500 to-secondary-500`), making it effectively a solid color. If a gradient effect was intended, this appears to be a mistake. Consider using different shades like `from-secondary-400 to-secondary-500` or simplify to `bg-secondary-500` if a solid color was intended.</violation>
</file>

Reply to cubic to teach it or ask questions. Re-run a review with @cubic-dev-ai review this PR

onMounted(() => {
const interval = setInterval(() => {
if (carousel.value && isOutside.value) {
carousel.value?.emblaApi?.plugins().autoScroll.play()
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai bot Dec 16, 2025

Choose a reason for hiding this comment

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

P2: Unsafe property access after optional chaining. If plugins() returns an object without autoScroll, this will throw. Continue the optional chain: ?.autoScroll?.play().

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/web-storefront/app/components/PinsBlock.vue, line 90:

<comment>Unsafe property access after optional chaining. If `plugins()` returns an object without `autoScroll`, this will throw. Continue the optional chain: `?.autoScroll?.play()`.</comment>

<file context>
@@ -0,0 +1,114 @@
+onMounted(() =&gt; {
+  const interval = setInterval(() =&gt; {
+    if (carousel.value &amp;&amp; isOutside.value) {
+      carousel.value?.emblaApi?.plugins().autoScroll.play()
+    }
+  }, 2000)
</file context>
Fix with Cubic

}"
>
<NuxtLink
:to="undefined"
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai bot Dec 16, 2025

Choose a reason for hiding this comment

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

P2: NuxtLink has to set to undefined, creating a non-functional link. Either provide a valid route or remove the NuxtLink wrapper if navigation isn't needed.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/web-storefront/app/components/PinsBlock.vue, line 24:

<comment>NuxtLink has `to` set to `undefined`, creating a non-functional link. Either provide a valid route or remove the NuxtLink wrapper if navigation isn&#39;t needed.</comment>

<file context>
@@ -0,0 +1,114 @@
+      }&quot;
+    &gt;
+      &lt;NuxtLink
+        :to=&quot;undefined&quot;
+        class=&quot;h-full self-start&quot;
+      &gt;
</file context>
Fix with Cubic

Comment thread apps/web-storefront/app/pages/index.vue Outdated
<div class="mb-12 flex flex-row gap-6 md:items-center">
<div class="flex flex-col items-center justify-center shrink-0 size-28 bg-linear-to-br from-secondary-400 to-secondary-500 rounded-lg">
<div class="mb-12 flex flex-col md:flex-row gap-6 md:items-center">
<div class="w-full md:w-76 py-4 px-6 aspect-3/1 flex flex-col items-center justify-center shrink-0 bg-linear-to-br from-secondary-500 to-secondary-500 rounded-lg">
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai bot Dec 16, 2025

Choose a reason for hiding this comment

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

P2: The gradient uses identical colors (from-secondary-500 to-secondary-500), making it effectively a solid color. If a gradient effect was intended, this appears to be a mistake. Consider using different shades like from-secondary-400 to-secondary-500 or simplify to bg-secondary-500 if a solid color was intended.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/web-storefront/app/pages/index.vue, line 3:

<comment>The gradient uses identical colors (`from-secondary-500 to-secondary-500`), making it effectively a solid color. If a gradient effect was intended, this appears to be a mistake. Consider using different shades like `from-secondary-400 to-secondary-500` or simplify to `bg-secondary-500` if a solid color was intended.</comment>

<file context>
@@ -1,23 +1,27 @@
-  &lt;div class=&quot;mb-12 flex flex-row gap-6 md:items-center&quot;&gt;
-    &lt;div class=&quot;flex flex-col items-center justify-center shrink-0 size-28 bg-linear-to-br from-secondary-400 to-secondary-500 rounded-lg&quot;&gt;
+  &lt;div class=&quot;mb-12 flex flex-col md:flex-row gap-6 md:items-center&quot;&gt;
+    &lt;div class=&quot;w-full md:w-76 py-4 px-6 aspect-3/1 flex flex-col items-center justify-center shrink-0 bg-linear-to-br from-secondary-500 to-secondary-500 rounded-lg&quot;&gt;
       &lt;img
-        src=&quot;/sushi-heart-light.png&quot;
</file context>

✅ Addressed in ccf1462

@sonarqubecloud
Copy link
Copy Markdown

@hmbanan666 hmbanan666 merged commit c1c32f4 into main Dec 16, 2025
8 checks passed
@hmbanan666 hmbanan666 deleted the storefront-update branch December 16, 2025 13:42
@coderabbitai coderabbitai bot mentioned this pull request Dec 19, 2025
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.

1 participant