Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(pageheader): compensate the width of the overflow menu #5929

Conversation

AlexanderMelox
Copy link
Contributor

@AlexanderMelox AlexanderMelox commented Aug 22, 2024

Closes #5806

This PR fixes the issue of the overflow menu hiding actions even when there is enough space. I don't know if this is the best fix for it maybe @lee-chase can help out.

What did you change?

packages/ibm-products/src/components/PageHeader/PageHeader.tsx

How did you test and verify your work?

By opening the build and resizing the browser

@AlexanderMelox AlexanderMelox requested a review from a team as a code owner August 22, 2024 19:35
@AlexanderMelox AlexanderMelox requested review from devadula-nandan and sangeethababu9223 and removed request for a team August 22, 2024 19:35
Copy link

netlify bot commented Aug 22, 2024

Deploy Preview for carbon-for-ibm-products ready!

Name Link
🔨 Latest commit c95135c
🔍 Latest deploy log https://app.netlify.com/sites/carbon-for-ibm-products/deploys/66d86255df293c000858734e
😎 Deploy Preview https://deploy-preview-5929--carbon-for-ibm-products.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@AlexanderMelox
Copy link
Contributor Author

AlexanderMelox commented Aug 22, 2024

Screen caps showing the fix

Screen.Recording.2024-08-22.at.3.36.13.PM.mov
Screen.Recording.2024-08-22.at.3.37.07.PM.mov

lee-chase
lee-chase previously approved these changes Aug 23, 2024
Copy link
Member

@lee-chase lee-chase left a comment

Choose a reason for hiding this comment

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

Looks good to me, only concern would be the button size changing.

@matthewgallo
Copy link
Member

matthewgallo commented Aug 26, 2024

Can you see if you can send back a ref to the overflow menu from the ActionBar's onWidthChange callback? Then in PageHeader's handleActionBarWidthChange you can check for the width of the returned ref.

@AlexanderMelox
Copy link
Contributor Author

Can you see if you can send back a ref to the overflow menu from the ActionBar's onWidthChange callback? Then in PageHeader's handleActionBarWidthChange you can check for the width of the returned ref.

Used a ref for dynamic width

Copy link
Member

@matthewgallo matthewgallo left a comment

Choose a reason for hiding this comment

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

While we're still using both TS types and prop types, can you update the the prop types for the components that now have new props?

@AlexanderMelox
Copy link
Contributor Author

Makes sense, added the proptypes

@devadula-nandan
Copy link
Contributor

devadula-nandan commented Sep 9, 2024

can you check CI / avt-runner (3) (pull_request) -> Run AVT? it reported as pass, but the page header avt's failed, which needs to be re-aligned after this fix.

@AlexanderMelox AlexanderMelox added this pull request to the merge queue Sep 10, 2024
Merged via the queue into carbon-design-system:main with commit baf0ec2 Sep 10, 2024
20 of 21 checks passed
@AlexanderMelox AlexanderMelox deleted the 5806--pageheader-action-bar-item-fix branch September 10, 2024 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants