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

refactor: modify nonstandard component's name #1910

Merged
merged 1 commit into from
Apr 14, 2022

Conversation

nnmax
Copy link
Contributor

@nnmax nnmax commented Mar 15, 2022

BREAKING CHANGE:

取消从 src/index.ts 文件导出的子组件

import { AvatarGroup } from '@gio-design/components'; 的用法需要更换为 import { Avatar } from '@gio-design/components'; const { Group: AvatarGroup } = Avatar;

    1. AvatarGroup
    2. CheckboxGroup
    3. RadioGroup
    4. Tab
    5. Step
    6. Text
    7. Title
    8. InputButton
    9. InputNumber
    10. Password
    11. TextArea
    12. IconButton

src/popconfig 文件夹更名为 src/pop-confirm

如果有引入了该文件夹下的模块,请更改为 import { PopConfirmProps } from '@gio-design/components/es/pop-confirm'

Toggles 组件更名为 Toggle

SwitchGroupProps 类型更名为 SwitchProps

一些组件的 props 更名

Collapse:

interface CollapseProps {
...
-  destoryOnHide
+  destroyOnHide
}

Popover:

interface PopoverProps {
...
-  distoryOnHide
+  destroyOnHide
}

CascaderOptions: childrens -> items (传给 Cascader 的 options 数组中,之前的 childrens 字段更换为了 items)

interface CascaderItemProps extends BaseItemProps {
...
-  childrens?: CascaderItemProps[];
+  items?: CascaderItemProps[];
}

一些组件的 interface 文件更名

Cascader & List & ListPicker

- interfance.ts
+ interface.ts

@vercel
Copy link

vercel bot commented Mar 15, 2022

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/growingio/gio-design/4DygKtWbxAckTHVoqhWAqbMA5eEp
✅ Preview: https://gio-design-git-replace-component-name-growingio.vercel.app

BREAKING CHANGE:
  #### 取消从 `src/index.ts` 文件导出的子组件

  `import { AvatarGroup } from '@gio-design/components';` 的用法需要更换为 `import { Avatar } from '@gio-design/components'; const { Group: AvatarGroup } = Avatar;`

    1. AvatarGroup
    2. CheckboxGroup
    3. RadioGroup
    4. Tab
    5. Step
    6. Text
    7. Title
    8. InputButton
    9. InputNumber
    10. Password
    11. TextArea
    12. IconButton

  #### src/popconfig 文件夹更名为 src/pop-confirm

  如果有引入了该文件夹下的模块,请更改为 `import { PopConfirmProps } from '@gio-design/components/es/pop-confirm'`

  #### Toggles 组件更名为 Toggle

  #### SwitchGroupProps 类型更名为 SwitchProps

  #### 一些组件的 props 更名
    1. Collapse:
      ```diff
        interface CollapseProps {
          ...
          - destoryOnHide
          + destroyOnHide
        }
      ```
    2. Popover:
       ```diff
        interface PopoverProps {
          ...
          - distoryOnHide
          + destroyOnHide
        }
      ```
    3. CascaderOptions: `childrens` -> `items` (传给 Cascader 的 options 数组中,之前的 `childrens` 字段更换为了 `items`)
      ```diff
          interface CascaderItemProps extends BaseItemProps {
            ...
          - childrens?: CascaderItemProps[];
          + items?: CascaderItemProps[];
          }
      ```

  #### 一些组件的 interface 文件更名
    1. Cascader: interfance.ts -> interface.ts
    1. List: interfance.ts -> interface.ts
    1. ListPicker: interfance.ts -> interface.ts
@sonarcloud
Copy link

sonarcloud bot commented Apr 14, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 13 Code Smells

0.1% 0.1% Coverage
2.8% 2.8% Duplication

@gavin-hao gavin-hao merged commit 0762d21 into master Apr 14, 2022
@gavin-hao gavin-hao deleted the replace-component-name branch April 14, 2022 03:27
growingio-bot pushed a commit that referenced this pull request Apr 20, 2022
# [23.0.0](v22.15.2...v23.0.0) (2022-04-20)

### Bug Fixes

* **filter-picker:** 修复列表型操作符为等于的问题 ([#1970](#1970)) ([bff1ca3](bff1ca3))

### Code Refactoring

* **legacy:** delete components in the legacy folder ([#1828](#1828)) ([44c18c9](44c18c9))
* refactor: modify nonstandard component's name ([#1910](#1910)) ([0762d21](0762d21))

### BREAKING CHANGES

*   #### 取消从 `src/index.ts` 文件导出的子组件

  `import { AvatarGroup } from '@gio-design/components';` 的用法需要更换为 `import { Avatar } from '@gio-design/components'; const { Group: AvatarGroup } = Avatar;`

    1. AvatarGroup
    2. CheckboxGroup
    3. RadioGroup
    4. Tab
    5. Step
    6. Text
    7. Title
    8. InputButton
    9. InputNumber
    10. Password
    11. TextArea
    12. IconButton

  #### src/popconfig 文件夹更名为 src/pop-confirm

  如果有引入了该文件夹下的模块,请更改为 `import { PopConfirmProps } from '@gio-design/components/es/pop-confirm'`

  #### Toggles 组件更名为 Toggle

  #### SwitchGroupProps 类型更名为 SwitchProps

  #### 一些组件的 props 更名
    1. Collapse:
      ```diff
        interface CollapseProps {
          ...
          - destoryOnHide
          + destroyOnHide
        }
      ```
    2. Popover:
       ```diff
        interface PopoverProps {
          ...
          - distoryOnHide
          + destroyOnHide
        }
      ```
    3. CascaderOptions: `childrens` -> `items` (传给 Cascader 的 options 数组中,之前的 `childrens` 字段更换为了 `items`)
      ```diff
          interface CascaderItemProps extends BaseItemProps {
            ...
          - childrens?: CascaderItemProps[];
          + items?: CascaderItemProps[];
          }
      ```

  #### 一些组件的 interface 文件更名
    1. Cascader: interfance.ts -> interface.ts
    1. List: interfance.ts -> interface.ts
    1. ListPicker: interfance.ts -> interface.ts

Co-authored-by: maxin <maxin@growingio.com>
* **legacy:** 删除所有 src/legacy 文件夹下的组件(除了 FilterPicker 之外)

Co-authored-by: maxin <maxin@growingio.com>
@growingio-bot
Copy link
Collaborator

🎉 This PR is included in version 23.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants