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

feat: New Components Result #17244

Merged
merged 16 commits into from
Jun 30, 2019
Merged

feat: New Components Result #17244

merged 16 commits into from
Jun 30, 2019

Conversation

chenshuai2144
Copy link
Contributor

@chenshuai2144 chenshuai2144 commented Jun 22, 2019

First of all, thank you for your contribution! 😄

New feature please send pull request to feature branch, and rest to master branch.
Pull request will be merged after one of collaborators approve.
Please makes sure that these form are filled before submitting your pull request, thank you!

[中文版模板 / Chinese template]

This is a ...

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

What's the background?

  • Add Components Result

API Realization (Optional if not new feature)

<Result
    icon="success"
    title="Successfully Purchased Cloud Server ECS!"
    subTitle="Order number: 2017182818828182881 Cloud server configuration takes 1-5 minutes, please wait."
    extra={[
      <Button type="primary" key="console">Go Console</Button>,
      <Button key="buy">Buy Again</Button>,
    ]}
 />

API

Property Description Type Default
title title string ReactNode -
subTitle subTitle string ReactNode -
icon custom back icon string | ReactNode info
extra operating area ReactNode -

What's the effect? (Optional if not new feature)

  1. Does this PR affect user? Which part will be affected?
    no
  2. What will say in changelog?
    no
  3. Does this PR contains potential break change or other risk?
    add New Components Result

Changelog description (Optional if not new feature)

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

image

image


View rendered components/result/demo/basic.md
View rendered components/result/demo/complex.md
View rendered components/result/demo/customIcon.md
View rendered components/result/demo/exception.md
View rendered components/result/index.en-US.md
View rendered components/result/index.zh-CN.md

@chenshuai2144
Copy link
Contributor Author

为了把预览恢复过来。重新开个 pr。
历史 pr #14196

@codecov
Copy link

codecov bot commented Jun 22, 2019

Codecov Report

Merging #17244 into feature will decrease coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff             @@
##           feature   #17244      +/-   ##
===========================================
- Coverage    96.01%   95.99%   -0.03%     
===========================================
  Files          263      267       +4     
  Lines         7383     7412      +29     
  Branches      2049     2067      +18     
===========================================
+ Hits          7089     7115      +26     
- Misses         292      295       +3     
  Partials         2        2
Impacted Files Coverage Δ
components/index.tsx 100% <ø> (ø) ⬆️
components/result/serverError.tsx 100% <100%> (ø)
components/result/noFound.tsx 100% <100%> (ø)
components/result/unauthorized.tsx 100% <100%> (ø)
components/result/index.tsx 100% <100%> (ø)
components/_util/wave.tsx 85.84% <0%> (-2.84%) ⬇️

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 8eceb04...ab50e1b. Read the comment docs.

components/result/index.tsx Outdated Show resolved Hide resolved
components/result/index.tsx Outdated Show resolved Hide resolved
components/result/index.tsx Outdated Show resolved Hide resolved
@buildsize
Copy link

buildsize bot commented Jun 22, 2019

File name Previous Size New Size Change
package-lock.json 853.6 KB 857.54 KB 3.94 KB (0%)

@chenshuai2144 chenshuai2144 changed the title New Components Result feat: New Components Result Jun 23, 2019
@chenshuai2144
Copy link
Contributor Author

svg

image

base64

image

没有显著的优点,包还大了一些

@chenshuai2144
Copy link
Contributor Author

@afc163 @zombieJ 我们使用原来的方案吧

@chenshuai2144
Copy link
Contributor Author

@afc163
Copy link
Member

afc163 commented Jun 29, 2019

'success' | 'error' | 'info' | 'warning'| '404' | '403' | '500' 这几个都展示出来吧。

@zombieJ
Copy link
Member

zombieJ commented Jun 29, 2019

'success' | 'error' | 'info' | 'warning'| '404' | '403' | '500' 这几个都展示出来吧。

用个 Radio Group 合成一个 Demo?

@chenshuai2144
Copy link
Contributor Author

chenshuai2144 commented Jun 29, 2019

用个 Radio Group 合成一个 Demo?

这样挺好,多准备几份文案就好了

@chenshuai2144
Copy link
Contributor Author

image

新 demo

@afc163
Copy link
Member

afc163 commented Jun 30, 2019

这种重 UI 的组件,罗列对于产品/设计师用户也更加友好。

@chenshuai2144
Copy link
Contributor Author

chenshuai2144 commented Jun 30, 2019

那样会非常长。一共有 7 个。

而且这个是大通栏样式的组件。 不可能一栏显示多个

@zombieJ
Copy link
Member

zombieJ commented Jul 1, 2019

Switch case return render result?

@afc163
Copy link
Member

afc163 commented Jul 1, 2019

还有一点好处是 snapshot 都能出来。

@afc163 afc163 mentioned this pull request Jul 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants