Skip to content

fix(menu-toggle): correct avatar alignment within menu-toggle #7416

Merged
mcoker merged 1 commit into
patternfly:mainfrom
sg00dwin:7317-menu-toggle-avatar-img
Apr 22, 2025
Merged

fix(menu-toggle): correct avatar alignment within menu-toggle #7416
mcoker merged 1 commit into
patternfly:mainfrom
sg00dwin:7317-menu-toggle-avatar-img

Conversation

@sg00dwin

@sg00dwin sg00dwin commented Mar 25, 2025

Copy link
Copy Markdown
Contributor

fixes #7410

Aligns the menu-toggle icon img correctly. Also removed pf-m-avatar modifier.

@patternfly-build

patternfly-build commented Mar 25, 2025

Copy link
Copy Markdown
Collaborator

@sg00dwin sg00dwin force-pushed the 7317-menu-toggle-avatar-img branch from 2b977ae to cbe70fe Compare April 2, 2025 23:03

@mcoker mcoker left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good! Next we'll need to make sure this avatar (or any large icon) doesn't change the menu toggle height. I tried this and it seemed OK but I didn't text extensively. Also it breaks plain/icon-only toggles:

.pf-v6-c-menu-toggle__icon {
  margin-block-start: calc(-1 * var(--pf-v6-c-menu-toggle--PaddingBlockStart));
  margin-block-end: calc(-1 * var(--pf-v6-c-menu-toggle--PaddingBlockEnd));
}

Comment thread src/patternfly/components/MenuToggle/menu-toggle.scss
@sg00dwin sg00dwin force-pushed the 7317-menu-toggle-avatar-img branch from cbe70fe to e85a8ec Compare April 10, 2025 20:29
@srambach

Copy link
Copy Markdown
Member

I think I'm seeing shift down of a couple pixels on the avatar menu toggle compared to the others, but I'm not sure why.
image

@mcoker mcoker left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@srambach

Copy link
Copy Markdown
Member

I think I'm seeing shift down of a couple pixels on the avatar menu toggle compared to the others, but I'm not sure why. image

I'm fine with merging and if it seems to really be a problem for consumers, we can put in a bug for the alignment.

@mcoker mcoker merged commit a0dcdd6 into patternfly:main Apr 22, 2025
@patternfly-build

Copy link
Copy Markdown
Collaborator

🎉 This PR is included in version 6.3.0-prerelease.8 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug - [Menu-toggle] - Avatar within a menu-toggle is not in alignment with text and icon

4 participants