Skip to content

fix: restore card sizing, alignment, and theme layout changes#7828

Open
dhruveshmishra wants to merge 2 commits into
layer5io:masterfrom
dhruveshmishra:fix/academy-logo-green-pillars
Open

fix: restore card sizing, alignment, and theme layout changes#7828
dhruveshmishra wants to merge 2 commits into
layer5io:masterfrom
dhruveshmishra:fix/academy-logo-green-pillars

Conversation

@dhruveshmishra

Copy link
Copy Markdown
Contributor

Description

This PR fixes #7817
This PR updates the Layer5 Academy comparison card logo to ensure it has green/teal pillars in both light and dark themes, making the branding consistent across both modes.

I am attaching screen recording for the same
before:-

Screen.Recording.2026-06-27.at.1.18.04.AM.mov

after:-

Screen.Recording.2026-06-27.at.1.21.25.AM.mov

Copilot AI review requested due to automatic review settings June 26, 2026 21:50

Copilot AI 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.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Fixes comparison card thumbnail/logo rendering to restore consistent sizing/alignment and ensure Layer5 Academy branding displays correctly in both light and dark themes.

Changes:

  • Enhanced Image to accept a wrapper style prop and adjusted SVG rendering behavior.
  • Updated Card thumbnail selection logic to prefer dark thumbnails and apply logo/banner-specific objectFit/scaling.
  • Adjusted card thumbnail container/image CSS and switched Academy comparison thumbnails to SVG.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
src/components/image.js Adds style passthrough and changes SVG wrapper/img sizing behavior.
src/components/Card/index.js Introduces thumbnail selection + heuristics for logos/banners to control fit and scaling.
src/components/Card/Card.style.js Updates thumbnail layout/padding and enforces consistent wrapper/img sizing.
src/collections/resources/comparison/layer5-academy-vs-moocit/index.mdx Switches light/dark thumbnails from PNG to SVG for consistent branding across themes.

Comment thread src/components/image.js
Comment thread src/components/Card/index.js Outdated
Comment on lines +24 to +39
const isLogo =
thumbnail?.extension === "svg" ||
thumbnail?.publicURL?.endsWith(".svg") ||
thumbnail?.publicURL?.toLowerCase().includes("logo") ||
thumbnail?.publicURL?.toLowerCase().includes("icon") ||
thumbnail?.publicURL?.toLowerCase().includes("cncf-landscape") ||
thumbnail?.publicURL?.toLowerCase().includes("academy") ||
thumbnail?.publicURL?.toLowerCase().includes("docker-swarm") ||
thumbnail?.publicURL?.toLowerCase().includes("smp");

const isOReillyBanner =
frontmatter.title?.toLowerCase().includes("introduction to istio") ||
frontmatter.title?.toLowerCase().includes("advanced istio") ||
frontmatter.abstract?.toLowerCase().includes("introduction to istio") ||
frontmatter.title?.toLowerCase().includes("oscon") ||
frontmatter.title?.toLowerCase().includes("o'reilly");

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have resolved the issue by adding optional chaining (?.includes) to prevent any potential runtime TypeErrors on these fields if they are missing or undefined.

Comment thread src/components/Card/index.js Outdated
Comment on lines +24 to +32
const isLogo =
thumbnail?.extension === "svg" ||
thumbnail?.publicURL?.endsWith(".svg") ||
thumbnail?.publicURL?.toLowerCase().includes("logo") ||
thumbnail?.publicURL?.toLowerCase().includes("icon") ||
thumbnail?.publicURL?.toLowerCase().includes("cncf-landscape") ||
thumbnail?.publicURL?.toLowerCase().includes("academy") ||
thumbnail?.publicURL?.toLowerCase().includes("docker-swarm") ||
thumbnail?.publicURL?.toLowerCase().includes("smp");

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is a simple check and is already verified working, I'd prefer to keep the current explicit checks to avoid introducing any regression risk

@dhruveshmishra dhruveshmishra force-pushed the fix/academy-logo-green-pillars branch from cdbb927 to 16fe1f0 Compare June 26, 2026 22:06
…ety checks

Signed-off-by: dhruveshmishra <dhruveshmishra09@gmail.com>
@dhruveshmishra dhruveshmishra force-pushed the fix/academy-logo-green-pillars branch from 56dc8e2 to 4e28029 Compare June 26, 2026 22:09
@github-actions

github-actions Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for PR #7828 removed.

This PR preview was automatically pruned because we keep only the 6 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.

@Bhumikagarggg

Copy link
Copy Markdown
Contributor

@dhruveshmishra Thank you for your contribution! Let's discuss this during the website call tomorrow at 5:30 PM IST | 7 AM CST Add it as an agenda item to the meeting minutes, if you would 🙂

@dhruveshmishra

Copy link
Copy Markdown
Contributor Author

@Bhumikagarggg sure mam

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[UI] Fix banner image sizing

3 participants