Skip to content

fix: GH-1185 header logo portal-logo on img-only pictures#1186

Merged
wesleyboar merged 1 commit into
feat/GH-999-let-cms-admin-edit-headerfrom
fix/GH-1185-header-logo-portal-logo-class
Jun 18, 2026
Merged

fix: GH-1185 header logo portal-logo on img-only pictures#1186
wesleyboar merged 1 commit into
feat/GH-999-let-cms-admin-edit-headerfrom
fix/GH-1185-header-logo-portal-logo-class

Conversation

@wesleyboar

@wesleyboar wesleyboar commented Jun 18, 2026

Copy link
Copy Markdown
Member

Overview

Fixes missing portal-logo on the header logo <img> when the picture has no link, by aligning class placement with the TACC picture template’s attribute hoisting rules.

Related

Changes

  • added apply_header_logo_classes() on HeaderLogoPlugin to mirror picture template hoist behavior
  • added optional picture_img_class on the default picture template for img-only classes when attributes hoist to a parent
  • updated portal_logo picture template to extend default only (logic lives in the plugin)
  • added tests for linked and img-only header logo markup

Testing

  1. docker exec core_cms python manage.py test taccsite_cms.tests.djangocms_picture_portal_logo taccsite_cms.tests.djangocms_picture_default_caption --no-input
  2. After feat: GH-999 let CMS admin change header logo #1083 is merged and this branch is rebased onto main: add a header logo via CMS, confirm linked logo still has navbar-brand on <a> and portal-logo on <img>.
  3. Remove the logo link in the plugin; confirm <img> still has portal-logo (and Core-Styles layout holds).

UI

Screenshots: pending upload

Notes

Do not merge until #1083 is merged (this PR is stacked on that branch). Rebase onto main after #1083 lands.

HeaderLogoPlugin mirrors picture template hoist rules so portal-logo
lands on img with a single class attribute when attrs are not hoisted,
and via picture_img_class when they are.

Closes #1185
@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@wesleyboar wesleyboar merged commit a4f1a43 into feat/GH-999-let-cms-admin-edit-header Jun 18, 2026
@wesleyboar wesleyboar deleted the fix/GH-1185-header-logo-portal-logo-class branch June 18, 2026 22:49
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