Skip to content

Fix: unnecessary social share warning - #470

Open
vivekrajputofficial29-afk wants to merge 1 commit into
AOSSIE-Org:mainfrom
vivekrajputofficial29-afk:fix-social-share-warning
Open

vivekrajputofficial29-afk wants to merge 1 commit into
AOSSIE-Org:mainfrom
vivekrajputofficial29-afk:fix-social-share-warning

Conversation

@vivekrajputofficial29-afk

@vivekrajputofficial29-afk vivekrajputofficial29-afk commented Nov 19, 2026 •

Copy link
Copy Markdown

Description

Fixed an unnecessary console warning in the SocialShareButton component.

Previously, the component logged a warning whenever the SocialShareButton widget was not loaded, even when debugging was disabled.

Updated the condition to display the warning only when the debug prop is set to true.

Addressed Issues

Fixes #461

Changes Made

  • Updated src/components/SocialShareButton.jsx.
  • Added the existing debug prop condition to the warning statement.
  • Prevented unnecessary console warnings during normal runtime.
  • Preserved the existing debugging functionality.

Testing

  • Successfully started the application using npm run dev.
  • Verified the application in the browser.
  • Confirmed that the unnecessary warning no longer appears with the default debug={false} setting.

Screenshots/Recordings

Not applicable. This is a minor console warning fix.

Checklist

Summary by CodeRabbit

  • Bug Fixes
    • The widget-unavailable warning now appears only when debug mode is enabled.

@coderabbitai

coderabbitai Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

SocialShareButton now logs the missing-widget warning only when debug is true. When debug is false, the branch does not log the warning.

Changes

Social share warning

Layer / File(s) Summary
Gate the missing-widget warning
src/components/SocialShareButton.jsx
The missing-widget branch logs a warning only when debug is true.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Bug fix · Severity of issue fixed: Low

Suggested labels: Typescript Lang

Suggested reviewers: amankv1234

Merge Risk: Minimal · up to 804b8

The missing-widget warning is no longer logged by default and still appears when debug is enabled. No merge-blocking risk was identified.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "Fix: unnecessary social share warning" matches the main change. The PR gates the widget-not-loaded warning in SocialShareButton.jsx behind the existing debug prop, so the warning appears on…
Linked Issues check Passed [#461] Requirement: stop logging SocialShareButton widget not loaded during normal runtime when window.SocialShareButton is undefined. The proposed fix gates the warning behind the existing `debug…
Out of Scope Changes check Passed The pull request changes one file, src/components/SocialShareButton.jsx, with +3/-3 lines. The change only adds the existing debug condition to the widget-not-loaded warning. It does not alter exp…
Full details: Title check

Explanation

The title "Fix: unnecessary social share warning" matches the main change. The PR gates the widget-not-loaded warning in SocialShareButton.jsx behind the existing debug prop, so the warning appears only when debug is true. This addresses linked issue #461, which asks the component to stop logging the warning during normal runtime. The title is short, specific, and states the primary fix.

Full details: Linked Issues check

Explanation

[#461] Requirement: stop logging SocialShareButton widget not loaded during normal runtime when window.SocialShareButton is undefined. The proposed fix gates the warning behind the existing debug prop. The change in src/components/SocialShareButton.jsx (+3/-3) gates the console.warn on debug === true. With the default debug={false}, the warning does not log. The debug prop still enables the warning. The issue's later 'Critical' impact entry has no supporting detail and conflicts with the 'Low' impact entry, so it does not add a requirement. No coding requirement in #461 remains unmet. The issue does not require automated tests. The assessment relies on the PR summary and the author's manual verification. No repository inspection tool was available to confirm the diff directly.

Full details: Out of Scope Changes check

Explanation

The pull request changes one file, src/components/SocialShareButton.jsx, with +3/-3 lines. The change only adds the existing debug condition to the widget-not-loaded warning. It does not alter exported declarations, and the summary reports no other changes. The change directly implements #461. The package-lock.json file is excluded by the ignored-files rule and was not assessed. No unrelated change was identified from the available evidence.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

A rabbit checks the console light,
The widget waits beyond the page.
With debug on, a warning sounds;
With debug off, the logs stay calm.
The rabbit hops along its way.

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between b396d1b and 804b8ab.

Files ignored due to path filters: 1

  • package-lock.json is excluded by !**/package-lock.json
Files selected for processing: 1

  • src/components/SocialShareButton.jsx

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@github-actions github-actions Bot added bug Something isn't working enhancement New feature or request configuration Config file changes frontend Frontend changes javascript JavaScript/TypeScript changes size/M 51-200 lines changed first-time-contributor First time contributor and removed size/M 51-200 lines changed labels Nov 19, 2026
@gitcordapp

gitcordapp Bot commented Nov 19, 2026

Copy link
Copy Markdown

Link your account with Gitcord

Thanks for opening this PR, @vivekrajputofficial29-afk!

To receive Discord notifications and contributor tracking for this organization:

  1. Join Discord: https://discord.gg/hjUhu33uAn
  2. In Discord, run /link vivekrajputofficial29-afk
  3. Paste the verification code into your GitHub bio (or a public gist)
  4. Click Verify in Discord (or run /verify-link vivekrajputofficial29-afk)

Once linked, Gitcord can notify you about reviews, merges, and more.

— Posted by Gitcord

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working configuration Config file changes enhancement New feature or request first-time-contributor First time contributor frontend Frontend changes javascript JavaScript/TypeScript changes size/M 51-200 lines changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG]: SocialShareButton logs unconditional console.warn when script is not loaded

1 participant