Fix: Trim WSO2-logo-orange.svg viewBox to fix small favicon #2185
Fix: Trim WSO2-logo-orange.svg viewBox to fix small favicon #2185OshadhaPalliyaguru wants to merge 1 commit intowso2:mainfrom
Conversation
There was a problem hiding this comment.
Copilot wasn't able to review any files in this pull request.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (1)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Purpose
The favicon shown in the browser tab on the WSO2 Integrator: MI 4.6 documentation site renders visibly smaller than in 4.5. This is a regression introduced when
theme.faviconwas switched to useWSO2-logo-orange.svg— an SVG asset that contains ~50% of transparent padding inside itsviewBox, causing the logo to occupy only the central half of the favicon slot when browsers render it at 16×16 / 32×32.Goals
Restore the favicon to its intended visual size (filling the browser tab icon space) while preserving the new orange WSO2 "W-in-circle" branding introduced in 4.6.
Approach
Trimmed the
viewBoxofen/docs/assets/img/WSO2-logo-orange.svgso it tightly fits the actual logo paths instead of including the original ~50% padding on every axis.viewBox="0 0 525.38 525.38"(logo content occupies only the central ~263×263 region)viewBox="131.09 131.22 262.94 262.94"(logo content fills the viewBox)The SVG
<path>data is not modified — only the viewport over the artwork is cropped. The visual design, colors, and proportions of the logo are unchanged.This same SVG is also reused in
en/theme/material/partials/footer.htmlas a 32×32 "Need support?" icon, where the padding caused the same visual shrinkage. The fix improves that icon too.No changes were required in
en/mkdocs.yml—theme.faviconcontinues to point atassets/img/WSO2-logo-orange.svg.Before / After (browser tab)
User stories
As a user visiting the WSO2 Integrator: MI 4.6 documentation, I want the WSO2 favicon to be clearly visible in my browser tab so I can quickly identify the docs site among multiple open tabs.
Release note
Fixed an issue where the favicon on the WSO2 Integrator: MI 4.6 documentation site appeared significantly smaller than expected in browser tabs.
Documentation
N/A
Training
N/A
Certification
N/A
Marketing
N/A
Automation tests
Unit tests
N/A
Code coverage information
N/A
Integration tests
N/A
Security checks
viewBoxattribute was modified).git diff— only one line in one SVG file is changed; no credentials, tokens, or secrets are introduced).Samples
N/A
Related PRs
This PR addresses the regression introduced by PR #2168 (commit
fd832817, "Update favicon to WSO2 orange logo in mkdocs configuration"), which switched the favicon to the padded SVG asset.Migrations (if applicable)
N/A
Test environment
mkdocs servefrom theen/directory, openedhttp://localhost:8000/en/latest/, hard-refreshed (Ctrl+F5), and confirmed the favicon now fills the browser tab icon space matching the 4.5 visual size, while preserving the orange WSO2 logo design introduced in 4.6.en/theme/material/partials/footer.html"Need support?" icon (which reuses the same SVG at 32×32) was also visually verified to render correctly post-fix.Learning
Investigated the cause by:
en/mkdocs.ymlagainst the previous version to confirmtheme.faviconhad been switched from a tightly-cropped PNG to the orange SVG.cx=262.56, cy=262.69, r=131.47confirmed content extents of approximately131.09, 131.22to394.03, 394.16inside a525.38 × 525.38viewBox — i.e., ~50% transparent padding on each axis).viewBoxis mapped to the favicon slot, so any internal padding directly shrinks the visible logo.No external libraries, plugins, or third-party patterns were introduced.