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

Make empty previews responsive to page resize #5925

Merged
merged 4 commits into from
Mar 24, 2023
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Width and height in CVAT dataset format mask annotations (<https://github.com/opencv/cvat/pull/5905>)
- Empty list of export formats for a project without tasks (<https://github.com/opencv/cvat/pull/5899>)
- Downgrade NumPy used by HRNet because `np.int` is no longer available (<https://github.com/opencv/cvat/pull/5574>)
- Make empty previews responsive to page resize <https://github.com/opencv/cvat/pull/5925>

### Security
- TDB
Expand Down
2 changes: 1 addition & 1 deletion cvat-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cvat-ui",
"version": "1.50.3",
"version": "1.50.4",
"description": "CVAT single-page application",
"main": "src/index.tsx",
"scripts": {
Expand Down
26 changes: 26 additions & 0 deletions cvat-ui/src/base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,29 @@ $box-shadow-base: 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 6px 16px 0 rgba(0, 0, 0,

$monospaced-fonts-stack: Consolas, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono,
Courier New, monospace;

.cvat-base-preview {
.ant-spin {
position: inherit;
}

font-size: $grid-unit-size * 15;
text-align: center;
height: 100%;
display: flex;
justify-content: center;
align-items: center;

svg {
width: 65%;
height: 65%;
}

.anticon {
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
}
}
11 changes: 6 additions & 5 deletions cvat-ui/src/components/cloud-storages-page/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,14 @@

.cvat-cloud-storage-item-loading-preview,
.cvat-cloud-storage-item-empty-preview {
.ant-spin {
position: inherit;
}
@extend .cvat-base-preview;

font-size: $grid-unit-size * 15;
text-align: center;
height: $grid-unit-size * 24;

svg {
width: 40%;
height: 40%;
}
}

.cvat-cloud-storage-item-preview {
Expand Down
10 changes: 4 additions & 6 deletions cvat-ui/src/components/jobs-page/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,11 @@

.cvat-job-item-loading-preview,
.cvat-job-item-empty-preview {
.ant-spin {
position: inherit;
}
@extend .cvat-base-preview;

font-size: $grid-unit-size * 15;
text-align: center;
height: $grid-unit-size * 24;
&:hover {
cursor: pointer;
}
}

.cvat-job-page-list-item-dimension {
Expand Down
10 changes: 5 additions & 5 deletions cvat-ui/src/components/models-page/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -125,19 +125,19 @@

.cvat-model-item-loading-preview,
.cvat-model-item-empty-preview {
.ant-spin {
position: inherit;
}
@extend .cvat-base-preview;

font-size: 80px;
text-align: center;
height: $grid-unit-size * 18;

&:hover {
cursor: pointer;
}
}

.cvat-model-item-loading-preview {
padding-top: $grid-unit-size * 3;
}

.cvat-models-item-card-preview-wrapper {
display: flex;
justify-content: center;
Expand Down
12 changes: 7 additions & 5 deletions cvat-ui/src/components/projects-page/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -135,13 +135,15 @@

.cvat-project-item-loading-preview,
.cvat-project-item-empty-preview {
.ant-spin {
position: inherit;
@extend .cvat-base-preview;

&:hover {
cursor: pointer;
}
}

font-size: $grid-unit-size * 15;
text-align: center;
height: $grid-unit-size * 24;
.cvat-project-item-loading-preview {
padding-top: $grid-unit-size * 3;
}

.cvat-projects-project-item-title {
Expand Down
5 changes: 1 addition & 4 deletions cvat-ui/src/components/task-page/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,10 @@

.cvat-task-item-loading-preview,
.cvat-task-item-empty-preview {
.ant-spin {
position: inherit;
}
@extend .cvat-base-preview;

height: $grid-unit-size * 18;
font-size: $grid-unit-size * 10;
text-align: center;
margin-bottom: $grid-unit-size * 3;
}

Expand Down
6 changes: 2 additions & 4 deletions cvat-ui/src/components/tasks-page/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,10 @@

.cvat-task-item-loading-preview,
.cvat-task-item-empty-preview {
.ant-spin {
position: inherit;
}
@extend .cvat-base-preview;

font-size: $grid-unit-size * 6;
text-align: center;
height: $grid-unit-size * 10;
}

.cvat-task-item-preview-wrapper {
Expand Down