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

[GSoC2024] Resolved Issue #7620 (Changed the alignment of the empty component in job page) #7621

Merged
merged 6 commits into from
Mar 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions changelog.d/20240318_203856_kavikumarceo.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
### Fixed

- Incorrect alignment of empty job list component
(<https://github.com/opencv/cvat/pull/7621>)
19 changes: 14 additions & 5 deletions cvat-ui/src/components/jobs-page/jobs-page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright (C) 2022 Intel Corporation
// Copyright (C) 2023 CVAT.ai Corporation
// Copyright (C) 2023-2024 CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT

@@ -76,7 +76,18 @@ function JobsPageComponent(): JSX.Element {
</Col>
</Row>
</>
) : <Empty description={<Text>No results matched your search...</Text>} />;
) : (
<div className='cvat-empty-jobs-list'>
<Empty description={(
<Row justify='center' align='middle'>
<Col>
<Text>No results matched your search...</Text>
</Col>
</Row>
)}
/>
</div>
);

return (
<div className='cvat-jobs-page'>
@@ -110,9 +121,7 @@ function JobsPageComponent(): JSX.Element {
);
}}
/>
{ fetching ? (
<Spin size='large' className='cvat-spinner' />
) : content }
{fetching ? <Spin size='large' className='cvat-spinner' /> : content}
</div>
);
}
68 changes: 30 additions & 38 deletions cvat-ui/src/components/jobs-page/styles.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright (C) 2022 Intel Corporation
// Copyright (C) 2022 CVAT.ai Corporation
// Copyright (C) 2022-2024 CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT

@@ -12,23 +12,40 @@
width: 100%;
overflow: auto;

> div:nth-child(1) {
div > {
.cvat-title {
color: $text-color;
.cvat-jobs-page-top-bar {
> div {
display: flex;
justify-content: space-between;

> div {
display: flex;
justify-content: space-between;
align-items: center;
width: 100%;

.cvat-jobs-page-search-bar {
width: $grid-unit-size * 32;
padding-left: $grid-unit-size * 0.5;
}

> div {
> *:not(:last-child) {
margin-right: $grid-unit-size;
}

display: flex;
}
}
}
}

> div:nth-child(2) {
&.ant-empty {
.cvat-empty-jobs-list {
.ant-empty {
position: absolute;
top: 40%;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}

padding-bottom: $grid-unit-size;
padding-top: $grid-unit-size;
}

.cvat-job-page-list-item {
@@ -129,6 +146,8 @@
.cvat-jobs-page-list {
display: flex;
flex-wrap: wrap;
padding-top: $grid-unit-size;
padding-bottom: $grid-unit-size;
}

.cvat-job-card-more-button {
@@ -138,30 +157,3 @@
font-size: 16px;
}
}

.cvat-jobs-page-top-bar {
> div {
display: flex;
justify-content: space-between;

> div {
display: flex;
justify-content: space-between;
align-items: center;
width: 100%;

.cvat-jobs-page-search-bar {
width: $grid-unit-size * 32;
padding-left: $grid-unit-size * 0.5;
}

> div {
> *:not(:last-child) {
margin-right: $grid-unit-size;
}

display: flex;
}
}
}
}
Loading