Skip to content

fix: resolve <linearGradient> -nan attributes and SRL context errors - #8049

Open
tejaswiverma121-byte wants to merge 1 commit into
layer5io:masterfrom
tejaswiverma121-byte:fix/orchestration-console-errors
Open

tejaswiverma121-byte wants to merge 1 commit into
layer5io:masterfrom
tejaswiverma121-byte:fix/orchestration-console-errors

Conversation

@tejaswiverma121-byte

@tejaswiverma121-byte tejaswiverma121-byte commented Sep 13, 2026

Copy link
Copy Markdown
Contributor
  • Fix invalid -nan attributes in solutions-cost.svg by replacing with valid line coordinates
  • Wrap application with SimpleReactLightbox at root level in root-wrapper.js to provide global lightbox context
  • Add standard SEO Head export to orchestration-management page

Fixes #8048

Description

This PR fixes #8048
This PR resolves the console errors and warnings logged when viewing /solutions/orchestration-management and related solutions pages:

  1. SVG LinearGradient error:
    • Replaced invalid x1="-nan" y1="-nan" x2="-nan" y2="-nan" attributes in src/sections/Solutions/images/solutions-cost.svg with valid coordinates x1="28.0469" y1="328.661" x2="503.776" y2="328.661" matching the stroke path M28.0469 328.661H503.776.
  2. SimpleReactLightbox warning:
    • Wrapped the application at the root in root-wrapper.js with <SimpleReactLightbox>, ensuring that any component mounting <SRLWrapper> (or during client-side route transitions) always has access to the lightbox context.
  3. SEO Head metadata:
    • Added standard Head export with SEO metadata component in src/pages/solutions/orchestration-management/index.js.

Testing & Verification

  • Checked with ESLint: 0 errors.
  • Built and ran locally in Gatsby dev mode (http://localhost:8000/solutions/orchestration-management).
  • Verified in browser console that <linearGradient> attribute: Expected length, "-nan" and SRL - ERROR WHEN RESETTING THE LIGHTBOX STATUS are no longer logged.
Screenshot 2026-09-13 at 1 55 54 PM Screenshot 2026-09-13 at 1 56 47 PM

Notes for Reviewers

Signed commits

  • Yes, I signed my commits.

Summary by CodeRabbit

  • New Features

    • Added lightbox support for rendered content, enabling enhanced image viewing where applicable.
    • Added page metadata for the orchestration management page, including a title, description, and preview image.
  • Improvements

    • Improved how the orchestration management page appears in search results and link previews.

- Fix invalid -nan attributes in solutions-cost.svg by replacing with valid line coordinates
- Wrap application with SimpleReactLightbox at root level in root-wrapper.js to provide global lightbox context
- Add standard SEO Head export to orchestration-management page

Fixes layer5io#8048

Signed-off-by: tejaswiverma <tejaswiverma121@gmail.com>
@coderabbitai

coderabbitai Bot commented Sep 13, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 22f44160-cc06-4ddc-a27f-935625d2d55e

📥 Commits

Reviewing files that changed from the base of the PR and between bd554ad and 2290985.

⛔ Files ignored due to path filters (1)
  • src/sections/Solutions/images/solutions-cost.svg is excluded by !**/*.svg
📒 Files selected for processing (2)
  • root-wrapper.js
  • src/pages/solutions/orchestration-management/index.js

Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review.


📝 Walkthrough

Walkthrough

The root wrapper now provides SimpleReactLightbox context around rendered MDX content. The orchestration management page now exports SEO metadata through a Head component.

Changes

Lightbox Context

Layer / File(s) Summary
Root lightbox wrapper
root-wrapper.js
Imports SimpleReactLightbox and wraps the MDX provider and rendered element while retaining ContextWrapper.

Orchestration Management SEO

Layer / File(s) Summary
Page SEO metadata
src/pages/solutions/orchestration-management/index.js
Adds a Head export with title, description, and image metadata. The existing page rendering remains unchanged.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix · Severity of issue fixed: Medium

Suggested reviewers: akshatsinghai6682-sketch

Merge Risk: ⚪ Minimal · up to 22909

The lightbox, SVG, and SEO changes have no identified merge-blocking risk.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The new Head export in src/pages/solutions/orchestration-management/index.js adds SEO metadata. Issue #8048 concerns browser console errors and warnings from SVG gradients and SimpleReactLightbox.… Remove the unrelated Head export from this pull request, or link it to a separate issue that requires the SEO change.
Linked Issues check ❓ Inconclusive Issue #8048 requires clean SVG and SimpleReactLightbox rendering without console errors or warnings. The PR summary reports valid solutions-cost.svg coordinates and successful local verification. Th… Provide reviewable evidence for src/sections/Solutions/images/solutions-cost.svg, or provide independent verification that the invalid -nan attributes no longer occur, before deciding compliance with the SVG portion of #8048.
✅ Passed checks (3 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2…
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the two primary fixes: invalid -nan attributes and SimpleReactLightbox context errors.
Full details: Linked Issues check

Explanation

Issue #8048 requires clean SVG and SimpleReactLightbox rendering without console errors or warnings. The PR summary reports valid solutions-cost.svg coordinates and successful local verification. The summary also reports the SimpleReactLightbox wrapper in root-wrapper.js. However, src/sections/Solutions/images/solutions-cost.svg is excluded by !**/*.svg, so the SVG change and its result cannot be independently verified from reviewable evidence.

Full details: Out of Scope Changes check

Explanation

The new Head export in src/pages/solutions/orchestration-management/index.js adds SEO metadata. Issue #8048 concerns browser console errors and warnings from SVG gradients and SimpleReactLightbox. The PR evidence does not connect the SEO metadata to either objective.

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@github-actions

github-actions Bot commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for PR #8049 removed.

This PR preview was automatically pruned because we keep only the 3 most recently updated previews on GitHub Pages to stay within deployment size limits.

If needed, push a new commit to this PR to generate a fresh preview.

@dhruveshmishra dhruveshmishra left a comment

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.

thanks for replacing the -nan coords — can you confirm the gradient coordinates match the SVG viewBox at different sizes and that there are no other SVGs with -nan attributes? If possible provide a screenrecording for that

@tejaswiverma121-byte

tejaswiverma121-byte commented Sep 13, 2026

Copy link
Copy Markdown
Contributor Author
svg-responsive-demo Yes, confirmed on both points.. @dhruveshmishra

ViewBox & Scaling: The SVG defines viewBox="0 0 528 372". The stroked path runs from (28.0469, 328.661) to (503.776, 328.661). Because gradientUnits="userSpaceOnUse" operates in the coordinate space established by the SVG's viewBox (the same pattern used by paint0 through paint26 in this file), the gradient scales proportionally and stays aligned to the path across all screen widths.

Repository Scan: Ran git grep -i -- "-nan" and scanned all SVGs across the project; solutions-cost.svg was the only file containing "-nan" attributes, and there are 0 remaining occurrences.
Attached a quick recording/screenshots showing the SVG scaling smoothly across desktop, tablet, and mobile viewports with no console warnings.

svg-desktop-1200px svg-mobile-400px svg-tablet-768px

@PARTH-TUSSLE

Copy link
Copy Markdown
Contributor

Hey could you add this as an agenda item for websites meet on Monday, we could discuss it there, you can find the link to the meeting minutes in the #websites channel on Slack.

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.

Console errors for <linearGradient> and SRL on Orchestration Management page

3 participants