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(notification): add show progress option and update docs #48353

Merged
merged 17 commits into from
May 17, 2024

Conversation

yociduo
Copy link
Contributor

@yociduo yociduo commented Apr 9, 2024

[中文版模板 / Chinese template]

🤔 This is a ...

  • New feature
  • Bug fix
  • Site / documentation update
  • Demo update
  • Component style update
  • TypeScript definition update
  • Bundle size optimization
  • Performance optimization
  • Enhancement feature
  • Internationalization
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Workflow
  • Other (about what?)

🔗 Related issue link

close #48125
react-component/notification#322

💡 Background and solution

📝 Changelog

Language Changelog
🇺🇸 English Notification support showProgress prop
🇨🇳 Chinese Notification 支持 showProgress 属性

☑️ Self-Check before Merge

⚠️ Please check all items below before requesting a reviewing. ⚠️

  • 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

Copy link

stackblitz bot commented Apr 9, 2024

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

Copy link
Contributor

github-actions bot commented Apr 9, 2024

Preview is ready

Copy link
Contributor

github-actions bot commented Apr 9, 2024

👁 Visual Regression Report for PR #48353 Failed ❌

🎯 Target branch: feature (7a2f5f6)
📖 View Full Report ↗︎

Expected (Branch feature) Actual (Current PR) Diff
progress-info-position.compact.png progress-info-position.compact.png progress-info-position.compact.css-var.png progress-info-position.compact.css-var.png
progress-info-position.dark.png progress-info-position.dark.png progress-info-position.dark.css-var.png progress-info-position.dark.css-var.png
progress-info-position.default.png progress-info-position.default.png progress-info-position.default.css-var.png progress-info-position.default.css-var.png
notification-show-with-progress.compact.css-var.png notification-show-with-progress.compact.css-var.png 🆕🆕🆕 Added 🆕🆕🆕
notification-show-with-progress.compact.png notification-show-with-progress.compact.png 🆕🆕🆕 Added 🆕🆕🆕
notification-show-with-progress.dark.css-var.png notification-show-with-progress.dark.css-var.png 🆕🆕🆕 Added 🆕🆕🆕
notification-show-with-progress.dark.png notification-show-with-progress.dark.png 🆕🆕🆕 Added 🆕🆕🆕
notification-show-with-progress.default.css-var.png notification-show-with-progress.default.css-var.png 🆕🆕🆕 Added 🆕🆕🆕
notification-show-with-progress.default.png notification-show-with-progress.default.png 🆕🆕🆕 Added 🆕🆕🆕

Check Full Report for details

Copy link

codesandbox-ci bot commented Apr 9, 2024

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@yociduo yociduo force-pushed the feat/notification-progress-bar branch from 1cb2dcd to e3751cd Compare April 9, 2024 12:35
@abenhamdine
Copy link
Contributor

the preview here https://preview-48353-ant-design.surge.sh/components/notification#notification-demo-show-progress doesn't show any progress indicator

@yociduo
Copy link
Contributor Author

yociduo commented Apr 10, 2024

the preview here https://preview-48353-ant-design.surge.sh/components/notification#notification-demo-show-progress doesn't show any progress indicator

Yes, it's work in progress. I'm waiting for the dependence merged. The demo for rc-notification https://notification-git-fork-yociduo-feat-show-progess-react-component.vercel.app/demo/hooks

@MadCcc
Copy link
Member

MadCcc commented Apr 10, 2024

image

可以参考这个设计

@yociduo yociduo force-pushed the feat/notification-progress-bar branch from e3751cd to e53f010 Compare April 15, 2024 08:45
@yociduo yociduo marked this pull request as ready for review April 15, 2024 08:45
@yociduo
Copy link
Contributor Author

yociduo commented Apr 15, 2024

image

可以参考这个设计

image
更新了,不过需要等rc-notification库更新

