-
Bug
-
Resolution: Done
-
Minor
-
None
-
1.7.0
-
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:
- props.logoWidth – explicit in the global.header/component block
- app.branding.fullLogoWidth – app-level branding fallback
- 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