patternfly / patternfly/patternfly-react

Bug - [Masthead] - MastheadBrand icons is reloaded

Open
#8,850 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Pinned
Dominant language
TypeScript
Stars
862
Forks
392
Avg merge
4d 8h
Merged PRs (30d)
9

Description

Every time the Dropdown component is toggled, the MastheadBrand/MastheadBrand Image component is reloaded. This issue only occurs when using MastheadBrand with an icon router link. The affected components are Dropdown and MastheadBrand/MastheadBrand Image.

How do you reproduce the problem?

Use MastheadBrand with an icon router link.
Toggle the Dropdown component.
Notice that the MastheadBrand/MastheadBrand Image component is reloaded each time the Dropdown state changes.
Expected behavior
The MastheadBrand/MastheadBrand Image component should not be reloaded when toggling the Dropdown component, regardless of whether MastheadBrand is used with an icon router link or not.

Is this issue blocking you?
This issue may not be critical, but it can affect the performance of the website/application. A workaround could be to use MastheadBrand without an icon router link.

Code Sandbox:
https://26rvq2.csb.app/

Open and close the menu bar on the right, and observe the logo. The issue is observed in specific versions of browsers only.

Screenshots
N/A

What is your environment?

OS: MacOS 13.2
Browser: Version 111.0.5563.64 (Official Build) (x86_64)
Version: ^4.276.6

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Dropdown and MastheadBrand/MastheadBrand Image components and reproduce the behavior using the linked CodeSandbox. Toggle the menu with MastheadBrand configured with an icon router link, then compare it with the version without one. Done means the MastheadBrand or MastheadBrand Image component no longer reloads when Dropdown state changes.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.