fix: render callout icons as inline SVG instead of external asset#48
Open
julia-rabello wants to merge 1 commit into
Open
fix: render callout icons as inline SVG instead of external asset#48julia-rabello wants to merge 1 commit into
julia-rabello wants to merge 1 commit into
Conversation
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.
6 tasks
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is the purpose of this pull request?
Replaces the CSS
:before background-imageused to render callout/admonition icons (info, warning, danger) with an inline SVG generated directly inrenderBlockquote.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.comviabackground: url(...)insrc/styles/font-styles.js. That bucket no longer exists — all four icon URLs (info.svg,warning.svg,danger.svg,success.svg) now return404 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/componentsrepo (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 textand 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