From f75d0cae7f31e550d700941562f69d804363463d Mon Sep 17 00:00:00 2001 From: afc163 Date: Sun, 13 Oct 2024 20:45:19 +0800 Subject: [PATCH] docs: use codesandbox as default reproduce link (#51219) --- .../builtins/Previewer/CodePreviewer.tsx | 44 +++++++++---------- .github/workflows/issue-labeled.yml | 4 +- .lintstagedrc.json | 2 +- README-zh_CN.md | 2 +- README.md | 2 +- 5 files changed, 26 insertions(+), 28 deletions(-) diff --git a/.dumi/theme/builtins/Previewer/CodePreviewer.tsx b/.dumi/theme/builtins/Previewer/CodePreviewer.tsx index 2e9100e49d..79724a2eaf 100644 --- a/.dumi/theme/builtins/Previewer/CodePreviewer.tsx +++ b/.dumi/theme/builtins/Previewer/CodePreviewer.tsx @@ -108,7 +108,7 @@ const CodePreviewer: React.FC = (props) => { clientOnly, pkgDependencyList, } = props; - const { showDebug, codeType } = useContext(DemoContext); + const { codeType } = useContext(DemoContext); const { pkg } = useSiteData(); const location = useLocation(); @@ -420,6 +420,26 @@ createRoot(document.getElementById('container')).render(); )} +
{ + track({ type: 'codesandbox', demo: asset.id }); + codeSandboxIconRef.current?.submit(); + }} + > + + }> + + +
{showRiddleButton ? (
); - {showDebug && ( -
{ - track({ type: 'codesandbox', demo: asset.id }); - codeSandboxIconRef.current?.submit(); - }} - > - - }> - - -
- )} }> [什么是最小化重现,为什么这是必需的?](https://github.com/ant-design/ant-design/wiki/%E4%BB%80%E4%B9%88%E6%98%AF%E6%9C%80%E5%B0%8F%E5%8C%96%E9%87%8D%E7%8E%B0%EF%BC%8C%E4%B8%BA%E4%BB%80%E4%B9%88%E8%BF%99%E6%98%AF%E5%BF%85%E9%9C%80%E7%9A%84%EF%BC%9F) diff --git a/.lintstagedrc.json b/.lintstagedrc.json index c13937fccc..20c73c0b35 100644 --- a/.lintstagedrc.json +++ b/.lintstagedrc.json @@ -1,4 +1,4 @@ { - "*.{ts,tsx,js,jsx,css,mjs,json}": ["biome check --write --no-errors-on-unmatched"], + "*.{ts,tsx,js,jsx,css,mjs,json}": ["biome check --write --no-errors-on-unmatched", "eslint"], "*.{md,yml}": ["prettier --ignore-unknown --write"] } diff --git a/README-zh_CN.md b/README-zh_CN.md index 97d781cd73..4fd827408d 100644 --- a/README-zh_CN.md +++ b/README-zh_CN.md @@ -131,7 +131,7 @@ export default App; - [开发者说明](https://github.com/ant-design/ant-design/wiki/Development) - [版本发布规则](https://github.com/ant-design/ant-design/wiki/%E8%BD%AE%E5%80%BC%E8%A7%84%E5%88%99%E5%92%8C%E7%89%88%E6%9C%AC%E5%8F%91%E5%B8%83%E6%B5%81%E7%A8%8B) - [常见问题](https://ant.design/docs/react/faq-cn) -- [Stackblitz 在线演示](https://u.ant.design/reproduce),用于报告 bug +- [在线演示](https://u.ant.design/reproduce),用于报告 bug - [定制主题](https://ant.design/docs/react/customize-theme-cn) - [国际化](https://ant.design/docs/react/i18n-cn) - [成为社区协作成员](https://github.com/ant-design/ant-design/wiki/Collaborators#how-to-apply-for-being-a-collaborator) diff --git a/README.md b/README.md index 398db81828..90b313c47d 100644 --- a/README.md +++ b/README.md @@ -113,7 +113,7 @@ export default () => ( - [Developer Instruction](https://github.com/ant-design/ant-design/wiki/Development) - [Versioning Release Note](https://github.com/ant-design/ant-design/wiki/%E8%BD%AE%E5%80%BC%E8%A7%84%E5%88%99%E5%92%8C%E7%89%88%E6%9C%AC%E5%8F%91%E5%B8%83%E6%B5%81%E7%A8%8B) - [FAQ](https://ant.design/docs/react/faq) -- [Stackblitz Demo](https://u.ant.design/reproduce) for bug reports +- [Online Playground](https://u.ant.design/reproduce) for bug reports - [Customize Theme](https://ant.design/docs/react/customize-theme) - [How to Apply for Being A Collaborator](https://github.com/ant-design/ant-design/wiki/Collaborators#how-to-apply-for-being-a-collaborator)