Skip to content

Conversation

@liu-samuel
Copy link

@liu-samuel liu-samuel commented May 15, 2024

Fixes: #6929

Automation / Embedded automate / Customization / Provisioning Dialogs

Converts the dialog form from a Ruby haml file to a React form.

Before
Screenshot 2024-06-05 at 10 45 17 AM
Screenshot 2024-06-05 at 10 47 29 AM

After
Screenshot 2024-06-05 at 10 43 43 AM
Screenshot 2024-06-05 at 10 44 24 AM

@liu-samuel liu-samuel requested a review from a team as a code owner May 15, 2024 17:44
@miq-bot miq-bot added the wip label May 15, 2024
@jeffibm jeffibm self-requested a review May 16, 2024 18:58
@jeffibm
Copy link
Member

jeffibm commented May 16, 2024

Hey @liu-samuel ,

we would want to keep the PR's as simple as possible.

So, If you can finish the summary conversion in one PR, so that it's easy to keep track of it at #8655

and, then go for the form conversions in another PR.

Also, I know it's a WIP, but try to clean up the codes as you make commits.

@liu-samuel
Copy link
Author

liu-samuel commented May 16, 2024

Hey @liu-samuel ,

we would want to keep the PR's as simple as possible.

So, If you can finish the summary conversion in one PR, so that it's easy to keep track of it at #8655

and, then go for the form conversions in another PR.

Also, I know it's a WIP, but try to clean up the codes as you make commits.

Sounds good, I will do that

@liu-samuel liu-samuel force-pushed the provision-dialog-conversion branch 2 times, most recently from 1029adc to df23bdd Compare May 23, 2024 15:32
@liu-samuel liu-samuel force-pushed the provision-dialog-conversion branch from 5ab3ec5 to bab588b Compare June 5, 2024 13:43
@liu-samuel liu-samuel changed the title [WIP] Provision Dialog Ruby to React Conversion Provision Dialog Ruby to React Conversion Jun 5, 2024
@miq-bot miq-bot removed the wip label Jun 5, 2024
@jeffibm jeffibm changed the title Provision Dialog Ruby to React Conversion Provision Dialog Form conversion from HAML to React Jun 5, 2024
@jeffibm
Copy link
Member

jeffibm commented Jun 5, 2024

Hey @liu-samuel , could you please update the description too. Also use the form's before and after screenshots.

@jeffibm
Copy link
Member

jeffibm commented Jun 6, 2024

Hey @liu-samuel , Are there any dependent PRs or anything else needed to run this?

I was just trying to add a new dialog and got 404 Error. Could you please check-
image

image

ActionController::RoutingError (No route matches [POST] "/miq_ae_customization/old_dialogs_update_react"):

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.

Hey @liu-samuel , Great work on the first PR. I just put in for review comments for future reference.

The idea behind UI PR's is to reduce the number of line counts and make it readable. For smaller PR's try to finish the components between 150-200 lines if possible, else, move a few lines to a different component.

Also, there are few string translations to be done as well here.

Could you please test with the suggested changes and also have a look at the error during form submit.

@liu-samuel
Copy link
Author

liu-samuel commented Jun 6, 2024

Hey @liu-samuel , Great work on the first PR. I just put in for review comments for future reference.

The idea behind UI PR's is to reduce the number of line counts and make it readable. For smaller PR's try to finish the components between 150-200 lines if possible, else, move a few lines to a different component.

Also, there are few string translations to be done as well here.

Could you please test with the suggested changes and also have a look at the error during form submit.

Thanks for the review! I'll address all the comments you have. As for the 404 error, I tried again but it works fine for me. It seems like it might be a routes issue. Maybe restarting the server or running bin/update will fix it? I'm not exactly sure.

Also for the string translation, which strings are you referring to?

@liu-samuel liu-samuel force-pushed the provision-dialog-conversion branch 4 times, most recently from e6b7cd0 to 33aa381 Compare June 10, 2024 16:56
@jeffbonson
Copy link
Contributor

as

something like this - {__('Submit')}

@liu-samuel liu-samuel force-pushed the provision-dialog-conversion branch from 33aa381 to 5a6971c Compare June 21, 2024 17:51
@GilbertCherrie GilbertCherrie self-requested a review July 18, 2024 17:00
@liu-samuel liu-samuel force-pushed the provision-dialog-conversion branch from 5a6971c to 9d26c33 Compare July 19, 2024 16:12
@liu-samuel liu-samuel force-pushed the provision-dialog-conversion branch from a92d438 to 67fd29f Compare July 22, 2024 17:17
@liu-samuel liu-samuel force-pushed the provision-dialog-conversion branch from f75485b to 5947d4f Compare July 25, 2024 16:21
@miq-bot
Copy link
Member

miq-bot commented Jul 25, 2024

Checked commit liu-samuel@5947d4f with ruby 3.1.5, rubocop 1.56.3, haml-lint 0.51.0, and yamllint
4 files checked, 10 offenses detected

app/controllers/miq_ae_customization_controller/old_dialogs.rb

app/views/miq_ae_customization/_old_dialogs_details.html.haml

  • ⚠️ - Line 10 - Layout/ArgumentAlignment: Align the arguments of a method call if they span more than one line.
  • ⚠️ - Line 5 - Avoid using instance variables in partials views
  • ⚠️ - Line 5 - Line is too long. [95/80]
  • ⚠️ - Line 8 - Avoid using instance variables in partials views
  • ⚠️ - Line 9 - Avoid using instance variables in partials views

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.

Form conversion: Automation/Automate/Customization Provisioning Add/Edit new dialog

5 participants