-
Notifications
You must be signed in to change notification settings - Fork 18
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
Enhance slider component #26
Conversation
The speed buttons seems not work as expected, otherwise it looks amazing! :D |
src/SliderButton.js
Outdated
onClick: PropTypes.func | ||
} | ||
|
||
iconStyle(theme) { | ||
shouldComponentUpdate(nextProps) { | ||
return this.props.type !== nextProps.type || this.props.disabled !== nextProps.disabled; |
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.
It should also check onClick
change because this line.
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.
I missed that part, thanks! Even though it shouldn't be an issue here as we change the label together with this prop, it could be in future. We better use PureComponent
here 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.
I just tried it with the example, it actually didn't updated if I changed speed, so when I change to Live
from 1x
(also use #26 (comment) fix), it still use startReplay
not startRealtimeReplay
.
I agreed for use PureComponent
. 👍
src/SliderMonitor.js
Outdated
<Divider theme={theme} /> | ||
<SegmentedControl | ||
theme={theme} | ||
values={['live', '1x', '2x']} |
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.
live
-> Live
?
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.
Since the buttons are capitilzed, I guess you're right 👍
Hey @jhen0409! Thanks for chiming in! You mean that 2x is faster than 1x? I think @calesce designed it like the car engine speed, the higher the faster. 🙂 Though in |
I just released Closes #18. |
As discussed in #18, we're using
devui
for slider, which aims to provide reusable components for building Redux DevTools monitors and devtools in general. It offers the ability to have themes apart from color schemes, which will be implemented in Redux DevTools Extension 3.0.Apart from that, this PR provides:
Reset
button (which we don't need in the extension as it's already present in the UI).Here's how the default theme looks:

If you find that something can be improved, feel free to send a pr to
devui
.I suggest to release it as
2.0.0-0
(with alpha or beta tag).