Skip to content

fix(directory): show the configured business logo on public directories #2

Open
Calnode/calnode
#128

Description

@KitKat31337

Problem

The directory handler already supplies LogoURL and BusinessName, but the public /u/{handle} and /team/{slug} template does not display either as page branding. Its avatar is the person or team identity, not the business logo.

Proposed upstream fix

  1. Extract the matching business header markup currently duplicated in templates/book.html and templates/manage.html into a shared public-page template partial, then call it from booking, manage, and directory templates. Keep the person/team avatar inside the directory card.
  2. Populate the directory view data with the existing normalized LogoHeight and LogoOpacity settings using pageLogoHeight and opacityCSS, as the other public pages already do. Use the shared markup and responsive sizing, rather than introducing a hard-coded 48px logo.
  3. Match the existing fallback: display the business name when there is no logo, and render no header when neither is configured. Give the logo a useful, escaped alternative text based on BusinessName; if the name is empty, choose an accessible fallback in the shared partial.
  4. Add rendering tests for logo, name-only, and neither configured on both directory routes, plus a check that booking/manage branding remains intact.

This is a public-page consistency change. The local header snippet displays a logo, but bypasses the configurable size/opacity settings and duplicates markup that already exists on two pages.

Acceptance criteria

  • The configured business logo appears on person and team directories at desktop and mobile widths, using the configured height and opacity.
  • Name-only branding and no-branding cases render appropriately.
  • The person/team avatar remains distinct.
  • Booking and manage pages retain their existing branding behavior.

Observed in a local source build; separate from the SMTP change on feat/smtp-auth-login.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions