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: Drawer styles properties #46858

Merged
merged 17 commits into from Jan 9, 2024
Merged

refactor: Drawer styles properties #46858

merged 17 commits into from Jan 9, 2024

Conversation

afc163
Copy link
Member

@afc163 afc163 commented Jan 8, 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

💡 Background and solution

https://preview-46858-ant-design.surge.sh/components/drawer 可以帮忙点点看有没有兼容问题。

已废弃:

        <Drawer
          headerStyle={...}
          bodyStyle={...}
          footerStyle={...}
          drawerStyle={...}
          contentWrapperStyle={...}
          maskStyle={...}
        >
          <p>Some contents...</p>
        </Drawer>

新用法:

        <Drawer
          styles={{
            header: ...,
            body: ...,
            footer: ...,
            content: ...,
            wrapper: ...,
            mask: ...,
          }}
        >
          <p>Some contents...</p>
        </Drawer>

📝 Changelog

Language Changelog
🇺🇸 English Drawer added styles.wrapper and deprecated contentWrapperStyle drawerStyle maskStyle props, simplify dom structure by removing .ant-drawer-wrapper-body.
🇨🇳 Chinese Drawer 新增 styles.wrapper 并废弃 contentWrapperStyle drawerStyle maskStyle 属性,并简化移除 .ant-drawer-wrapper-body 这一层 dom 结构。

☑️ 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 Jan 8, 2024

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

Copy link
Contributor

github-actions bot commented Jan 8, 2024

Visual Regression Report for PR #46858 Failed ❌

Target branch: feature (1ff5805)
View Full Report


image name expected actual diff
drawer-render-in-current.png feature: 1ff5805cca025a43d0f1e9ee1ac7b386ecdd97a1 current: pr-46858 diff
drawer-render-in-current.css-var.png feature: 1ff5805cca025a43d0f1e9ee1ac7b386ecdd97a1 current: pr-46858 diff

Check Full Report for details

Copy link
Contributor

github-actions bot commented Jan 8, 2024

Preview Is ready

@afc163 afc163 changed the title Refactor/drawer styles refactor: Drawer styles properties Jan 8, 2024
Copy link

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

Packages Version New capabilities Transitives Size Publisher
rc-drawer 7.0.0 None +0 57.3 kB afc163

Copy link
Contributor

github-actions bot commented Jan 8, 2024

size-limit report 📦

Path Size
./dist/antd.min.js 330.59 KB (+14 B 🔺)
./dist/antd-with-locales.min.js 376.52 KB (-207 B 🔽)

@afc163 afc163 marked this pull request as ready for review January 8, 2024 11:02
Copy link

codesandbox-ci bot commented Jan 8, 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.

Latest deployment of this branch, based on commit 5ae5967:

Sandbox Source
antd reproduction template (forked) Configuration

@afc163
Copy link
Member Author

afc163 commented Jan 8, 2024

footer 样式有问题,待查

zombieJ
zombieJ previously approved these changes Jan 8, 2024
@zombieJ zombieJ dismissed their stale review January 8, 2024 14:42

手快了,没看 diff。

Copy link

codecov bot commented Jan 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (1ff5805) 100.00% compared to head (5ae5967) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##           feature    #46858   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          731       731           
  Lines        12543     12543           
  Branches      3282      3282           
=========================================
  Hits         12543     12543           

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

@afc163
Copy link
Member Author

afc163 commented Jan 9, 2024

现在的 diff 符合预期了。

@afc163 afc163 merged commit f2b89da into feature Jan 9, 2024
104 of 105 checks passed
@afc163 afc163 deleted the refactor/drawer-styles branch January 9, 2024 02:20
Copy link
Contributor

github-actions bot commented Jan 9, 2024

🎉 Thank you for your contribution! If you have not yet joined our DingTalk community group, please feel free to join us (when joining, please provide the link to this PR).

🎉 感谢您的贡献!如果您还没有加入钉钉社区群,请扫描下方二维码加入我们(加群时请提供此 PR 链接)。

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

3 participants