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

Angular to react conversion Reconfigure form #8710

Merged
merged 1 commit into from
Jul 7, 2023

Conversation

akhilkr128
Copy link
Member

@akhilkr128 akhilkr128 commented Mar 15, 2023

Before

Screenshot 2023-03-13 at 2 49 03 PM

After

Screenshot 2023-05-01 at 10 49 55 PM

reconfigure-form.mov

Links

Issue - #7603

Steps for Testing/QA

Compute -> Infrastructure -> Virtual Machines -> Configuration -> Reconfigure VM

@miq-bot add_label enhancement

@akhilkr128 akhilkr128 requested a review from a team as a code owner March 15, 2023 16:46
@akhilkr128 akhilkr128 force-pushed the reconfigure_form branch 2 times, most recently from 023b7af to a1dcb2a Compare May 1, 2023 17:18
@akhilkr128 akhilkr128 changed the title [WIP] Angular to react conversion Reconfigure form Angular to react conversion Reconfigure form May 1, 2023
@miq-bot miq-bot removed the wip label May 1, 2023
@akhilkr128
Copy link
Member Author

akhilkr128 commented May 2, 2023

All form snapshots were updated because of the <MiqFormRenderer /> component changes.

@DavidResende0 DavidResende0 mentioned this pull request May 3, 2023
10 tasks
@akhilkr128 akhilkr128 force-pushed the reconfigure_form branch 3 times, most recently from aad8e40 to 4d595d8 Compare May 9, 2023 08:20
@jeffibm
Copy link
Member

jeffibm commented May 9, 2023

few minor suggestions

  1. could you add a margin-bottom:10px to both buttons - Add Disk and Add Network
  2. could you remove extra spaces for switches inside the data tables? eg - Delete Backing.
  3. could you add some additional style for the Edit and Delete buttons for the network adapters list to align right? The same applies for Resize and Delete for the disk list
  4. should we remove the buttons in the list and use links instead? looks like there are too many buttons on the page..

image

@jeffibm jeffibm self-assigned this May 9, 2023
@jeffibm
Copy link
Member

jeffibm commented May 10, 2023

For the edit, resize and action headers styling

  1. in app/stylesheet/miq-data-table.scss, put this under .miq-data-table {
.header-button {
      width: 100px;
    }
  1. in app/javascript/components/miq-data-table/index.jsx, add className to <TableHeader in const renderHeaders
    className={classNames('miq-data-table-header', (header.isButton ? 'header-button' : ''))}

  2. add isButton:true to headers with buttons for the 3 tables, like
    { key: 'edit', header: __('Edit'), isButton: true }

Copy link
Member

@jeffibm jeffibm left a comment

Choose a reason for hiding this comment

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

Looks good to me. Great work @akhilkr128 .
However, would like to have an extra pair of eyes to have a quick test on this..
cc @DavidResende0

@akhilkr128 akhilkr128 force-pushed the reconfigure_form branch 2 times, most recently from 50b86ab to 4e398ff Compare June 8, 2023 13:14
Copy link
Member

@DavidResende0 DavidResende0 left a comment

Choose a reason for hiding this comment

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

From a functional standpoint everything looks good, however I think there's a couple of items we should address before merging:

  • The main reconfigure form is missing a reset button
  • Both the memory size and type inputs can be moved to the same line as the toggle
    image
  • Same thing here
    image
  • I think the buttons in the data tables could be smaller. This is more of a project wide enhancement that could be done in a separate pr.
  • The way the delete buttons in the table are hidden off screen is going to confuse people. I'm not 100% what the best way to address this is but something should be done before we merge.
    image
    image

@akhilkr128 akhilkr128 force-pushed the reconfigure_form branch 2 times, most recently from f3d1347 to 26e47c3 Compare June 28, 2023 12:33
@akhilkr128
Copy link
Member Author

@DavidResende0

The main reconfigure form is missing a reset button

  • added

Both the memory size and type inputs can be moved to the same line as the toggle

  • I will address this layout change in a different PR.

I think the buttons in the data tables could be smaller. This is more of a project wide enhancement that could be done in a separate pr.

  • Changed the button styles to link.

The way the delete buttons in the table are hidden off screen is going to confuse people. I'm not 100% what the best way to address this is but something should be done before we merge.

  • Fixed the issue.
Screenshot 2023-06-28 at 5 39 27 PM Screenshot 2023-06-28 at 5 58 49 PM

cc: @jeffibm

Copy link
Member

@DavidResende0 DavidResende0 left a comment

Choose a reason for hiding this comment

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

LGTM, only thing I'll mention is that right now in the disks table, the toggle is not lined up with the rest of the row. This is fine to address in the followup pr you mentioned though.
image

@DavidResende0
Copy link
Member

@Fryguy is the failing security check a concern?

@jeffibm
Copy link
Member

jeffibm commented Jul 3, 2023

@akhilkr128 , could you rebase this once again.

Reconfigure form angular to react conversion
@miq-bot
Copy link
Member

miq-bot commented Jul 5, 2023

Checked commit akhilkr128@9268a85 with ruby 2.6.10, rubocop 1.28.2, haml-lint 0.35.0, and yamllint
4 files checked, 0 offenses detected
Everything looks fine. 🏆

@Fryguy
Copy link
Member

Fryguy commented Jul 6, 2023

is the failing security check a concern?

This PR doesn't seem to have introduced this change, so I wouldn't worry about it. It would be different if this PR introduced the bad package.

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.

5 participants