layer5 icon indicating copy to clipboard operation
layer5 copied to clipboard

[Bug] Lightbox in Learning Path chapters gets stuck in infinite loading when navigating past embedded designs

Open tejaswiverma121-byte opened this issue 1 week ago β€’ 3 comments

Description

When opening an image inside a Learning Path chapter that contains an interactive embedded design (), clicking the navigation arrows (such as the left arrow <) causes the lightbox to enter an infinite loading spinner with the caption reading "Meshery Logo".

To Reproduce Go to: https://layer5.io/learn/learning-paths/mastering-kubernetes-for-engineers/explore-dapr-with-meshery/dapr/deploy-python-and-nodejs-application Scroll down to the visualizer diagram image at the bottom of the page. Click on the image to open it in the lightbox. Click the left navigation arrow (<) to go to the previous slide in the gallery. Notice that an infinite spinner appears with the caption "Meshery Logo", and no image loads.

Expected Behavior

The lightbox should only include actual chapter images/diagrams in its gallery, and should not attempt to load external web URLs or design embed badges as gallery slides.

Root Cause

In src/sections/Learn-Layer5/Chapters/index.js, the entire chapter content is wrapped in {children} (simple-react-lightbox).

The interactive component (from @layer5/meshery-design-embed) contains an anchor link in its bottom corner pointing to a web URL

Because simple-react-lightbox auto-discovers all tags wrapping elements within , it includes this badge link as an image slide. When the user navigates to it, the browser fails to load the HTML webpage as an image, resulting in the infinite spinner.

Screenshots

https://github.com/user-attachments/assets/1c359afc-b1a1-4fdc-bd9f-4bcc5148f784

Environment:

  • Host OS:macOS
  • Browser:Chrome

Contributor Resources and Handbook

The layer5.io website uses Gatsby, React, and GitHub Pages. Site content is found under the master branch.

Join the Layer5 Community by submitting your community member form.

tejaswiverma121-byte avatar Nov 21 '26 16:11 tejaswiverma121-byte

Hi I would like to work on this issue.

I went through the bug description and understand that the lightbox is mistakenly treating the anchor link inside the embedded Meshery design component as a gallery slide.

My proposed approach:

  1. I will inspect how "simple-react-lightbox" is currently configured in "src/sections/Learn-Layer5/Chapters/index.js".
  2. I will trace how it discovers image elements and includes the embedded design's anchor link in the gallery.
  3. I will look into restricting the lightbox gallery to actual chapter images and diagrams, excluding links or elements belonging to interactive embedded designs.
  4. I will test the fix on the reported Learning Path chapter to ensure gallery navigation works correctly, and verify that normal chapter images still open and navigate as expected.

I will first investigate the existing implementation and choose the approach that best fits the current codebase.

Could you please assign this issue to me? Thank you.

srishtimishra520-beep avatar Nov 21 '26 17:11 srishtimishra520-beep

@PARTH-TUSSLE @Maanvi212006 ^^

tejaswiverma121-byte avatar Nov 21 '26 17:11 tejaswiverma121-byte

Hi, I would like to work on this issue.

JayitaL avatar Nov 21 '26 17:11 JayitaL