forked from cvat-ai/cvat
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[GSoC2024] Enhancement of empty list components (cvat-ai#7659)
### Motivation and context Fixes cvat-ai#7657 Made all of the empty-list components ui consistent. ### Checklist - [x] I have created a changelog fragment <!-- see top comment in CHANGELOG.md --> - [x] I submit my changes into the `develop` branch - [x] I have linked related issues (see [GitHub docs]( https://help.github.com/en/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword)) ### License - [x] I submit _my code changes_ under the same [MIT License]( https://github.com/opencv/cvat/blob/develop/LICENSE) that covers the project. Feel free to contact the maintainers if that's a concern. --------- Co-authored-by: syedbarimanjan <[email protected]> Co-authored-by: Boris Sekachev <[email protected]> Co-authored-by: Kirill Lakhov <[email protected]>
- Loading branch information
1 parent
6c57c03
commit f1db0fd
Showing
22 changed files
with
226 additions
and
163 deletions.
There are no files selected for viewing
4 changes: 4 additions & 0 deletions
4
changelog.d/20240403_153414_syedbarimnajan_empty_list_components.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
### Fixed | ||
|
||
- Standardize the alignment of empty-list components | ||
(<https://github.com/opencv/cvat/pull/7659>) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 0 additions & 51 deletions
51
cvat-ui/src/components/cloud-storages-page/empty-cloud-storages-list.tsx
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
// Copyright (C) 2021-2022 Intel Corporation | ||
// Copyright (C) 2022-2024 CVAT.ai Corporation | ||
// | ||
// SPDX-License-Identifier: MIT | ||
|
||
import React from 'react'; | ||
|
||
import Empty from 'antd/lib/empty'; | ||
import { Row, Col } from 'antd/lib/grid'; | ||
import Text from 'antd/lib/typography/Text'; | ||
import { CloudOutlined } from '@ant-design/icons'; | ||
import { Link } from 'react-router-dom'; | ||
|
||
interface Props { | ||
notFound: boolean; | ||
} | ||
|
||
export default function EmptyListComponent(props: Props): JSX.Element { | ||
const { notFound } = props; | ||
|
||
return ( | ||
<div className='cvat-empty-cloud-storages-list'> | ||
<Empty | ||
description={notFound ? ( | ||
<Text strong>No results matched your search...</Text> | ||
) : ( | ||
<> | ||
<Row justify='center' align='middle'> | ||
<Col> | ||
<Text strong>No cloud storages attached yet...</Text> | ||
</Col> | ||
</Row> | ||
<Row justify='center' align='middle'> | ||
<Col> | ||
<Text type='secondary'>To get started with your cloud storage</Text> | ||
</Col> | ||
</Row> | ||
<Row justify='center' align='middle'> | ||
<Col> | ||
<Link to='/cloudstorages/create'>attach a new one</Link> | ||
</Col> | ||
</Row> | ||
</> | ||
)} | ||
image={notFound ? Empty.PRESENTED_IMAGE_DEFAULT : <CloudOutlined className='cvat-empty-cloud-storages-list-icon' />} | ||
/> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
// Copyright (C) 2020-2022 Intel Corporation | ||
// Copyright (C) 2022-2024 CVAT.ai Corporation | ||
// | ||
// SPDX-License-Identifier: MIT | ||
|
||
import React from 'react'; | ||
import { Link } from 'react-router-dom'; | ||
import Text from 'antd/lib/typography/Text'; | ||
import { Row, Col } from 'antd/lib/grid'; | ||
|
||
import Empty from 'antd/lib/empty'; | ||
|
||
interface Props { | ||
notFound: boolean; | ||
} | ||
|
||
function EmptyListComponent(props: Props): JSX.Element { | ||
const { notFound } = props; | ||
|
||
return ( | ||
<div className='cvat-empty-jobs-list'> | ||
<Empty description={notFound ? | ||
(<Text strong>No results matched your search...</Text>) : ( | ||
<> | ||
<Row justify='center' align='middle'> | ||
<Col> | ||
<Text strong>No jobs created yet...</Text> | ||
</Col> | ||
</Row> | ||
<Row justify='center' align='middle'> | ||
<Col> | ||
<Text type='secondary'>To get started with your annotation project</Text> | ||
</Col> | ||
</Row> | ||
<Row justify='center' align='middle'> | ||
<Col> | ||
<Link to='/tasks/create'>create a new task</Link> | ||
<Text type='secondary'> or try to </Text> | ||
<Link to='/projects/create'>create a new project</Link> | ||
</Col> | ||
</Row> | ||
</> | ||
)} | ||
/> | ||
</div> | ||
); | ||
} | ||
|
||
export default React.memo(EmptyListComponent); |
Oops, something went wrong.