Skip to content

Conversation

@igorbrasileiro
Copy link
Contributor

@igorbrasileiro igorbrasileiro commented Oct 6, 2025

What is this Contribution About?

Fixes analyticsScript script to not be render blocking request at pagespeed insight reports.

before: https://pagespeed.web.dev/analysis/https-storefront-deco-site/iin3vqwbni?form_factor=mobile
image

after: https://pagespeed.web.dev/analysis/https-sites-storefront--m5kd1f-decocdn-com/lhres7nu3v?form_factor=mobile
image

Summary by CodeRabbit

  • Refactor
    • Updated analytics script to use modern module loading, improving reliability and potential page performance.
  • Chores
    • Strengthened type enforcement in parameter handling by removing a suppression, enabling broader compile-time checks.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 6, 2025

Walkthrough

Updated the OneDollarStats component by removing a TypeScript error suppression in a params loop and modifying the analytics script tag in the Head to use type="module".

Changes

Cohort / File(s) Summary
Component update
website/components/OneDollarStats.tsx
Removed a // @ts-ignore (or similar) comment in parameter processing, enabling normal type checking; added type="module" to the analytics <script> in <Head>, changing script loading to ES module mode.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

I thump and nod at stats so bright,
A module hop in moonlit night—
No ts-ignore, I chew it clean,
Type-safe clover, crisp and green.
Scripts now bound in tidy rolls,
Bunny logs with carrot goals.

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Description Check ⚠️ Warning The pull request description includes the required “What is this Contribution About?” section and illustrative before-and-after screenshots but omits the Issue Link, Loom Video, and Demonstration Link sections mandated by the repository’s template, leaving key contextual and testing information missing. Please update the description to include the Issue Link section with the related ticket number, a Loom video URL demonstrating the change, and a Demonstration Link to a testable environment so that reviewers have full context and can verify the fix.
✅ Passed checks (1 passed)
Check name Status Explanation
Title Check ✅ Passed The title concisely and accurately describes the primary change of converting the OneDollarStats analytics script to use type="module", matching the PR focus on fixing render-blocking behavior.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/one-dollar

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.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 6, 2025

Tagging Options

Should a new tag be published when this PR is merged?

  • 👍 for Patch 0.126.13 update
  • 🎉 for Minor 0.127.0 update
  • 🚀 for Major 1.0.0 update

@igorbrasileiro igorbrasileiro changed the title fix: 1$ stats script type module fix: OneDollarStats script type module Oct 6, 2025
coderabbitai bot added a commit that referenced this pull request Oct 6, 2025
Docstrings generation was requested by @igorbrasileiro.

* #1415 (comment)

The following files were modified:

* `website/components/OneDollarStats.tsx`
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 6, 2025

Note

Generated docstrings for this pull request at #1416

@igorbrasileiro igorbrasileiro merged commit 11ad767 into main Oct 6, 2025
5 of 6 checks passed
@igorbrasileiro igorbrasileiro deleted the fix/one-dollar branch October 6, 2025 18:44
@coderabbitai coderabbitai bot mentioned this pull request Oct 23, 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.

4 participants