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

Fixed blinking notification #2200

Merged
merged 2 commits into from
Sep 21, 2020
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
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fixed CVAT format import for frame stepped tasks (<https://github.com/openvinotoolkit/cvat/pull/2151>)
- Fixed unnecessary pyhash dependency (<https://github.com/openvinotoolkit/cvat/pull/2170>)
- Fixed Data is not getting cleared, even after deleting the Task from Django Admin App(<https://github.com/openvinotoolkit/cvat/issues/1925>)
- Fixed blinking message: "Some tasks have not been showed because they do not have any data" (<https://github.com/openvinotoolkit/cvat/pull/2200>)
- Fixed case when a task with 0 jobs is shown as "Completed" in UI (<https://github.com/openvinotoolkit/cvat/pull/2200>)

### Security
-

Expand Down
2 changes: 1 addition & 1 deletion cvat-ui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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.9.5",
"version": "1.9.6",
"description": "CVAT single-page application",
"main": "src/index.tsx",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion cvat-ui/src/components/tasks-page/task-item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class TaskItemComponent extends React.PureComponent<TaskItemProps & RouteCompone
// Progress appearence depends on number of jobs
let progressColor = null;
let progressText = null;
if (numOfCompleted === numOfJobs) {
if (numOfCompleted && numOfCompleted === numOfJobs) {
progressColor = 'cvat-task-completed-progress';
progressText = <Text strong className={progressColor}>Completed</Text>;
} else if (numOfCompleted) {
Expand Down
48 changes: 23 additions & 25 deletions cvat-ui/src/components/tasks-page/tasks-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,7 @@ function updateQuery(previousQuery: TasksQuery, searchString: string): TasksQuer

class TasksPageComponent extends React.PureComponent<TasksPageProps & RouteComponentProps> {
public componentDidMount(): void {
const {
gettingQuery,
location,
onGetTasks,
} = this.props;

const { gettingQuery, location, onGetTasks } = this.props;
const query = updateQuery(gettingQuery, location.search);
onGetTasks(query);
}
Expand All @@ -90,8 +85,9 @@ class TasksPageComponent extends React.PureComponent<TasksPageProps & RouteCompo
const {
location,
gettingQuery,
onGetTasks,
tasksFetching,
numberOfHiddenTasks,
onGetTasks,
hideEmptyTasks,
} = this.props;

Expand All @@ -103,24 +99,26 @@ class TasksPageComponent extends React.PureComponent<TasksPageProps & RouteCompo
return;
}

if (numberOfHiddenTasks) {
message.destroy();
message.info(
<>
<Text>
Some tasks have not been showed because they do not have any data.
</Text>
<Button
type='link'
onClick={(): void => {
hideEmptyTasks(false);
message.destroy();
}}
>
Show all
</Button>
</>, 7,
);
if (prevProps.tasksFetching && !tasksFetching) {
if (numberOfHiddenTasks) {
message.destroy();
message.info(
<>
<Text>
Some tasks are temporary hidden since they are without any data
</Text>
<Button
type='link'
onClick={(): void => {
hideEmptyTasks(false);
message.destroy();
}}
>
Show all
</Button>
</>, 5,
);
}
}
}

Expand Down