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

feat: make shellbar popovers customizable #1222

Merged
merged 2 commits into from
Sep 28, 2020

Conversation

prsdthkr
Copy link
Member

Description

In this change, we update the Shellbar component to accept props to be spread to the Popovers of the action menu, collapsed mobile menu, notifications menu, product menu, product switch popover, and the profile menu. This will allow consumers to customize these; for example, set the placement.

fixes #919

@prsdthkr prsdthkr self-assigned this Sep 25, 2020
@prsdthkr prsdthkr requested a review from a team September 25, 2020 03:56
@netlify
Copy link

netlify bot commented Sep 25, 2020

Deploy preview for fundamental-react ready!

Built with commit e7098bb

https://deploy-preview-1222--fundamental-react.netlify.app

productMenu: PropTypes.object,
productSwitch: PropTypes.object,
profileMenu: PropTypes.object
},
Copy link
Contributor

@skvale skvale Sep 25, 2020

Choose a reason for hiding this comment

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

How about separating each of them out?

Shellbar.PropTypes = {
        actionMenuPopoverProps: PropTypes.object,
        mobileMenuPopoverProps: PropTypes.object,
        notificationsPopoverProps: PropTypes.object,
        productMenuPopoverProps: PropTypes.object,
        productSwitchPopoverProps: PropTypes.object,
        profileMenuPopoverProps: PropTypes.object
},

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, I started out with that but thought there are too many popovers. So I think packaging them would be cleaner, no?

Copy link
Contributor

Choose a reason for hiding this comment

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

Do you think we would need to make other changes to the popovers or just placement overrides?

Copy link
Member Author

@prsdthkr prsdthkr Sep 25, 2020

Choose a reason for hiding this comment

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

Consumers might need to customize some cosmetic props like noArrow, widthSizingType or add popperClassName and other stuff. It would be a little more future proof.

@prsdthkr prsdthkr merged commit 4136a37 into master Sep 28, 2020
@prsdthkr prsdthkr deleted the feat/customize-shellbar-popovers branch September 28, 2020 23:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Accept "Placement" props in Shellbar ProfileMenu/ProductMenu
3 participants