bito-code-review[bot] commented on PR #40985:
URL: https://github.com/apache/superset/pull/40985#issuecomment-4686199431

   <!-- Bito Reply -->
   The architectural review finding is correct. In the current implementation 
of `superset-frontend/src/features/home/Menu.tsx`, the `brand.hide_logo` flag 
is used to gate both the logo rendering and the branding text, which prevents 
the intended behavior of showing text-only branding when the logo is hidden.
   
   To resolve this, you should decouple the visibility of the logo and the 
text. The logo and its tooltip should be gated by `brand.hide_logo`, while the 
branding text should be rendered independently.
   
   Here is the corrected implementation for 
`superset-frontend/src/features/home/Menu.tsx`:
   
   ```tsx
             {!brand.hide_logo && (
               <Tooltip
                 id="brand-tooltip"
                 placement="bottomLeft"
                 title={brand.tooltip}
                 arrow={{ pointAtCenter: true }}
               >
                 {renderBrand()}
               </Tooltip>
             )}
             {brand.text && (
               <StyledBrandText>
                 <span>{brand.text}</span>
               </StyledBrandText>
             )}
   ```
   
   Would you like me to check the other comments on this PR and implement fixes 
for them as well?
   
   **superset-frontend/src/features/home/Menu.tsx**
   ```
   {!brand.hide_logo && (
               <Tooltip
                 id="brand-tooltip"
                 placement="bottomLeft"
                 title={brand.tooltip}
                 arrow={{ pointAtCenter: true }}
               >
                 {renderBrand()}
               </Tooltip>
             )}
             {brand.text && (
               <StyledBrandText>
                 <span>{brand.text}</span>
               </StyledBrandText>
             )}
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to