@yociduo yociduo changed the title [WIP] feat(notification): add show progress option and update docs feat(notification): add show progress option and update docs Apr 15, 2024
@yociduo yociduo requested a review from kiner-tang April 24, 2024 06:03
components/notification/index.en-US.md Outdated Show resolved Hide resolved
components/notification/index.en-US.md Outdated Show resolved Hide resolved
components/notification/index.zh-CN.md Outdated Show resolved Hide resolved
components/notification/index.zh-CN.md Outdated Show resolved Hide resolved
@kiner-tang
Copy link
Member

image @yociduo lint 报错了,需要处理一下

@yociduo
Copy link
Contributor Author

yociduo commented May 6, 2024

image @yociduo lint 报错了,需要处理一下

修复了,不过需要先处理组件那边的更新。

@kiner-tang
Copy link
Member

image @yociduo lint 报错了,需要处理一下

修复了,不过需要先处理组件那边的更新。

我去催一下 rc-notification 那边

@kiner-tang kiner-tang requested a review from afc163 May 11, 2024 03:14
Copy link

socket-security bot commented May 11, 2024

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@ant-design/colors@7.0.2 None 0 23.6 kB madccc
npm/@ant-design/compatible@5.1.3 environment 0 389 kB zombiej
npm/@ant-design/cssinjs@1.20.0 environment 0 258 kB zombiej
npm/@ant-design/happy-work-theme@1.0.0 None 0 30.9 kB zombiej
npm/@ant-design/icons@5.3.7 environment 0 11.3 MB afc163
npm/@ant-design/react-slick@1.1.2 environment 0 832 kB afc163
npm/@ant-design/tools@18.0.2 filesystem 0 65.7 kB madccc
npm/@antv/g6@4.8.24 None 0 7.99 MB iaaron
npm/@babel/eslint-plugin@7.24.5 None 0 32.9 kB nicolo-ribaudo
npm/@biomejs/biome@1.7.3 shell 0 135 kB dominionl
npm/@codesandbox/sandpack-react@2.13.10 eval 0 1.16 MB danilowoz
npm/@ctrl/tinycolor@3.6.1 None 0 249 kB scttcper
npm/@dnd-kit/core@6.1.0 environment 0 1.05 MB clauderic
npm/@dnd-kit/modifiers@7.0.0 environment 0 48.1 kB clauderic
npm/@dnd-kit/sortable@8.0.0 environment 0 233 kB clauderic
npm/@dnd-kit/utilities@3.2.2 environment 0 88.5 kB clauderic
npm/@emotion/react@11.11.4 environment 0 583 kB emotion-release-bot
npm/@emotion/server@11.11.0 environment 0 48.7 kB emotion-release-bot
npm/@ianvs/prettier-plugin-sort-imports@4.2.1 environment, unsafe 0 109 kB ianvs
npm/@madccc/duplicate-package-checker-webpack-plugin@1.0.0 None 0 19 kB madccc
npm/@microflash/rehype-figure@2.1.0 None 0 6.79 kB naiyer
npm/@npmcli/run-script@8.1.0 environment 0 18.3 kB npm-cli-ops
npm/@octokit/rest@20.1.1 None 0 9.94 kB octokitbot
npm/@qixian.cs/github-contributors-list@2.0.1 network 0 19.5 kB chenshuai2144
npm/@rc-component/color-picker@1.5.3 None 0 79.8 kB madccc
npm/@rc-component/mutate-observer@1.1.0 environment 0 16.7 kB zombiej
npm/@rc-component/tour@1.14.2 None 0 67.2 kB zombiej
npm/@rc-component/trigger@2.1.1 environment 0 179 kB zombiej
npm/@size-limit/file@11.1.3 None 0 3.43 kB ai
npm/@stackblitz/sdk@1.10.0 None 0 182 kB apai4
npm/@testing-library/dom@10.1.0 environment 0 2.42 MB testing-library-bot
npm/@testing-library/jest-dom@6.4.5 None 0 265 kB testing-library-bot
npm/@testing-library/react@15.0.7 environment 0 4.31 MB testing-library-bot
npm/@testing-library/user-event@14.5.2 None 0 435 kB testing-library-bot
npm/@types/adm-zip@0.5.5 None 0 24.7 kB types
npm/@types/ali-oss@6.16.11 None 0 42.2 kB types
npm/@types/cli-progress@3.11.5 None 0 12.9 kB types
npm/@types/fs-extra@11.0.4 None 0 36.8 kB types
npm/@types/gtag.js@0.0.19 None 0 8.85 kB types
npm/@types/http-server@0.12.4 None 0 4.58 kB types
npm/@types/inquirer@9.0.7 None 0 73.6 kB types
npm/@types/isomorphic-fetch@0.0.39 None 0 2.77 kB types
npm/@types/jest-axe@3.5.9 None 0 6.62 kB types
npm/@types/jest-environment-puppeteer@5.0.6 None 0 6.09 kB types
npm/@types/jest-image-snapshot@6.4.0 None 0 9.68 kB types
npm/@types/jquery@3.5.30 None 0 1.12 MB types
npm/@types/jsdom@21.1.6 None 0 21.9 kB types
npm/@types/lodash@4.17.1 None 0 862 kB types
npm/@types/minimist@1.2.5 None 0 6.27 kB types
npm/@types/nprogress@0.2.3 None 0 4.83 kB types
npm/@types/ora@3.2.0 None 0 1.7 kB types
npm/@types/pixelmatch@5.2.6 None 0 7.87 kB types
npm/@types/pngjs@6.0.5 None 0 5.47 kB types
npm/@types/prismjs@1.26.4 None 0 19.2 kB types
npm/@types/progress@2.0.7 None 0 6.51 kB types
npm/@types/qs@6.9.15 None 0 7.34 kB types
npm/@types/react-copy-to-clipboard@5.0.7 None 0 4.36 kB types
npm/@types/react-dom@18.3.0 None 0 37.8 kB types
npm/@types/react-highlight-words@0.16.7 None 0 5.53 kB types
npm/@types/react-resizable@3.0.7 None 0 7.1 kB types
npm/@types/react@18.3.2 None 0 436 kB types
npm/@types/spinnies@0.5.3 None 0 8.22 kB types
npm/@types/tar@6.1.13 None 0 30.8 kB types
npm/@types/throttle-debounce@5.0.2 None 0 6.48 kB types
npm/@types/warning@3.0.3 None 0 2.71 kB types
npm/@typescript-eslint/eslint-plugin@7.9.0 None 0 2.69 MB jameshenry
npm/@typescript-eslint/parser@7.9.0 None 0 18 kB jameshenry
npm/adm-zip@0.5.12 filesystem 0 104 kB cthackers
npm/ali-oss@6.20.0 filesystem 0 2.72 MB fengmk2
npm/antd-img-crop@4.22.0 None 0 49.7 kB nanxiaobei
npm/antd-style@3.6.2 environment 0 188 kB arvinxx
npm/antd-token-previewer@2.0.8 None 0 1.22 MB madccc
npm/axios@1.6.8 network 0 1.84 MB jasonsaayman
npm/cheerio@1.0.0-rc.12 None 0 558 kB feedic
npm/circular-dependency-plugin@5.2.2 None 0 10.5 kB theron
npm/classnames@2.5.1 None 0 23.6 kB jedwatson
npm/cli-progress@3.12.0 None 0 62.2 kB andidittrich
npm/copy-to-clipboard@3.3.3 None 0 15.1 kB sudodoki
npm/cross-env@7.0.3 environment 0 29.1 kB kentcdodds
npm/cross-fetch@4.0.0 network 0 88.1 kB lquixada
npm/crypto@1.0.1 None 0 778 B ehsalazar
npm/dayjs@1.11.11 None 0 666 kB iamkun
npm/dekko@0.2.1 filesystem 0 8.91 kB benjycui
npm/dumi-plugin-color-chunk@1.1.0 None 0 38.8 kB wxh16144
npm/dumi@2.3.4 environment, eval, filesystem 0 2.89 MB yifankakaxi
npm/esbuild-loader@4.1.0 None 0 34.3 kB hirokiosame
npm/eslint-config-airbnb@19.0.4 None 0 81.7 kB ljharb
npm/eslint-import-resolver-typescript@3.6.1 None 0 45.1 kB jounqin
npm/eslint-plugin-compat@4.2.0 filesystem +1 56.3 kB amilajack
npm/eslint-plugin-import@2.29.1 filesystem, unsafe Transitive: environment +1 1.26 MB ljharb
npm/eslint-plugin-jest@28.5.0 filesystem 0 317 kB simenb
npm/eslint-plugin-jsx-a11y@6.8.0 None +1 2.92 MB ljharb
npm/eslint-plugin-lodash@7.4.0 filesystem 0 320 kB idok
npm/eslint-plugin-markdown@5.0.0 None 0 31.1 kB eslintbot
npm/eslint-plugin-react-hooks@4.6.2 environment 0 118 kB react-bot
npm/eslint-plugin-react@7.34.1 filesystem +1 915 kB ljharb
npm/eslint-plugin-unicorn@53.0.0 None 0 691 kB sindresorhus
npm/eslint@8.57.0 environment, filesystem +2 3.45 MB eslintbot
npm/fast-glob@3.3.2 filesystem 0 96.7 kB mrmlnc
npm/fetch-jsonp@1.3.0 None 0 12.4 kB camsong
npm/fs-extra@11.2.0 None +1 59.6 kB ryanzim
npm/gh-pages@6.1.1 filesystem, shell 0 39.9 kB tschaub
npm/glob@10.3.15 Transitive: environment +1 895 kB isaacs
npm/html2sketch@1.0.2 network 0 1.87 MB arvinxx
npm/http-server@14.1.1 environment, filesystem, network 0 124 kB thornjad
npm/husky@9.0.11 environment, filesystem, shell 0 3.61 kB typicode
npm/identity-obj-proxy@3.0.0 None 0 8.38 kB keyanzhang
npm/immer@10.1.1 environment 0 627 kB mweststrate
npm/inquirer@9.2.21 None +1 92.9 kB sboudrias
npm/is-ci@3.0.1 None 0 3.81 kB sibiraj-s
npm/isomorphic-fetch@3.0.0 Transitive: network +1 169 kB mattandrews
npm/jest-axe@8.0.0 None 0 21 kB nickcolley
npm/jest-canvas-mock@2.5.2 None 0 112 kB atool
npm/jest-environment-jsdom@29.7.0 None 0 9.21 kB simenb
npm/jest-environment-node@29.7.0 unsafe 0 9.37 kB simenb
npm/jest-image-snapshot@6.4.0 environment, filesystem, shell 0 84.9 kB amexopensource
npm/jest-puppeteer@10.0.1 None 0 3.7 kB neoziro
npm/jest@29.7.0 None 0 5.01 kB simenb
npm/jquery@3.7.1 None 0 1.25 MB timmywil
npm/jsdom@24.0.0 eval, filesystem, network, shell, unsafe 0 3.11 MB domenic
npm/jsonml-to-react-element@1.1.11 None 0 21.2 kB benjycui
npm/qrcode.react@3.1.0 None 0 72.3 kB zpao
npm/rc-cascader@3.25.0 environment 0 192 kB zombiej
npm/rc-checkbox@3.2.0 None 0 20.2 kB zombiej
npm/rc-collapse@3.7.3 None 0 50.5 kB afc163
npm/rc-dialog@9.4.0 environment 0 77 kB zombiej
npm/rc-drawer@7.1.0 environment 0 59.3 kB afc163
npm/rc-dropdown@4.2.0 None 0 42.8 kB zombiej
npm/rc-field-form@2.2.0 environment 0 291 kB zombiej
npm/rc-image@7.8.0 environment 0 157 kB zombiej
npm/rc-input-number@9.0.0 None 0 80.2 kB madccc
npm/rc-input@1.4.5 None 0 70.6 kB zombiej
npm/rc-mentions@2.11.1 environment 0 74.7 kB zombiej
npm/rc-menu@9.13.0 environment 0 250 kB zombiej
npm/rc-motion@2.9.1 None 0 0 B
npm/rc-notification@5.5.0 environment 0 87.5 kB afc163
npm/rc-pagination@4.0.4 environment 0 171 kB madccc
npm/rc-picker@4.5.0 environment 0 896 kB zombiej
npm/rc-progress@4.0.0 environment 0 52.3 kB afc163
npm/rc-rate@2.12.0 None 0 41.4 kB afc163
npm/rc-resize-observer@1.4.0 environment 0 36.5 kB zombiej
npm/rc-segmented@2.3.0 environment 0 39.7 kB afc163
npm/rc-select@14.13.3 environment 0 340 kB zombiej
npm/rc-slider@10.6.2 environment 0 156 kB afc163
npm/rc-steps@6.0.1 None 0 48.3 kB zombiej
npm/rc-switch@4.1.0 None 0 20.5 kB afc163
npm/rc-table@7.45.5 environment 0 398 kB afc163
npm/rc-tabs@15.0.0 environment 0 166 kB afc163
npm/rc-textarea@1.6.3 environment 0 61.9 kB madccc
npm/rc-tooltip@6.2.0 None 0 52.3 kB zombiej
npm/rc-tree-select@5.20.0 environment 0 162 kB zombiej
npm/rc-tree@5.8.7 environment 0 372 kB zombiej
npm/rc-upload@4.5.2 None 0 66.7 kB zombiej
npm/rc-util@5.39.3 environment +1 257 kB afc163
npm/react-dom@18.3.1 environment 0 4.51 MB react-bot
npm/react@18.3.1 environment 0 318 kB react-bot
npm/scroll-into-view-if-needed@3.1.0 None 0 44.8 kB stipsan
npm/throttle-debounce@5.0.0 None 0 83.1 kB niksy

