design-react-kit icon indicating copy to clipboard operation
design-react-kit copied to clipboard

[BUG] Add animations to the mobile menu in the header

Open emilioSp opened this issue 3 years ago • 1 comments

Describe the bug The mobile menu in the header doesn't have an entering and a leaving animation.

Expected behavior The menu should be animated like in the BI library. (See for instance the mobile menu of https://innovazione.gov.it/)

emilioSp avatar Mar 11 '21 08:03 emilioSp

I would love to tackle this. What do you think of the following solution?

in Collapse.tsx instead of toggling the display property we use the classic transformX, as follows

<CollapseBase
        className={classes}
        cssModule={{ 'navbar-collapse': 'navbar-collapsable' }}
        navbar={navbar}
        style={{transform: isOpen ? 'translateX(0)' : 'translateX(-100%)'}}
        {...attributes}
      >

As far as I can see, it implements the desired behaviour, but someone with more knowledge of the codebase may differ! ~~Let me know and I will open a PR :)~~

I went ahead and opened the PR so that you can clearly so what the solution would look like https://github.com/italia/design-react-kit/pull/775

mendaomn avatar Oct 28 '21 17:10 mendaomn

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Please read https://github.com/italia/design-react-kit/discussions/886.

stale[bot] avatar Dec 12 '23 02:12 stale[bot]