[Bug] Lightbox in Learning Path chapters gets stuck in infinite loading when navigating past embedded designs
Description
When opening an image inside a Learning Path chapter that contains an interactive embedded design (
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
The interactive component
Because simple-react-lightbox auto-discovers all tags wrapping elements within
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.
- π See contributing instructions.
- π¨ Wireframes and designs for Layer5 site in Figma (open invite)
- ππΎππΌ Questions: Discussion Forum and Community Slack.
Join the Layer5 Community by submitting your community member form.
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:
- I will inspect how "simple-react-lightbox" is currently configured in "src/sections/Learn-Layer5/Chapters/index.js".
- I will trace how it discovers image elements and includes the embedded design's anchor link in the gallery.
- I will look into restricting the lightbox gallery to actual chapter images and diagrams, excluding links or elements belonging to interactive embedded designs.
- 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.
@PARTH-TUSSLE @Maanvi212006 ^^
Hi, I would like to work on this issue.