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

Enhance slider component #26

Merged
merged 7 commits into from
Apr 20, 2017
Merged

Enhance slider component #26

merged 7 commits into from
Apr 20, 2017

Conversation

zalmoxisus
Copy link
Contributor

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:

  • ability to hide Reset button (which we don't need in the extension as it's already present in the UI).
  • disable buttons when moving back or forward is not available.
  • Instead of action index, we show action id along with the action type.
  • optimize react components updates.

Here's how the default theme looks:
hzdkp38ste

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).

@jhen0409
Copy link
Collaborator

The speed buttons seems not work as expected, otherwise it looks amazing! :D

onClick: PropTypes.func
}

iconStyle(theme) {
shouldComponentUpdate(nextProps) {
return this.props.type !== nextProps.type || this.props.disabled !== nextProps.disabled;
Copy link
Collaborator

@jhen0409 jhen0409 Mar 16, 2017

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.

Copy link
Contributor Author

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.

Copy link
Collaborator

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. 👍

<Divider theme={theme} />
<SegmentedControl
theme={theme}
values={['live', '1x', '2x']}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

live -> Live?

Copy link
Contributor Author

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 👍

@zalmoxisus
Copy link
Contributor Author

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 remotedev-slider I made it opposite. Also I misinterpreted the live behaviour in remotedev-slider.

@jhen0409
Copy link
Collaborator

jhen0409 commented Apr 21, 2017

I just released v2.0.0-0.

Closes #18.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants