Skip to content

Add optical scaling for logos and improve badge logo handling - #150

Merged
ritwikshanker merged 2 commits into
mainfrom
bugfix/fix-repo-urls
Sep 10, 2026
Merged

ritwikshanker merged 2 commits into
mainfrom
bugfix/fix-repo-urls

Conversation

@ritwikshanker

Copy link
Copy Markdown
Collaborator

This pull request significantly improves the rendering and consistency of repository and owner logos in provenance badges. The main focus is on ensuring that all logos appear at a visually consistent size, regardless of their original aspect ratio or canvas padding. This is achieved by introducing an "optical size correction" (logoScale) for each logo, updating the badge rendering logic, and adding comprehensive tests to enforce these constraints.

Logo scaling and provenance badge improvements:

  • Added a logoScale property to the RepoIdentity and associated logo entry types, and populated all repository and owner logos with measured scale values to ensure consistent optical sizing across the badge strip. [1] [2]
  • Updated the LogoImg and badge rendering logic in RepoProvenance.tsx to apply the logoScale transform, ensuring that all logos are visually balanced and clipped appropriately within a fixed-size slot. [1] [2] [3]
  • Refactored badge components to use a unified Badge component for both owners and repositories, removing the old OwnerBadge and WideLogo components. [1] [2]

Data and configuration updates:

  • Updated the logo data for all active repositories and owners, including adding new media assets for Bgee and CREATIS (VIP), and specifying logoScale for each.
  • Improved documentation and comments in repoProvenance.ts to explain the rationale and measurement method for logoScale. [1] [2]

Testing and validation:

  • Added tests to ensure that every logo has a logoScale and that all scale values are within the expected measured range, preventing visual regressions.

These changes collectively ensure that provenance badges look professional and consistent, regardless of the source or format of the logo images.

@ritwikshanker
ritwikshanker merged commit e7ff15d into main Sep 10, 2026
5 checks passed
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