Uploaded image for project: 'Red Hat Developer Hub Bugs'
  1. Red Hat Developer Hub Bugs
  2. RHDHBUGS-994

CompanyLogo logoWidth does not fall back to app.branding.fullLogoWidth

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor Minor
    • None
    • 1.7.0
    • UI
    • RHDH F&UI plugins 3276

      Description of problem:

      CompanyLogo, rendered at global.header/component, applies a width of 150px. While this value can be adjusted, integrators must update their appConfig in order to change the value.

      This does not provide a smooth upgrade experience for administrators of RHDH upgrading from 1.6.z, as app.branding.fullLogoWidth has this value–it should be used.

      Note that it is important that width is explicitly set as a prop in the img tag–this allows for SVGs without an explicit width to be rendered. Without us explicitly setting a width in the img element, SVGs that can be rendered by the SidebarLogo component cannot be rendered by CompanyLogo (such as the default RHDH logo).

       

      CompanyLogo should resolve the value in this order:

      1. props.logoWidth – explicit in the global.header/component block
      2. app.branding.fullLogoWidth – app-level branding fallback
      3. The default logoWidth value of 150px as specified by the internal LogoRender component

       

      If props.logoWidth is omitted:

      app:
        branding:
          fullLogoWidth: 110px   # ← used as fallback
      
      

      Actual results:

      • fullLogoWidth is not respected by CompanyLogo

      Expected results:

      • If props.logoWidth is absent, the component checks app.branding.fullLogoWidth.

      Reproducibility (Always/Intermittent/Only Once):

      Always

      Build Details:

      • Component: CompanyLogo
      • Location: global.header/component
      • Style currently hard-coded in component source

              rh-ee-mitkumar Mitesh Kumar
              rh-ee-mitkumar Mitesh Kumar
              RHIDP - Frontend Plugins & UI
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: