Skip to content

Commit

Permalink
Fixed ordering of frame intersection column on Quality page (#8089)
Browse files Browse the repository at this point in the history
<!-- Raise an issue to propose your change
(https://github.com/cvat-ai/cvat/issues).
It helps to avoid duplication of efforts from multiple independent
contributors.
Discuss your ideas with maintainers to be sure that changes will be
approved and merged.
Read the [Contribution guide](https://docs.cvat.ai/docs/contributing/).
-->

<!-- Provide a general summary of your changes in the Title above -->

### Motivation and context
<!-- Why is this change required? What problem does it solve? If it
fixes an open
issue, please link to the issue here. Describe your changes in detail,
add
screenshots. -->
Resolved #8022

Before:

![ordering-before](https://github.com/cvat-ai/cvat/assets/50956430/08c5c48b-e3a5-40f9-ac3e-eb6c3a4fd11d)
After:

![ordering-updated](https://github.com/cvat-ai/cvat/assets/50956430/998513cf-aa0c-4bf1-b04b-032047d85c21)


### How has this been tested?
<!-- Please describe in detail how you tested your changes.
Include details of your testing environment, and the tests you ran to
see how your change affects other areas of the code, etc. -->

### Checklist
<!-- Go over all the following points, and put an `x` in all the boxes
that apply.
If an item isn't applicable for some reason, then ~~explicitly
strikethrough~~ the whole
line. If you don't do that, GitHub will show incorrect progress for the
pull request.
If you're unsure about any of these, don't hesitate to ask. We're here
to help! -->
- [x] I submit my changes into the `develop` branch
- [x] I have created a changelog fragment <!-- see top comment in
CHANGELOG.md -->
- ~~[ ] I have updated the documentation accordingly~~
- ~~[ ] I have added tests to cover my changes~~
- [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))
- [x] I have increased versions of npm packages if it is necessary

([cvat-canvas](https://github.com/cvat-ai/cvat/tree/develop/cvat-canvas#versioning),

[cvat-core](https://github.com/cvat-ai/cvat/tree/develop/cvat-core#versioning),

[cvat-data](https://github.com/cvat-ai/cvat/tree/develop/cvat-data#versioning)
and

[cvat-ui](https://github.com/cvat-ai/cvat/tree/develop/cvat-ui#versioning))

### License

- [x] I submit _my code changes_ under the same [MIT License](
https://github.com/cvat-ai/cvat/blob/develop/LICENSE) that covers the
project.
  Feel free to contact the maintainers if that's a concern.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Bug Fixes**
- Corrected the ordering of the `frame intersection` column on the task
quality page.

- **New Features**
- Enhanced filtering in job lists to accept additional types, improving
flexibility.

- **Chores**
  - Updated `cvat-ui` package version from 1.63.11 to 1.63.12.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
  • Loading branch information
klakhov committed Jun 27, 2024
1 parent 1e331ba commit 79927bf
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
### Fixed

- Ordering of `frame intersection` column on task quality page
(<https://github.com/cvat-ai/cvat/pull/8089>)
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.63.11",
"version": "1.63.12",
"description": "CVAT single-page application",
"main": "src/index.tsx",
"scripts": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import React, { useState } from 'react';
import { useHistory } from 'react-router';
import { Row, Col } from 'antd/lib/grid';
import { DownloadOutlined, QuestionCircleOutlined } from '@ant-design/icons';
import { ColumnFilterItem } from 'antd/lib/table/interface';
import { ColumnFilterItem, Key } from 'antd/lib/table/interface';
import Table from 'antd/lib/table';
import Button from 'antd/lib/button';
import Text from 'antd/lib/typography/Text';
Expand Down Expand Up @@ -120,7 +120,7 @@ function JobListComponent(props: Props): JSX.Element {
{ text: 'validation', value: 'validation' },
{ text: 'acceptance', value: 'acceptance' },
],
onFilter: (value: string | number | boolean, record: any) => record.stage.stage === value,
onFilter: (value: boolean | Key, record: any) => record.stage.stage === value,
},
{
title: 'Assignee',
Expand All @@ -132,7 +132,7 @@ function JobListComponent(props: Props): JSX.Element {
),
sorter: sorter('assignee.assignee.username'),
filters: collectUsers('assignee'),
onFilter: (value: string | number | boolean, record: any) => (
onFilter: (value: boolean | Key, record: any) => (
record.assignee.assignee?.username || false
) === value,
},
Expand All @@ -141,7 +141,7 @@ function JobListComponent(props: Props): JSX.Element {
dataIndex: 'frame_intersection',
key: 'frame_intersection',
className: 'cvat-job-item-frame-intersection',
sorter: sorter('frame_intersection'),
sorter: sorter('frame_intersection.summary.frameCount'),
render: (report?: QualityReport): JSX.Element => {
const frames = report?.summary.frameCount;
const frameSharePercent = report?.summary?.frameSharePercent;
Expand Down

0 comments on commit 79927bf

Please sign in to comment.