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

Fixes #30638 - replace react-numeric-input with rc-number-input #7896

Merged
merged 1 commit into from
Sep 1, 2020

Conversation

yifatmakias
Copy link
Contributor

The rc-input-number is a much simple library and has fewer bugs therefore it should replace the react-numeric-input in the NumericInput react component.

@theforeman-bot
Copy link
Member

Issues: #30638

@yifatmakias
Copy link
Contributor Author

This PR is a blocker PR to:
#7794
#7865

@yifatmakias
Copy link
Contributor Author

[test foreman]

Copy link
Contributor

@sharvit sharvit left a comment

Choose a reason for hiding this comment

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

package.json Outdated Show resolved Hide resolved
@yifatmakias
Copy link
Contributor Author

[test foreman]

@yifatmakias
Copy link
Contributor Author

This PR is blocked by another PR:
theforeman/foreman-js#198

@coveralls
Copy link

coveralls commented Aug 17, 2020

Coverage Status

Coverage remained the same at 73.795% when pulling ff79968 on yifatmakias:30638 into 85befdd on theforeman:develop.

@yifatmakias
Copy link
Contributor Author

[test katello]

Copy link
Contributor

@sharvit sharvit left a comment

Choose a reason for hiding this comment

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

Thanks @yifatmakias

package.json Outdated Show resolved Hide resolved
Copy link
Contributor

@sharvit sharvit left a comment

Choose a reason for hiding this comment

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

Thanks @yifatmakias

.foreman-numeric-input-input-wrap {
width: 100%;

input {
Copy link
Contributor

Choose a reason for hiding this comment

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

We could drop the input styles if we could set the input className to form-control.
Unfortunately, the rc-input-number doesn't support custom class names on the input field.

Sent a PR to rc-input-number so they can have this feature:
react-component/input-number#262

Can you please add a comment in the code with a reminder to drop the input styles once merged?

}

&:hover {
border-color: $input-border-hover;
Copy link
Contributor

Choose a reason for hiding this comment

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

When I set the disabled prop to true, the hover effect still exists and it looks odd.

line-height: normal;

&:focus {
outline: $input-border-focus auto 0.5px;
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't see the glowing effect that we usually have when focused.
try:

@import "~@theforeman/vendor/scss/mixins";

&:focus {
  @include form-control-outline;
}

line-height: normal;

&:focus {
@include form-control-outline;

Choose a reason for hiding this comment

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

Unexpected unknown at-rule "@include" at-rule-no-unknown

sharvit
sharvit previously approved these changes Aug 30, 2020
Copy link
Contributor

@sharvit sharvit left a comment

Choose a reason for hiding this comment

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

Thanks @yifatmakias, looks good and works as expected 👍

@sharvit sharvit added Waiting on Packaging PRs that shouldn't be merged until packaging side is merged and removed Needs testing labels Aug 30, 2020
@sharvit
Copy link
Contributor

sharvit commented Aug 30, 2020

Can we get ack from packaging please?

ekohl
ekohl previously approved these changes Aug 31, 2020
Copy link
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

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

Packaging ACK, didn't really look at the actual JS code.

.stylelintrc Outdated Show resolved Hide resolved
ekohl
ekohl previously approved these changes Aug 31, 2020
Copy link
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

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

Still a packaging ack.

.stylelintrc Outdated
@@ -3,7 +3,8 @@
"stylelint-config-standard",
],
"rules": {
"selector-type-no-unknown": null
"selector-type-no-unknown": null,
"at-rule-no-unknown": null
Copy link
Member

Choose a reason for hiding this comment

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

I'd be consistent and also add it here. You may also want to consider sorting the list alphabetically. Those are just some practices I started to use because it's easier to deal with when things get longer and you're searching for something.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ekohl Added another comma and also sorted alphabetically. Thanks for the review! :)

Copy link
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

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

LGTM. The tests are still running now, but otherwise I think it can be merged.

@ekohl
Copy link
Member

ekohl commented Aug 31, 2020

Oh, they finished. @sharvit I'm not sure you gave an ACK or not so leaving the final honors of merging to you.

Copy link
Contributor

@sharvit sharvit left a comment

Choose a reason for hiding this comment

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

Thanks @yifatmakias, looks good and works as expected 👍

Thanks @ekohl, merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
UI Waiting on Packaging PRs that shouldn't be merged until packaging side is merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants