Skip to content

Commit

Permalink
docs: 更新quickissue 文案 (#141)
Browse files Browse the repository at this point in the history
Co-authored-by: 象数 <zhengxue.lzx@antgroup.com>
  • Loading branch information
lzxue and 象数 committed Aug 29, 2023
1 parent fc1db65 commit 9185881
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 17 deletions.
5 changes: 5 additions & 0 deletions site/components/quickIssue/QuickIssue.module.less
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,16 @@
padding: 24px;
width: 60%;
min-height: 910px;
margin-top: 40px;

.flex {
display: flex;
align-items: baseline;
justify-content: space-evenly;
}

form {
margin-top: 80px;
}

}
23 changes: 12 additions & 11 deletions site/components/quickIssue/QuickIssue.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@ import newGithubIssueUrl from 'new-github-issue-url';
import GitHubButton from 'react-github-btn'
import styles from '@antv/dumi-theme-antv/dist/slots/ManualContent/index.module.less';
import { useLocale } from 'dumi';
import { assign } from 'lodash';

type url = {
label: string;
gitUrl: string;
api: string;
chartDemo: string;
assignee: string;
} | undefined

const formItemLayout = {
Expand Down Expand Up @@ -53,7 +55,8 @@ export default () => {
user: 'antvis',
repo: url ? url.label : '',
title: values.title,
labels: [values.type]
labels: [values.type,'QuickIssue'],
assignee: url?.assignee,
});
window.open(toUrl)
}
Expand All @@ -69,7 +72,6 @@ export default () => {
<li>Make sure you have search your question in FAQ and changelog</li>
<li>Look for / ask questions on StackOverflow</li>
</ul>
<p>Also try to search for your issue - it may have already been answered or even fixed in the development branch. However, if you find that an old, closed issue still persists in the latest version, you should open a new issue using the form below instead of commenting on the old issue.</p>
</div>
}
return <div>
Expand All @@ -81,7 +83,6 @@ export default () => {
<li>提问前确保你在 常见问题 和 更新日志 中搜索过</li>
<li>在 StackOverflow (英文) 或是 SegmentFault(中文)搜索和提问</li>
</ul>
<p>最后,在开 issue 前,可以先搜索一下以往的旧 issue - 你遇到的问题可能已经有人提了,也可能已经在最新版本中被修正。注意:如果你发现一个已经关闭的旧 issue 在最新版本中仍然存在,请不要在旧 issue 下面留言,而应该用下面的表单开一个新的 issue。</p>
</div>
}, [lang])

Expand All @@ -96,22 +97,22 @@ export default () => {
<Form onFinish={onFinish} {...formItemLayout} >
<div className={style.flex}>
<Form.Item
label={lang === 'zh' ? '仓库' : 'gitHub Name'}
label={lang === 'zh' ? '仓库' : 'Repositorie'}
name={'gitHub'}
rules={[{ required: true }]}
>
<Select style={{ width: 250 }} options={options} onChange={onChange} />
</Form.Item>
<Form.Item>
<div style={{ width: 450 }}>
<Space>
{ url && <Space>
<Button onClick={() => {
window.open(url?.api)
}}>{lang === 'zh' ? '开始使用' : 'Start'}</Button>
}}>{'API'}</Button>
<Button onClick={() => {
window.open(url?.chartDemo)
}}>{lang === 'zh' ? '图表示例' : 'chart'}</Button>
{url &&
}}>{lang === 'zh' ? '图表示例' : 'Demo'}</Button>

<div style={{ paddingTop: 6 }}>
<GitHubButton
href={`https://github.com/antvis/${url.label}`}
Expand All @@ -123,8 +124,8 @@ export default () => {
Star
</GitHubButton>
</div>
}
</Space>
}
</div>
</Form.Item>
</div>
Expand All @@ -143,11 +144,11 @@ export default () => {
name={'title'}
rules={[{ required: true }]}
>
<Input style={{ width: 400 }} />
<Input placeholder={lang === 'zh' ? '请填写标题' : 'Please fill in the title'} style={{ width: 400 }} />
</Form.Item>
</div>
<div style={{ textAlign: 'center' }} >
<p style={{ color: '#a1a1a1' }}>{lang === 'zh' ? 'issue正文内容,请点击下方按钮去创建页填写' : 'Please click the button below to create a page to fill in the main content of the issue'}</p>
<p style={{ color: '#a1a1a1' }}>{lang === 'zh' ? 'issue正文内容,请点击下方按钮跳转到 Github 页面填写' : 'Please click the button below to be redirected to the GitHub page where you can fill in the content for the main issue'}</p>
<Button htmlType='submit' type='primary'>{lang === 'zh' ? '前往GitHub创建issue' : 'create issue'}</Button>
</div>
</Form>
Expand Down
18 changes: 12 additions & 6 deletions site/components/quickIssue/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,36 +4,42 @@ export const GITHUB_URL = [
gitUrl: 'https://github.com/antvis/G2',
api: 'https://g2.antv.antgroup.com/api/overview',
chartDemo: 'https://g2.antv.antgroup.com/examples',
assignee:'pearmini',
},
{
label: 'G6',
gitUrl: 'https://github.com/antvis/G6',
api: 'https://g6.antv.antgroup.com/api/overview',
chartDemo: 'https://g6.antv.antgroup.com/examples',
},
{
label: 'F2',
gitUrl: 'https://github.com/antvis/F2',
api: 'https://f2.antv.antgroup.com/api/f2',
chartDemo: 'https://f2.antv.antgroup.com/examples',
assignee:'Yanyan-Wang',
},
{
label: 'X6',
gitUrl: 'https://github.com/antvis/X6',
api: 'https://x6.antv.antgroup.com/api/graph/graph',
chartDemo: 'https://x6.antv.antgroup.com/examples',
assignee:"NewByVector"
},
{
label: 'L7',
gitUrl: 'https://github.com/antvis/L7',
api: 'https://l7.antv.antgroup.com/api/scene',
chartDemo: 'https://l7.antv.antgroup.com/examples',
assignee:'lzxue',
},
{
label: 'F2',
gitUrl: 'https://github.com/antvis/F2',
api: 'https://f2.antv.antgroup.com/api/f2',
chartDemo: 'https://f2.antv.antgroup.com/examples',
assignee:'zengyue',
},
{
label: 'S2',
gitUrl: 'https://github.com/antvis/S2',
api: 'https://s2.antv.antgroup.com/api/general/s2-data-config',
chartDemo: 'https://s2.antv.antgroup.com/examples',
assignee:'lijinke666',
}
]

Expand Down

0 comments on commit 9185881

Please sign in to comment.