🚮 Removed packages: npm/lodash@4.17.21, npm/minimist@1.2.8, npm/prettier@3.2.5, npm/qs@6.12.1, npm/regenerator-runtime@0.14.1

View full report↗︎

Copy link

socket-security bot commented May 11, 2024

👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

Ignoring: npm/@ant-design/tools@18.0.2, npm/@biomejs/biome@1.7.3, npm/core-js@3.34.0

View full report↗︎

Next steps

Take a deeper look at the dependency

Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev.

Remove the package

If you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency.

Mark a package as acceptable risk

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of ecosystem/package-name@version specifiers. e.g. @SocketSecurity ignore npm/foo@1.0.0 or ignore all packages with @SocketSecurity ignore-all

Copy link

codecov bot commented May 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (7a2f5f6) to head (1c3f8a0).

Additional details and impacted files
@@            Coverage Diff            @@
##           feature    #48353   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          746       746           
  Lines        13014     13014           
  Branches      3428      3428           
=========================================
  Hits         13014     13014           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

yociduo and others added 2 commits May 17, 2024 14:38
Co-authored-by: kiner-tang <1127031143@qq.com>
Signed-off-by: Eden Wang <yociduo@vip.qq.com>
@kiner-tang
Copy link
Member

@SocketSecurity ignore npm/@ant-design/tools@18.0.2
@SocketSecurity ignore npm/core-js@3.34.0
@SocketSecurity ignore npm/@biomejs/biome@1.7.3

@afc163 afc163 merged commit 860fd57 into ant-design:feature May 17, 2024
59 of 60 checks passed
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.

None yet

6 participants