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

Sidebar: "duration" prop does not appear to do anything #3328

Closed
caguthrie opened this issue Dec 7, 2018 · 5 comments
Closed

Sidebar: "duration" prop does not appear to do anything #3328

caguthrie opened this issue Dec 7, 2018 · 5 comments

Comments

@caguthrie
Copy link

caguthrie commented Dec 7, 2018

Bug Report

Steps

  1. Visit https://react.semantic-ui.com/modules/sidebar/#types-sidebar
  2. Add the prop duration={5000} in the <Sidebar/> component of the first example on the page
  3. Open the sidebar in that example

Expected Result

The Sidebar animation is slower

Actual Result

Nothing is changed

Version

0.83.0

It doesn't look like this prop works with any <Sidebar/> configuration unless I'm not understanding how duration is supposed to work.

@welcome
Copy link

welcome bot commented Dec 7, 2018

👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you've completed all the fields in the issue template so we can best help.

We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

@layershifter layershifter changed the title duration prop on Sidebar component does not appear to do anything Sidebar: "duration" prop does not appear to do anything Dec 10, 2018
@layershifter
Copy link
Member

I will check this issue tomorrow, it seems that it does not work in SUI core, too 😭

@Fabianopb
Copy link
Member

The duration of the animation is handled by SUI's css in a transition and the current implementation of duration prop in SUIR seems to actually create a delay rather than touching the animation speed: https://github.com/Semantic-Org/Semantic-UI-React/blob/master/src/modules/Sidebar/Sidebar.js#L123

As SUIR doesn't include SUI's styles, handling the duration of the animation here would probably mean to override SUI's rule (through inline style maybe?). Does this make sense? Is that a reasonable approach?

@layershifter
Copy link
Member

@Fabianopb I think that the best way will be just drop duration prop at all in SUIR. Feel free to open PR 👍

@Fabianopb
Copy link
Member

Alright, it could make sense to drop that for now. Just as a sidenote I'm using the Sidebar in one of my projects and I managed to change the duration of the animation with a few simple css overrides.

I can start working on this issue soon @layershifter!

layershifter pushed a commit that referenced this issue Dec 17, 2018
* fix(Sidebar): Drop duration prop off of the component (#3328).

* fix(Sidebar): Access static variable correctly (#3328).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants