Skip to content

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

Merged
sharvit merged 1 commit into
theforeman:developfrom
yifatmakias:30638
Sep 1, 2020
Merged

sharvit merged 1 commit into
theforeman:developfrom
yifatmakias:30638

Conversation

@yifatmakias

Copy link
Copy Markdown
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
Copy Markdown
Member

Issues: #30638

@yifatmakias

Copy link
Copy Markdown
Contributor Author

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

@yifatmakias

Copy link
Copy Markdown
Contributor Author

[test foreman]

@sharvit sharvit left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Comment thread webpack/assets/javascripts/react_app/components/common/forms/NumericInput.scss Outdated
Comment thread package.json Outdated
@yifatmakias

Copy link
Copy Markdown
Contributor Author

[test foreman]

@yifatmakias

Copy link
Copy Markdown
Contributor Author

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

@coveralls

coveralls commented Aug 17, 2020 •

Copy link
Copy Markdown

Coverage Status

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

@yifatmakias

Copy link
Copy Markdown
Contributor Author

[test katello]

@sharvit sharvit left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks @yifatmakias

Comment thread package.json Outdated

@sharvit sharvit left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks @yifatmakias

Copy link
Copy Markdown
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?

Copy link
Copy Markdown
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.

Copy link
Copy Markdown
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;
}

Copy link
Copy Markdown

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

@sharvit sharvit left a comment

Copy link
Copy Markdown
Contributor

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

sharvit commented Aug 30, 2020

Copy link
Copy Markdown
Contributor

Can we get ack from packaging please?

ekohl
ekohl previously approved these changes Aug 31, 2020

@ekohl ekohl left a comment

Copy link
Copy Markdown
Member

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.

Comment thread .stylelintrc Outdated
ekohl
ekohl previously approved these changes Aug 31, 2020

@ekohl ekohl left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Still a packaging ack.

Comment thread .stylelintrc Outdated

Copy link
Copy Markdown
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
Copy Markdown
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! :)

@ekohl ekohl left a comment

Copy link
Copy Markdown
Member

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

ekohl commented Aug 31, 2020

Copy link
Copy Markdown
Member

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

@sharvit sharvit left a comment

Copy link
Copy Markdown
Contributor

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