Skip to content

fix: render callout icons as inline SVG instead of external asset#48

Open
julia-rabello wants to merge 1 commit into
masterfrom
fix/callout-icon-external-dependency
Open

fix: render callout icons as inline SVG instead of external asset#48
julia-rabello wants to merge 1 commit into
masterfrom
fix/callout-icon-external-dependency

Conversation

@julia-rabello

Copy link
Copy Markdown

What is the purpose of this pull request?

Replaces the CSS :before background-image used to render callout/admonition icons (info, warning, danger) with an inline SVG generated directly in renderBlockquote.js. Rendering no longer depends on any external asset host.

What problem is this solving?

Callout icons were loaded from the DigitalOcean Space vtex-dev-portal-navigation.fra1.digitaloceanspaces.com via background: url(...) in src/styles/font-styles.js. That bucket no longer exists — all four icon URLs (info.svg, warning.svg, danger.svg, success.svg) now return 404 NoSuchBucket. Icons silently disappeared while the colored background/border still rendered fine, since those don't depend on an external resource.

This is the same root cause and fix applied in the sibling vtexdocs/components repo (see vtexdocs/components#86), which uses the identical bucket for its own callout icons.

How should this be manually tested?

Render a markdown description containing > ℹ️ some text, > ⚠️ some text, or > ❗ some text and confirm the callout shows a colored circle icon (info/warning/danger) with no network request to the old bucket.

Screenshots or example usage

Verified via a static harness reproducing renderBlockquote's output + the updated CSS — all three variants render their icon correctly (grey "i" for info, orange "!" for warning, red "!" for danger).

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Requires change to documentation, which has been updated accordingly.

The vtex-dev-portal-navigation DigitalOcean Space that callout icons (info,
warning, danger) were loaded from via CSS background-image no longer
exists (404 NoSuchBucket), so icons silently disappeared while the
colored background/border still rendered. Icons are now inline SVGs
generated in renderBlockquote, removing the external dependency entirely.
@julia-rabello

Copy link
Copy Markdown
Author

Tracked in Jira: EDU-19009

Related fix in the sibling repo: vtexdocs/components#86

Related Slack thread: https://vtex.slack.com/archives/GM3C9C3QS/p1783599938129019

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.

1 participant