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: Menu refactor to Fiori3 #702
Conversation
Deploy preview for fundamental-styles ready! Built with commit ee0c701 |
4abe68e
to
696fab1
Compare
9557f63
to
345c251
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's remove some of unused/useless properties. They can cause some issues in future. Please also test the changes on IE11, which has to be supported as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is coming from the styles
I will work on this; however, in the meanwhile, do you think this is related to #691 ?
I will add this. |
345c251
to
c054f2f
Compare
|
3dffe1e
to
de2e4a9
Compare
299019b
to
95240e2
Compare
There are 2 known issues in IE as of now that I couldn’t find a fix for but I also see the same issue is present in components that use List component(Select, Multi Input etc)-
|
95240e2
to
9bccd7f
Compare
a1dda42
to
dc3be2e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @kavya-b, please take a look at this comment, Rest looks good for me.
src/menu.scss
Outdated
|
||
display: block; | ||
display: flex; | ||
align-items: center; | ||
transition: all $fd-animation-speed ease-in; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no mention about transition in menu specs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missed this. Will remove it, thanks for pointing it out!
@kavya-b thanks for the updates. |
Hi @droshev, I tried to figure out if I am missing something that makes the unnormalized mode look like that, but cannot point to anything. Update: |
@kavya-b We need to check how the nested menu behaves and looks on mobile. I guess it may behave like the nested list in side navigation. Can you follow up on that? |
Hi @droshev , the spec says "On Phone the Submenu opens in a new page, leaving the Menu option behind. " The same visual design will apply for the submenu; on clicking of the parent item, the submenu will open in the same dialog, replacing the parent menu options, and the device's back button will bring it back to the parent menu.
Thank you for this. |
d773b66
to
653d077
Compare
@droshev As discussed, the documentation for mobile mode has been modified to reflect full screen: |
There was a problem hiding this 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! good work
…bile mode - keeping tablet cozy as the default - added rtl example - fixed IE submenu width issue - changed option-name to title - removed float usage - provided examples for cozy, compact and mobile mode - updated screenshots, tests, documentation
replaced <a> tag with <span> tag
-removing redundant span container tag and moving fd-menu__item to li tag instead- for submenu though it has to have its parent menu item in its own span so that parent's states do not override submenu states -added role and tabindex to show tab order and focus added fd-fiori-focus() new function instead of defining in menu.scss- uses inner focus instead of outer focus -updated playground
- removed redundant right-arrow icons when submenu was not reeally present - instead used other icons to showcase secondary icon size - using separator in a different element - removed 'desktop' from modifier class name - removed transition property - applied font-size on icon directly - updated playground tests and screenshots accordingly - added selected-separated usecase to visual test
Renamed to fd-menu__separator modified playground test and documentation
removed comment from code added description and usage of classes to documentation removed hybrid usage of icons and long text from documentation, keeping it consistent, all these combinations are already preseent in playground added breaking changes to pr description
-added link class to aid implementation and support accessibility per aria standards. -added some aria attributes -modified playground test and documentation to support above changes
-also added is-selected mode and right/left arrow automatically on has-child class -using --submenu modifier on addon-after element will add the right arrow by default, if custom icon needs to be added, one can use it same as addon-before element without --submenu modifier. -updated playground tests and documentation to reflect these changes
ad61bd3
to
ee0c701
Compare
Related Issue
Closes #571
Description
Update Menu styles, documentation and tests to align with Fiori3 specs
fd-menu__group
classes, their playground tests and documentation examples related to group headers.fd-menu--compact
andfd-menu--mobile
. Default will be cozy tablet mode.fd-menu__item--separated
from<ul>
level to its own elementfd-menu__separator
in a<span>
since separators are now used instead of group headers to show grouping.fd-menu__title
for the text that will be used in a<span>
fd-menu__addon-after
that will be used similar tofd-menu__addon-before
fd-menu__addon-after--submenu
to get the right(or left in RTL) navigation arrow in a smaller icon size.fd-menu__sublist
at the<ul>
level corresponding tofd-menu__list
of the parent menu.fd-menu__link
that wraps the item name and associated icons, if any.has-child
that can be applied on the parent__link
class to apply styles for the parent element that has a submenu.fd-menu__item
class to the parent<li>
tag.Breaking changes
fd-menu__item--separated
. Instead usefd-menu__separator
in its own<span>
after the<li>
item where you want the separator.fd-menu__group
. Separator itself acts a visual cue for grouping.fd-menu--addon-before
(notfd-menu__addon-before
) as it is unnecessary now and will be covered by existing classes.fd-menu__item
class to the parent<li>
tag. Usefd-menu__link
class on the<a>
tag instead.For new classes added, please refer to the above section.
Screenshots
Before:
After:
Updated screenshots: