Skip to content

Consolidate Card component - #3366

Merged
ellen-octopus merged 11 commits into
mainfrom
ellen/card-consolidation
Aug 18, 2026
Merged

Consolidate Card component#3366
ellen-octopus merged 11 commits into
mainfrom
ellen/card-consolidation

Conversation

@ellen-octopus

@ellen-octopus ellen-octopus commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Card component

  • Consolidated Card into a single component:
    • Added mutually-exclusive icon / imgSrc variants
    • Added featured variant that can be used on homepage to emphasise content (has larger title and description).
    • Dropped the unused padded and related-topics variants.
  • Removed IconTile component → now fully covered by Card.
  • Removed unused Related component.
  • Updated ArticleList to use card styling → this also isn't currently in use but I left it in place for now.

Important

I relied on Claude to fully remove the Related and IconTile components, and to update ArticleList to use card styling.

Default size

No image or icon Image Icon
image image CleanShot 2026-08-17 at 12 44 58@2x

Featured size

No image or icon Image Icon
CleanShot 2026-08-17 at 12 57 07@2x image CleanShot 2026-08-17 at 12 58 21@2x

Updated pages

Patterns

deployments/patterns updated to use card with no icon or image.

Before After
CleanShot 2026-08-17 at 10 27 02@2x CleanShot 2026-08-17 at 10 26 22@2x

Variables

projects/variables/getting-started replaced card with normal list.

Before After
CleanShot 2026-08-17 at 10 29 31@2x CleanShot 2026-08-17 at 10 29 58@2x

Kubernetes

kubernetes updated to icon variant.

Before After
CleanShot 2026-08-17 at 10 21 24@2x image

Components showcase

components updated with new card showcase.

Icons

  • Added Docker, Kubernetes, Helm, Kustomize, Windows, and YAML icons

ellen-octopus and others added 6 commits August 17, 2026 09:14
…lated

Card now supports an optional `icon` prop as an alternative to imgSrc/imgAlt
(mutually exclusive via a discriminated union), and drops the unused
`padded`/`related-topics` variants in favour of a single `featured` variant.
IconTile, Related, and the now-unused List/Youtube icons are removed since
Card covers their use cases. Updates every existing Card usage that relied
on the removed variants (patterns/index.mdx, getting-started.mdx,
components.mdx), reuses the shared card styles in ArticleList/main.css
instead of separate post-list/related CSS, and renames the .simple-grid/
.simple-grid-3 classes to .col-2/.col-3.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Adds Docker, Kubernetes, Kustomize, Octopus, Windows, and Yaml icon
components (Docker/Kubernetes/Windows unused for now, added for upcoming
pages). Kubernetes docs now use icon={...} cards instead of logo images
for the Helm/YAML/Kustomize/Octopus UI links.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Replace the Kustomize icon with the new brand mark (white K on a solid
tile, layered with translucent background squares). Add an optional
monochrome mode to the Octopus icon and a matching iconProps pass-through
on Card, then use it on the Kubernetes overview page so the Octopus icon
matches the other monochrome icon cards instead of standing out in blue.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Drop the per-usage monochrome opt-in on the Octopus icon and the
iconProps pass-through it required on Card. Pushing color control up to
call sites just invited an inconsistent blue icon to reappear elsewhere;
since Octopus is only ever used as a monochrome icon alongside its
siblings (Docker, Kubernetes, Helm, Kustomize, Windows, Yaml), it now
always renders with currentColor like the rest of that icon set.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Restructures the Card examples so each variant (default, featured) shows its no-image/image/icon options together, instead of grouping by image type across variants.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@team-marketing-branch-protections

Copy link
Copy Markdown

Pull request environment is available at https://stoctodocspr3366.z22.web.core.windows.net.

You can view the ephemeral environment status in Octopus Deploy.

This environment will be automatically deprovisioned when the pull request is closed, or after 7 days of inactivity.

ellen-octopus and others added 2 commits August 17, 2026 16:14
Resolves duplicate headings, list/table/fence formatting, and trailing
newline issues flagged by the Markdown lint job, and adds "evenodd" to
the custom dictionary for the new Kubernetes icon's SVG fill-rule.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@ellen-octopus
ellen-octopus marked this pull request as ready for review August 17, 2026 06:31

7. Save the variable by clicking **Save**.
8. In this example, well reference this variable from a **Run a Script** step.
8. In this example, we'll reference this variable from a **Run a Script** step.

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.

All these will likely conflict with the "mass format" here: #3358

should avoid unrelated docs changes like this in the future.

I would suggest waiting and then specifically calling out this pr what it does and rebasing, did you actually make any docs changes? apart from automatic ones?

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.

Thanks @enf0rc3
On this page I had only wanted to update the Learn More section to remove the cards it was using, the rest of the changes were automatic ones

Comment thread src/components/icons/Helm.astro Outdated

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.

This looks like it's just a copy of helm.svg but in a .astro file.
Can we just commit the SVG itself?

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 need the .astro file in order to specify the icon colour and make sure it respsects the theme.

Claude's technical explanation:

Each path has fill="currentColor", which lets the icon inherit its color from CSS. That only works if the SVG is inlined in the DOM, which is what the .astro wrapper gives us — loading it as a raw <img src="helm.svg"> would break that, since currentColor doesn't work through an image reference.

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.

Hmm. We do color-theming for images that are part of the interface, like the chevrons on the nav menu, or the toolbar images...

But this is content within an individual page. We have about 2000 png files and we don't have light/dark mode variants of them, wouldn't things like the helm logo fall in that bucket?

Comment thread src/pages/docs/kubernetes/index.mdx Outdated
description="Learn more about how you can use Octopus variables for Helm values in our Helm documentation."
imgAlt="Helm logo"
imgSrc="/docs/img/helm-logo.png"
icon={Helm}

@borland borland Aug 17, 2026

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.

One thing which bit me about this kind of thing. Referencing an image directly as a component causes it to be emitted directly into the HTML output.

It's only referenced one time in the document, so it isn't a big deal, but if the image were referenced, say, 10 times, we'd end up with 10 duplicates of the image which makes the HTML larger and correspondingly slower for the end user (and terrible for LLM's if they happened to consume the HTML variant of the page). I did this by accident with the chevrons in the nav-list. There were dozens of them 🤦

Except for niches I think we'd be better off to reference images via svg/png files rather than inlining the HTML

@ellen-octopus ellen-octopus Aug 18, 2026

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 got Claude to fix this (pushed in the latest commit) so icon now takes the URL of an SVG file instead of a component. I've removed the .astro icon files I introduced 🙂

The card component still supports themed icons (this is a deliberate design decision) but I've added a branded variant that preserves the colours in the source SVG file. This can be used for logos:
CleanShot 2026-08-18 at 12 00 01@2x
CleanShot 2026-08-18 at 12 00 24@2x

Removes standalone icon Astro components in favor of raw SVGs referenced directly by Card, and adds/resizes the octopus logo asset.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@ellen-octopus
ellen-octopus merged commit 33bd8c7 into main Aug 18, 2026
7 checks passed
@ellen-octopus
ellen-octopus deleted the ellen/card-consolidation branch August 18, 2026 04:01
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.

4 participants