disqus-react icon indicating copy to clipboard operation
disqus-react copied to clipboard

Unparseable Color String Causes Disqus Comments to Fail in Next.js Project

Open animanoir opened this issue 9 months ago • 2 comments

Bug Report

Describe the bug

The bug occurs when the parseColor function attempts to parse an unparseable color string in the format oklch(0.9850.002247.839). This results in an error that prevents Disqus comments from appearing in the Next.js project.

To Reproduce

  1. Navigate to the page with Disqus comments: Go to the page where Disqus comments are supposed to be displayed.
  2. Trigger the color parsing: The error occurs when the parseColor function is called, likely during the rendering of the Disqus comments section.
  3. Observe the error: The error message indicates that the color string is unparseable, causing the Disqus comments to fail to load.

Expected behavior

The expected behavior is for the parseColor function to correctly parse the color string or handle it gracefully if it is invalid, allowing Disqus comments to load without errors.

Specifications:

  • OS: Windows 11
  • Package version: Next.js version 15.1.7
  • Node version: v22.13.1

Additional context

The error seems to stem from an incorrectly formatted oklch color string. The oklch function expects values for lightness (l), chroma (c), and hue (h), typically separated by spaces. The provided string lacks proper spacing between the values, which might be causing the parsing issue. The correct format should be oklch(l c h / a), where l, c, and h are separated by spaces and a is the optional alpha channel value. I'm not using Daisy.

animanoir avatar Feb 24 '25 19:02 animanoir

disqus could not handle oklch() color for now.

Related issues:

CrazyOrr avatar Apr 10 '25 06:04 CrazyOrr

Just because of a damn style? Grim.

animanoir avatar Apr 10 '25 15:04 animanoir

Hi there. Any updates on this?

Is there anything we can do to help?

lucascaton avatar Jul 15 '25 06:07 lucascaton