Skip to content

logo as image#6661

Open
nmerget wants to merge 24 commits into
mainfrom
test-logo-as-image
Open

logo as image#6661
nmerget wants to merge 24 commits into
mainfrom
test-logo-as-image

Conversation

@nmerget
Copy link
Copy Markdown
Collaborator

@nmerget nmerget commented May 11, 2026

Proposed changes

Changed DBBrand component to render the default logo via CSS background images (served from foundations assets) rather than via the icon system

resolves https://github.com/db-ux-design-system/core-team/issues/2455

Types of changes

  • Bugfix (non-breaking change that fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Refactoring (improvements to existing components or architectural decisions)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update (if none of the other choices apply)

Further comments

🔭🐙🐈 Test this branch here: https://design-system.deutschebahn.com/core-web/review/test-logo-as-image

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 11, 2026

⚠️ No Changeset found

Latest commit: 45d9e2a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions github-actions Bot added 📕documentation Improvements or additions to documentation 🏗foundations 🏘components labels May 11, 2026
github-actions Bot and others added 2 commits May 12, 2026 10:11
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@github-actions github-actions Bot added the 📺showcases Changes to 1-n showcases label May 12, 2026
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@nmerget nmerget added this to the 4.9.0 milestone May 13, 2026
@mfranzke mfranzke added this to Roadmap May 13, 2026
@nmerget nmerget modified the milestones: 4.9.0, 4.10.0 May 19, 2026
Comment thread scripts/package.json Outdated
Comment thread packages/components/src/components/brand/model.ts
@mfranzke mfranzke moved this from 👀 Actively In Review to 🎶 Waiting for feedback in UX Engineering Team Backlog May 19, 2026
@nmerget nmerget requested a review from mfranzke May 22, 2026 11:02
@nmerget nmerget moved this from 🎶 Waiting for feedback to 🎁 Ready for review in UX Engineering Team Backlog May 22, 2026
@mfranzke mfranzke requested a review from Copilot May 31, 2026 11:13
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 26 out of 49 changed files in this pull request and generated 6 comments.

Files not reviewed (3)
  • packages/vite-plugin/test/fixtures/react-app/package-lock.json: Language not supported
  • packages/vite-plugin/test/fixtures/vue-app/package-lock.json: Language not supported
  • pnpm-lock.yaml: Language not supported

Comment thread packages/components/src/components/brand/brand.lite.tsx
Comment thread packages/components/src/components/brand/brand.scss
Comment thread packages/components/src/components/brand/model.ts Outdated
Comment thread packages/components/src/components/brand/docs/Migration.md
Comment thread scripts/package.json Outdated
# Conflicts:
#	__snapshots__/brand/showcase/chromium-highContrast/DBBrand-should-match-screenshot-1/DBBrand-should-match-screenshot.png
#	__snapshots__/brand/showcase/chromium/DBBrand-should-match-screenshot-1/DBBrand-should-match-screenshot.png
#	__snapshots__/brand/showcase/firefox/DBBrand-should-match-screenshot-1/DBBrand-should-match-screenshot.png
#	__snapshots__/brand/showcase/mobile-chrome/DBBrand-should-match-screenshot-1/DBBrand-should-match-screenshot.png
#	__snapshots__/brand/showcase/mobile-safari/DBBrand-should-match-screenshot-1/DBBrand-should-match-screenshot.png
#	__snapshots__/brand/showcase/webkit/DBBrand-should-match-screenshot-1/DBBrand-should-match-screenshot.png
#	__snapshots__/header/showcase/chromium-highContrast/DBHeader-should-match-screenshot-1/DBHeader-should-match-screenshot.png
#	__snapshots__/header/showcase/chromium/DBHeader-should-match-screenshot-1/DBHeader-should-match-screenshot.png
#	__snapshots__/header/showcase/firefox/DBHeader-should-match-screenshot-1/DBHeader-should-match-screenshot.png
#	__snapshots__/header/showcase/mobile-chrome/DBHeader-should-match-screenshot-1/DBHeader-should-match-screenshot.png
#	packages/components/package.json
#	pnpm-lock.yaml
#	scripts/package.json
@nmerget nmerget enabled auto-merge (squash) June 1, 2026 06:05
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@nmerget nmerget modified the milestones: 4.10.0, 4.11.0 Jun 1, 2026
Comment on lines 20 to 21
IconProps &
ShowIconProps &
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.

Suggested change
IconProps &
ShowIconProps &

no more necessary

}

&[data-no-text="true"] {
font-size: 0;
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 might be an a11y issue. Screenreaders might skip texts with font-size 0.

"Do not size content to 0 pixels if you want the content to be read by a screen reader." (webaim)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might be an a11y issue. Screenreaders might skip texts with font-size 0.

"Do not size content to 0 pixels if you want the content to be read by a screen reader." (webaim)

I even also already came to that thought, it's good that you remind me of this. We should check our codebase in general, as we're already using it at other places, and want to add the label by aria-label additionally.

@michaelmkraus michaelmkraus moved this from 🎁 Ready for review to 👀 Actively In Review in UX Engineering Team Backlog Jun 2, 2026
@michaelmkraus michaelmkraus self-requested a review June 2, 2026 11:56
"dev:html": "pnpm run copy-assets && pnpm run build-assets && pnpm run build-style:01_sass && vite --open",
"dev:react": "nodemon --watch src --watch scripts --watch configs --ext tsx,ts,cjs --exec \"pnpm run compile:react\"",
"dev:scss": "sass src:build --load-path=node_modules --watch --source-map",
"dev:scss": "sass src:build --load-path=node_modules --watch",
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.

Shouldn't we keep the --source-map flag for dev?

<DBBrand>(Default) With Logo</DBBrand>
<DBBrand hideLogo={true}>No Logo</DBBrand>
<DBBrand hideLogo={true}>
<DBBrand data-logo="db-systel" noText>
Copy link
Copy Markdown
Contributor

@michaelmkraus michaelmkraus Jun 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You added data-logo, but there is no CSS selector in brand.scss that overrides the --db-logo-url. Right now, this example will just render the default DB logo, right? I think we need to add the CSS logic and type the prop.

Comment on lines +15 to +20
content: "";
block-size: #{variables.$db-sizing-sm};
aspect-ratio: var(--db-logo-aspect-ratio);
background-image: var(--db-logo-url);
background-repeat: no-repeat;
background-size: auto #{variables.$db-sizing-sm};
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.

Logo became $db-sizing-sm from $db-sizing-md. Is this intended?

@michaelmkraus michaelmkraus moved this from 👀 Actively In Review to 🎶 Waiting for feedback in UX Engineering Team Backlog Jun 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🏘components 🛠️configuration 📕documentation Improvements or additions to documentation 🏗foundations 📺showcases Changes to 1-n showcases

Projects

Status: No status
Status: 🎶 Waiting for feedback

Development

Successfully merging this pull request may close these issues.

4 participants