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

fix: notification style width #45681

Merged
merged 3 commits into from Nov 6, 2023
Merged

fix: notification style width #45681

merged 3 commits into from Nov 6, 2023

Conversation

MadCcc
Copy link
Member

@MadCcc MadCcc commented Nov 6, 2023

[中文版模板 / 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 #45678

💡 Background and solution

📝 Changelog

Language Changelog
🇺🇸 English Fix Notification that style.width not work.
🇨🇳 Chinese 修复 Notification 组件设置 style.width 无效的问题。

☑️ 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

🚀 Summary

🤖 Generated by Copilot at d6914e4

This pull request adds a new feature to the notification component, allowing it to use a pure panel style. It also introduces a theme system using alias tokens and refactors the style generation functions. It updates the test and demo files accordingly.

🔍 Walkthrough

🤖 Generated by Copilot at d6914e4

  • Add a new feature of pure panel style for the notification component (link, link, link)
  • Refactor the style generation functions to use the theme system and extract the common style for the notice element (link, link, link, link, link, link, link, link)
  • Remove the redundant width property from the stack style function in components/notification/style/stack.ts (link)
  • Add a test case to check the style.width prop can override the default width of the notification component in components/notification/__tests__/index.test.tsx (link)
  • Add the style prop to the demo code in components/notification/demo/basic.tsx to show how to customize the notification component (link)
  • Add an empty line to separate the test cases in components/notification/__tests__/index.test.tsx for readability (link)

Copy link

stackblitz bot commented Nov 6, 2023

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

Copy link
Contributor

github-actions bot commented Nov 6, 2023

Preview Is ready

Copy link
Contributor

github-actions bot commented Nov 6, 2023

size-limit report 📦

Path Size
./dist/antd.min.js 400.76 KB (+257 B 🔺)
./dist/antd-with-locales.min.js 460.11 KB (+268 B 🔺)

Copy link

argos-ci bot commented Nov 6, 2023

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) ✅ No change detected - Nov 6, 2023, 3:09 AM

@li-jia-nan
Copy link
Member

size-limit 又挂了,上周刚加了1kb

@kiner-tang
Copy link
Member

size-limit 又挂了,上周刚加了1kb

一直增加体重,是时候瘦一下身了

Copy link

codecov bot commented Nov 6, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (fe59bb0) 100.00% compared to head (ba45718) 100.00%.
Report is 5 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##            master    #45681   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          699       700    +1     
  Lines        11815     11826   +11     
  Branches      3150      3151    +1     
=========================================
+ Hits         11815     11826   +11     
Files Coverage Δ
components/notification/PurePanel.tsx 100.00% <ø> (ø)
components/notification/style/index.ts 100.00% <100.00%> (ø)
components/notification/style/pure-panel.ts 100.00% <100.00%> (ø)
components/notification/style/stack.ts 100.00% <ø> (ø)

... and 1 file with indirect coverage changes

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

@MadCcc
Copy link
Member Author

MadCcc commented Nov 6, 2023

多加个文件就大 200b

@MadCcc MadCcc merged commit 3b5a915 into master Nov 6, 2023
90 checks passed
@MadCcc MadCcc deleted the fix/notification-width branch November 6, 2023 03:29
@MadCcc MadCcc mentioned this pull request Nov 6, 2023
20 tasks
@jovana
Copy link

jovana commented Nov 6, 2023

Thanks for fixing this!

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.

Notification API style not respected since version 5.10.3 (5.10.2 is still working correctly)
4 participants