-
Notifications
You must be signed in to change notification settings - Fork 85
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
ActionPopover items are not aligned if some items have icons while others don't #5801
Comments
Hi @harpalsingh, we discussed there are two alignment approaches for the item text which we aren't sure which one to go with. Do we either:
What do you think? |
@clairedenning @ljemmo would you be able to look at this for us please? |
@ljemmo @clairedenning Could you update on this one please? |
@Parsium and @nineteen88 It looks like we're supporting approach 2 in the DS today. Here's a screenshot of the menu in figma. usually we would advise that if using icons, you should use them on all menu items. Or alternatively you should use no icons on all items. However in the edge case that you have a mix, i'd suggest we go for approach 2 for MVP and iterate further if we get feedback to do so. Sound like a plan? Then at least carbon will have parity with the DS. |
Awesome thanks for this @ljemmo 👍🏼 In that case we'll raise a ticket to support that second approach |
FE-5722 |
… item's icons removes left or right padding based on the `horizontalAlignment` prop, this ensures the correct padding is added/removed based on the current alignment. This guarantees icon alignment is correct when some menu items are text-only and some contain icons fix #5801
…th other item's icons removes left or right padding on menu item icon based on the `horizontalAlignment` prop, this ensures the correct padding is added/removed based on the current alignment. This guarantees icon alignment is correct when some menu items are text-only and some contain icons fix #5801
ensure component aligns with Design System specification fix #5801
ensure component aligns with Design System specification fix #5801
aligns component with the sage design system, to ensure consumers can use the component with expected styling and functionality. Nine different styling variations have been added which change the alignment and padding of each child to ensure designs are correct. Also, support for submenu's opening on the right has been included with the addition of the `submenuPosition` prop. When set to "right" the menu-item chevron will appear on the right of the action popover menu, and any submenu's will open from the right-hand side. Also, when the `submenuPosition` prop is "left", either by default, or set by the consumer and a content is re-sized the `submenuPosition` will be temporarily set to "right" if the window is deemed to be too small. Finally, icon's are now supported in submenu's and can be included by passing the `icon` prop to the submenu's menu item. fix #5801
aligns component with the sage design system, to ensure consumers can use the component with expected styling and functionality. Nine different styling variations have been added which change the alignment and padding of each child to ensure designs are correct. Also, support for submenu's opening on the right has been included with the addition of the `submenuPosition` prop. When set to "right" the menu-item chevron will appear on the right of the action popover menu, and any submenu's will open from the right-hand side. Also, when the `submenuPosition` prop is "left", either by default, or set by the consumer and a content is re-sized the `submenuPosition` will be temporarily set to "right" if the window is deemed to be too small. Finally, icon's are now supported in submenu's and can be included by passing the `icon` prop to the submenu's menu item. fix #5801
aligns component with the sage design system, to ensure consumers can use the component with expected styling and functionality. Nine different styling variations have been added which change the alignment and padding of each child to ensure designs are correct. Also, support for submenu's opening on the right has been included with the addition of the `submenuPosition` prop. When set to "right" the menu-item chevron will appear on the right of the action popover menu, and any submenu's will open from the right-hand side. Also, when the `submenuPosition` prop is "left", either by default, or set by the consumer and a content is re-sized the `submenuPosition` will be temporarily set to "right" if the window is deemed to be too small. Finally, icon's are now supported in submenu's and can be included by passing the `icon` prop to the submenu's menu item. fix #5801
aligns component with the sage design system, to ensure consumers can use the component with expected styling and functionality. Nine different styling variations have been added which change the alignment and padding of each child to ensure designs are correct. Also, support for submenu's opening on the right has been included with the addition of the `submenuPosition` prop. When set to "right" the menu-item chevron will appear on the right of the action popover menu, and any submenu's will open from the right-hand side. Also, when the `submenuPosition` prop is "left", either by default, or set by the consumer and a content is re-sized the `submenuPosition` will be temporarily set to "right" if the window is deemed to be too small. Finally, icon's are now supported in submenu's and can be included by passing the `icon` prop to the submenu's menu item. fix #5801
aligns component with the sage design system, to ensure consumers can use the component with expected styling and functionality. Nine different styling variations have been added which change the alignment and padding of each child to ensure designs are correct. Also, support for submenu's opening on the right has been included with the addition of the `submenuPosition` prop. When set to "right" the menu-item chevron will appear on the right of the action popover menu, and any submenu's will open from the right-hand side. Also, when the `submenuPosition` prop is "left", either by default, or set by the consumer and a content is re-sized the `submenuPosition` will be temporarily set to "right" if the window is deemed to be too small. Finally, icon's are now supported in submenu's and can be included by passing the `icon` prop to the submenu's menu item. fix #5801
aligns component with the sage design system, to ensure consumers can use the component with expected styling and functionality. Nine different styling variations have been added which change the alignment and padding of each child to ensure designs are correct. Also, support for submenu's opening on the right has been included with the addition of the `submenuPosition` prop. When set to "right" the menu-item chevron will appear on the right of the action popover menu, and any submenu's will open from the right-hand side. Also, when the `submenuPosition` prop is "left" or "right", the `submenuPosition` will be temporarily set to the opposite value if the window on the left or right is deemed to be too small. Finally, icon's are now supported in submenu's and can be included by passing the `icon` prop to the submenu's menu item. fix #5801
aligns component with the sage design system, to ensure consumers can use the component with expected styling and functionality. Nine different styling variations have been added which change the alignment and padding of each child to ensure designs are correct. Also, support for submenu's opening on the right has been included with the addition of the `submenuPosition` prop. When set to "right" the menu-item chevron will appear on the right of the action popover menu, and any submenu's will open from the right-hand side. Also, when the `submenuPosition` prop is "left" or "right", the `submenuPosition` will be temporarily set to the opposite value if the window on the left or right is deemed to be too small. Finally, icon's are now supported in submenu's and can be included by passing the `icon` prop to the submenu's menu item. fix #5801
aligns component with the sage design system, to ensure consumers can use the component with expected styling and functionality. Nine different styling variations have been added which change the alignment and padding of each child to ensure designs are correct. Also, support for submenu's opening on the right has been included with the addition of the `submenuPosition` prop. When set to "right" the menu-item chevron will appear on the right of the action popover menu, and any submenu's will open from the right-hand side. Also, when the `submenuPosition` prop is "left" or "right", the `submenuPosition` will be temporarily set to the opposite value if the window on the left or right is deemed to be too small. Finally, icon's are now supported in submenu's and can be included by passing the `icon` prop to the submenu's menu item. fix #5801
aligns component with the sage design system, to ensure consumers can use the component with expected styling and functionality. Nine different styling variations have been added which change the alignment and padding of each child to ensure designs are correct. Also, support for submenu's opening on the right has been included with the addition of the `submenuPosition` prop. When set to "right" the menu-item chevron will appear on the right of the action popover menu, and any submenu's will open from the right-hand side. Also, when the `submenuPosition` prop is "left" or "right", the `submenuPosition` will be temporarily set to the opposite value if the window on the left or right is deemed to be too small. Finally, icon's are now supported in submenu's and can be included by passing the `icon` prop to the submenu's menu item. fix #5801
## [119.9.0](v119.8.0...v119.9.0) (2023-08-02) ### Features * **action-popover:** align component with design system ([d411789](d411789)), closes [#5801](#5801)
🎉 This issue has been resolved in version 119.9.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Current behaviour
When an
ActionPopover
menu renders with a mix of items with and without icons then the labels are not aligned.Expected behaviour
When an
ActionPopover
menu renders with a mix of items with and without icons then the labels should be aligned and the icon's space should be preserved on the items without icons.CodeSandbox or Storybook URL
https://codesandbox.io/s/affectionate-sound-cqi2fv?file=/src/App.js
JIRA Ticket (Sage Only)
No response
Suggested Solution
No response
Carbon Version
114.7.1
Design Tokens Version
No response
What browsers are you seeing the problem on?
Chrome
What Operating System are you seeing the problem on?
MacOS
Anything else we should know?
No response
Confidentiality
The text was updated successfully, but these errors were encountered: