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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge master into feature branch #16257

Closed
wants to merge 28 commits into from

Conversation

Projects
None yet
10 participants
@afc163
Copy link
Member

commented Apr 23, 2019

馃 This is a ...

  • New feature
  • Bug fix
  • Site / document update
  • Component style update
  • TypeScript definition update
  • Refactoring
  • Code style optimization
  • Branch merge
  • Other (about what?)

馃懟 What's the background?

馃挕 Solution

馃摑 Changelog

  • English Changelog:
  • Chinese Changelog (optional):

鈽戯笍 Self Check before Merge

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed

View rendered CHANGELOG.en-US.md
View rendered CHANGELOG.zh-CN.md
View rendered components/input-number/index.en-US.md
View rendered components/select/demo/search.md

yp and others added some commits Apr 15, 2019

fix: Form with forwardRef typescript (#16242)
* update form typescript define with forawardRef

* add ts test
Merge pull request #16251 from atomoo/fix-switch-active-style
fix: remove active style from disabled Switch
Merge pull request #16130 from rinick/master
fix: fix card mode Tabs border style when used with tabPosition="bottom"
Merge pull request #16093 from yp/master
Add Italian localization of Icon, Text and global components
Merge pull request #16172 from afelicioni/patch-1
Updates LocaleProvider italian language package

@pr-triage pr-triage bot added the PR: unreviewed label Apr 23, 2019

@buildsize

This comment has been minimized.

Copy link

commented Apr 23, 2019

File name Previous Size New Size Change
package-lock.json 822.41聽KB 821.43聽KB -1003聽bytes (0%)
@netlify

This comment has been minimized.

Copy link

commented Apr 23, 2019

Deploy preview for ant-design ready!

Built with commit b87ce7f

https://deploy-preview-16257--ant-design.netlify.com

@netlify

This comment has been minimized.

Copy link

commented Apr 23, 2019

Deploy preview for ant-design ready!

Built with commit b3bea96

https://deploy-preview-16257--ant-design.netlify.com

@codecov

This comment has been minimized.

Copy link

commented Apr 23, 2019

Codecov Report

Merging #16257 into feature will increase coverage by 0.03%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff             @@
##           feature   #16257      +/-   ##
===========================================
+ Coverage    95.23%   95.26%   +0.03%     
===========================================
  Files          252      253       +1     
  Lines         6780     6743      -37     
  Branches      1979     1962      -17     
===========================================
- Hits          6457     6424      -33     
+ Misses         322      318       -4     
  Partials         1        1
Impacted Files Coverage 螖
components/form/Form.tsx 88.88% <酶> (酶) 猬嗭笍
components/list/index.tsx 97.53% <100%> (-0.06%) 猬囷笍
components/_util/reactNode.ts 100% <100%> (酶)
components/list/Item.tsx 100% <100%> (酶) 猬嗭笍
components/tree-select/index.tsx 94.44% <0%> (-0.43%) 猬囷笍
components/notification/index.tsx 95.94% <0%> (-0.21%) 猬囷笍
components/upload/UploadList.tsx 96.33% <0%> (-0.15%) 猬囷笍
components/skeleton/Avatar.tsx 100% <0%> (酶) 猬嗭笍
components/drawer/index.tsx 98.68% <0%> (酶) 猬嗭笍
... and 6 more

Continue to review full report at Codecov.

Legend - Click here to learn more
螖 = absolute <relative> (impact), 酶 = not affected, ? = missing data
Powered by Codecov. Last update b0f0509...ef8864e. Read the comment docs.

@afc163 afc163 requested review from yesmeck and ztplz Apr 23, 2019

zombieJ added some commits Apr 24, 2019

fix: List with actions style should be the right (#16239)
* update css

* should not affect vertical style

* update logic

yoyo837 and others added some commits Apr 24, 2019

docs: add naming rules (#16276)
* add naming rules

* one more space
@codecov

This comment has been minimized.

Copy link

commented Apr 24, 2019

Codecov Report

Merging #16257 into feature will increase coverage by 0.08%.
The diff coverage is 98.3%.

Impacted file tree graph

@@             Coverage Diff             @@
##           feature   #16257      +/-   ##
===========================================
+ Coverage    95.23%   95.32%   +0.08%     
===========================================
  Files          252      253       +1     
  Lines         6780     6779       -1     
  Branches      1979     1970       -9     
===========================================
+ Hits          6457     6462       +5     
+ Misses         322      316       -6     
  Partials         1        1
Impacted Files Coverage 螖
components/form/Form.tsx 88.88% <酶> (酶) 猬嗭笍
components/list/index.tsx 97.53% <100%> (-0.06%) 猬囷笍
components/affix/utils.ts 100% <100%> (酶) 猬嗭笍
components/_util/reactNode.ts 100% <100%> (酶)
components/list/Item.tsx 100% <100%> (酶) 猬嗭笍
components/affix/index.tsx 95.32% <97.36%> (+0.2%) 猬嗭笍
components/tree-select/index.tsx 94.44% <0%> (-0.43%) 猬囷笍
components/notification/index.tsx 95.94% <0%> (-0.21%) 猬囷笍
components/upload/UploadList.tsx 96.33% <0%> (-0.15%) 猬囷笍
... and 9 more

Continue to review full report at Codecov.

Legend - Click here to learn more
螖 = absolute <relative> (impact), 酶 = not affected, ? = missing data
Powered by Codecov. Last update b0f0509...b3bea96. Read the comment docs.

zombieJ and others added some commits Apr 24, 2019

fix: Tree checkbox animation not correct (#16272)
* fix: Tree checkbox animation not correct

* fix: Tree checkbox animation not correct

* fix: Tree checkbox animation not correct

* chore: add comment
@zombieJ

This comment has been minimized.

Copy link
Member

commented Apr 24, 2019

conflict

@zombieJ zombieJ closed this Apr 24, 2019

@zombieJ

This comment has been minimized.

Copy link
Member

commented Apr 24, 2019

Will create a new one.

@kkaugust

This comment has been minimized.

Copy link

commented on da9cef9 Apr 26, 2019

"typescript": "^3.4.3"
"antd": "^3.16.5",

import React from 'react';
import { Form, Icon, Input, Button } from 'antd';
import { FormComponentProps } from 'antd/lib/form';

interface V {
  name: string;
}

interface P extends FormComponentProps<V> {
  submitForm: (variables: V) => Promise<void>;
}

class TestForm extends React.Component<P> {
  handleSubmit = (e: React.FormEvent<HTMLFormElement>) => {
    e.preventDefault();
    if (this.props.form)
      this.props.form.validateFields((err, values) => {
        if (!err) {
          this.props.submitForm(values);
        }
      });
  };

  render() {
    const { getFieldDecorator } = this.props.form;
    return (
      <Form onSubmit={this.handleSubmit} className="login-form">
        <Form.Item>
          {getFieldDecorator<V>('name', {
            rules: [
              {
                required: true,
                message: 'Name',
              },
            ],
          })(
            <Input
              prefix={<Icon type="user" style={{ color: 'rgba(0,0,0,.25)' }} />}
              placeholder="Name"
            />
          )}
        </Form.Item>
        <Form.Item className="login-form-no-margin">
          <Button type="primary" htmlType="submit" className="login-form-button">
            袙芯泄褌懈
          </Button>
        </Form.Item>
      </Form>
    );
  }
}

const TestFormHOC = Form.create<P>({ name: 'test_form' })(TestForm);

export default TestFormHOC;

const TestFormHOC = Form.create<P>({ name: 'test_form' })(TestForm);

TestForm type error:

Argument of type 'typeof TestForm' is not assignable to parameter of type 'ComponentType<{}>'.
  Type 'typeof TestForm' is not assignable to type 'ComponentClass<{}, any>'.
    Types of parameters 'props' and 'props' are incompatible.
      Type '{}' is missing the following properties from type 'Readonly<P>': submitForm, form

This comment has been minimized.

Copy link

replied Apr 26, 2019

In compiled interface.d.ts file:

export declare type FormWrappedProps<TOwnProps extends FormComponentProps> = <C extends React.ComponentType>(component: C) => ConnectedComponentClass<C, Omit<TOwnProps, keyof FormComponentProps>>;

If add P type to C extends React.ComponentType like this C extends React.ComponentType<P> then the problem is solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can鈥檛 perform that action at this time.