Skip to content

feat(schematics): address form schematic #11425

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

Merged
merged 3 commits into from
Jun 12, 2018
Merged

Conversation

amcdnl
Copy link
Contributor

@amcdnl amcdnl commented May 20, 2018

A address form schematic

Demo: https://stackblitz.com/edit/shipping-form

@amcdnl amcdnl self-assigned this May 20, 2018
@amcdnl amcdnl requested a review from jelbourn May 20, 2018 16:57
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label May 20, 2018
margin: 20px auto;
}

mat-radio-button {
Copy link
Member

Choose a reason for hiding this comment

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

Could this be a css class instead of styling the element directly?

@@ -30,6 +30,13 @@
"factory": "./nav/index",
"schema": "./nav/schema.json",
"aliases": [ "material-nav" ]
},
// Creates a address form component
"form": {
Copy link
Member

Choose a reason for hiding this comment

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

Should this be something like address-form in case we want to add different forms later?

<mat-card-title>Shipping Information</mat-card-title>
</mat-card-header>
<mat-card-content>
<table cellspacing="0" class="full-width">
Copy link
Member

Choose a reason for hiding this comment

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

This shouldn't be a table because it's not showing tabular data.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The other examples used a table so I just carried that over here.

Copy link
Member

Choose a reason for hiding this comment

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

Which other examples? User-facing ones?

hasUnitNumber = false;

states = [
{
Copy link
Member

Choose a reason for hiding this comment

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

Collapse entries like

{name: 'Alaska', abbreviation: 'AK'},

@amcdnl
Copy link
Contributor Author

amcdnl commented Jun 10, 2018

@jelbourn - Addressed feedback.

Copy link
Member

@jelbourn jelbourn left a comment

Choose a reason for hiding this comment

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

LGTM

@jelbourn jelbourn added pr: lgtm action: merge The PR is ready for merge by the caretaker target: minor This PR is targeted for the next minor release labels Jun 11, 2018
@ngbot
Copy link

ngbot bot commented Jun 11, 2018

I see that you just added the pr: merge ready label, but the following checks are still failing:
    failure conflicts with base branch "master"

If you want your PR to be merged, it has to pass all the CI checks.

If you can't get the PR to a green state due to flakes or broken master, please try rebasing to master and/or restarting the CI job. If that fails and you believe that the issue is not due to your change, please contact the caretaker and ask for help.

<mat-form-field class="full-width">
<input matInput placeholder="First name" formControlName="firstName">
<mat-error *ngIf="addressForm.controls['firstName'].hasError('required')">
First name is <strong>required</strong>
Copy link
Contributor

@rafaelss95 rafaelss95 Jun 11, 2018

Choose a reason for hiding this comment

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

nit: you can use addressForm.get('firstName').hasError('required') or even better, IMHO: addressForm.hasError('required', ['firstName']).

@jelbourn jelbourn added pr: needs rebase and removed action: merge The PR is ready for merge by the caretaker labels Jun 11, 2018
@amcdnl
Copy link
Contributor Author

amcdnl commented Jun 12, 2018

@jelbourn - rebased.

@jelbourn jelbourn added action: merge The PR is ready for merge by the caretaker and removed pr: needs rebase labels Jun 12, 2018
@jelbourn jelbourn merged commit 9b80a4c into angular:master Jun 12, 2018
@amcdnl amcdnl deleted the form-schematic branch June 15, 2018 15:29
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement target: minor This PR is targeted for the next minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants