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

Replace cloud tenant form with React component #4895

Merged

Conversation

Hyperkid123
Copy link
Contributor

@Hyperkid123 Hyperkid123 commented Nov 8, 2018

Replaces angular form with React component.

form is at: Compute -> Clouds -> Tenants -> Create/Edit

Changes

  • Added required error messages
  • Replaced JS maxLength validation with HTML5 (can't write more 128 characters into name input). Before there was some NG validator that did not even show error if there was more than 128 characters.
  • Using data-driven-forms

Before

screenshot from 2018-11-26 13-17-08

After

screenshot from 2018-11-26 13-26-36

TO DO

  • tests
  • remove dead code

@Hyperkid123
Copy link
Contributor Author

@miq-bot add_label wip
@miq-bot add_label react
@miq-bot add_label refactoring

@Hyperkid123 Hyperkid123 force-pushed the replace-cloud-tenant-form branch 2 times, most recently from 6f7b596 to 9fd779f Compare November 9, 2018 08:16
@Hyperkid123 Hyperkid123 changed the title [WIP] Replace cloud tenant form with React component Replace cloud tenant form with React component Nov 9, 2018
@miq-bot miq-bot removed the wip label Nov 9, 2018
Copy link
Contributor

@PanSpagetka PanSpagetka left a comment

Choose a reason for hiding this comment

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

Works same as in master, code looks good 👍 failing tests are probably unrelated.

@Hyperkid123
Copy link
Contributor Author

Hyperkid123 commented Nov 9, 2018

failing travis is related to this change: ManageIQ/manageiq-gems-pending#407

@miq-bot
Copy link
Member

miq-bot commented Nov 12, 2018

This pull request is not mergeable. Please rebase and repush.

@Hyperkid123
Copy link
Contributor Author

@miq-bot remove_label unmergeable

@miq-bot
Copy link
Member

miq-bot commented Nov 14, 2018

This pull request is not mergeable. Please rebase and repush.

@Hyperkid123
Copy link
Contributor Author

@miq-bot remove_label unmergeable

@Hyperkid123 Hyperkid123 force-pushed the replace-cloud-tenant-form branch 2 times, most recently from 2099d13 to c904312 Compare November 26, 2018 12:09
@Hyperkid123
Copy link
Contributor Author

@miq-bot assign @martinpovolny

@hstastna
Copy link

hstastna commented Nov 28, 2018

It works for me fine, except that it allows me to create a tenant with a name " " (space). Is this ok? I am not sure. And.. in Firefox, it looks little bit weird (but it works):
add_tenant
In Chromium, it looks as expected 👍

@Hyperkid123
Copy link
Contributor Author

Firefox, it looks little bit weird (but it works):

Nice catch gotta resolve that

It works for me fine, except that it allows me to create a tenant with a name " " (space).

That depends on how it works on master

@Hyperkid123
Copy link
Contributor Author

OK got a fix for the styles, just waiting for merge: https://github.com/data-driven-forms/pf3-component-mapper/pull/4

@miq-bot
Copy link
Member

miq-bot commented Nov 29, 2018

Checked commit Hyperkid123@349ac43 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0
0 files checked, 0 offenses detected
Everything looks fine. ⭐

@Hyperkid123
Copy link
Contributor Author

Ok after fix the select looks like it should:

screenshot from 2018-11-29 16-13-02

@martinpovolny martinpovolny added this to the Sprint 100 Ending Dec 3, 2018 milestone Nov 29, 2018
@martinpovolny martinpovolny merged commit 20d200d into ManageIQ:master Nov 29, 2018
@Hyperkid123 Hyperkid123 deleted the replace-cloud-tenant-form branch November 29, 2018 20:51
import { mount, shallow } from 'enzyme';
import toJson from 'enzyme-to-json';
import fetchMock from 'fetch-mock';
import CloudTennantForm from '../../components/cloud-tenant-form/cloud-tenant-form';
Copy link
Contributor

@himdel himdel Nov 30, 2018

Choose a reason for hiding this comment

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

typo Tennant != Tenant

EDIT: fixed in #5019


const MiqFormRenderer = props => (
<FormRender
disableSubmit
Copy link
Contributor

@himdel himdel Nov 30, 2018

Choose a reason for hiding this comment

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

what's the purpose of always disabling submit?

Looks like submit is indeed always disabled. Doesn't sound like something we want :)

(EDIT: hopefully fixed in #5018)

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.

6 participants