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: export sider context from layout for v4 #45947

Merged
merged 8 commits into from Nov 21, 2023
Merged

Conversation

PeachScript
Copy link
Member

@PeachScript PeachScript commented Nov 17, 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

v5: #45916

💡 Background and solution

Export SiderContext from Layout, to avoid multi-instance problem when using ProLayout and external antd at the same time, ref: https://github.com/ant-design/pro-components/blob/8b451c6e255fecced11e7d7b0be4aad2bfa0a09c/packages/layout/src/components/SiderMenu/SiderMenu.tsx#L5

📝 Changelog

Language Changelog
🇺🇸 English --
🇨🇳 Chinese --

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

🤖[deprecated] Generated by Copilot at a048100

Exposed SiderContext as a Layout property to allow custom Sider configurations. Renamed and typed the property for consistency and safety.

🔍 Walkthrough

🤖[deprecated] Generated by Copilot at a048100

  • Expose SiderContext as a property of Layout component for customizing Sider behavior (link, link, link)
    • Import SiderContext from ./Sider in components/layout/index.tsx (link)
    • Add SiderContext as a type of CompoundedComponent interface (link)
    • Assign SiderContext as a property of Layout component using _InternalSiderContext name (link)

Signed-off-by: Peach <scdzwyxst@gmail.com>
Copy link

stackblitz bot commented Nov 17, 2023

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

Copy link
Contributor

github-actions bot commented Nov 17, 2023

Preview Is ready

Copy link

argos-ci bot commented Nov 20, 2023

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

Build Status Details Updated (UTC)
default (Inspect) 🧿 Changes detected (Review) 63 changes Nov 21, 2023, 10:16 AM

@PeachScript
Copy link
Member Author

Size Limit 挂掉看起来是 skip_step: install 的 action 参数没生效,在 4.x-stable 分支做了 install 操作触发 peer deps error,但这个问题应该合并后就好了

@afc163 afc163 merged commit 0e6fe5f into 4.x-stable Nov 21, 2023
87 of 95 checks passed
@afc163 afc163 deleted the PeachScript-patch-1 branch November 21, 2023 10:35
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