Skip to content

Fixes #29964 - Add memory allocation react component - #7794

Merged
amirfefer merged 1 commit into
theforeman:developfrom
yifatmakias:29964
Oct 23, 2020
Merged

amirfefer merged 1 commit into
theforeman:developfrom
yifatmakias:29964

Conversation

@yifatmakias

Copy link
Copy Markdown
Contributor

In order to eventually replace the jquery-ui-spinner, there is a need to add a component for the memory allocation input in a form.
This issue is for the addition of the component.

There are still some issues regarding this PR that should be dealt with.

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 missing end-of-source newline no-missing-end-of-source-newline

@theforeman-bot

Copy link
Copy Markdown
Member

Issues: #29964

Comment thread package.json Outdated

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 do not see it being used anywhere...

@xprazak2 xprazak2 Jul 2, 2020 •

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.

nit: maybe useState(MBFormat) since it is defined a couple of lines above?

@xprazak2

xprazak2 commented Jul 2, 2020

Copy link
Copy Markdown
Contributor

Nice, seems to work as expected.

@yifatmakias yifatmakias closed this Jul 2, 2020
@yifatmakias yifatmakias reopened this Jul 2, 2020
@yifatmakias
yifatmakias force-pushed the 29964 branch 4 times, most recently from 99abf7d to 01106e6 Compare July 16, 2020 07:53
@yifatmakias

Copy link
Copy Markdown
Contributor Author

[test foreman]

1 similar comment
@yifatmakias

Copy link
Copy Markdown
Contributor Author

[test foreman]

@yifatmakias

Copy link
Copy Markdown
Contributor Author

[test foreman]

Comment thread package.json Outdated
"emotion-theming": "^10.0.27",
"intl": "~1.2.5",
"jed": "^1.1.1",
"rc-input-number": "^5.1.0",

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.

Looks like they just released v6 a few days ago

@theforeman-bot

Copy link
Copy Markdown
Member

@yifatmakias, this pull request is currently not mergeable. Please rebase against the develop branch and push again.

If you have a remote called 'upstream' that points to this repository, you can do this by running:

    $ git pull --rebase upstream develop

This message was auto-generated by Foreman's prprocessor

@yifatmakias yifatmakias changed the title Fixes #29964 - Add memory allocation react component - WIP Fixes #29964 - Add memory allocation react component Aug 3, 2020
@yifatmakias

Copy link
Copy Markdown
Contributor Author

[test katello]

1 similar comment
@yifatmakias

Copy link
Copy Markdown
Contributor Author

[test katello]

@yifatmakias
yifatmakias requested a review from amirfefer October 13, 2020 08:17
sharvit
sharvit previously approved these changes Oct 20, 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 👍

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.

Looks like this snap is the same as the default props snap. This one should have an error message

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.

I checked the error and warning states in a different way. Let me know if it looks ok now.

@sharvit

sharvit commented Oct 20, 2020

Copy link
Copy Markdown
Contributor

@amirfefer did @yifatmakias addressed all your comments?

@yifatmakias

Copy link
Copy Markdown
Contributor Author

[test foreman]

@MariaAga MariaAga 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.

Looks good! Can you rebase and add resize and 4xl to the list of approved words in .eslintrc?

foreman/.eslintrc

Lines 13 to 14 in 6ed930a

"skipWords": [
"2xl",

@yifatmakias

Copy link
Copy Markdown
Contributor Author

@MariaAga I rebased and added to .eslintrc file. let me know if it is ok :)

MariaAga
MariaAga previously approved these changes Oct 22, 2020

@MariaAga MariaAga 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.

Awesome!

@amirfefer amirfefer 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.

@yifatmakias Looks and works great 👍
just a few small issues

@amirfefer amirfefer Oct 22, 2020 •

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.

nit: An inequation between a number with a null gives an odd result i.e 5 > null returns true, you can find an interesting explanation here, therefore changing the default props values (for numbers) to undefined instead of null would be better.

5 > null // true, that's why we need maxValue != null 
5 < null // false 
5 > undefined // false, here we don't need the maxValue != null 
5 < undefined // false

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.

validationState looks redundant here, it isn't being used in this effect anyway

@amirfefer amirfefer 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.

Thanks, @yifatmakias 👍 awesome feature
tested and works as expected

@amirfefer
amirfefer merged commit 3629fba into theforeman:develop Oct 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants