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

Project tasks loading only when needed #3223

Merged
merged 8 commits into from
May 25, 2021
Merged

Project tasks loading only when needed #3223

merged 8 commits into from
May 25, 2021

Conversation

ActiveChooN
Copy link
Contributor

@ActiveChooN ActiveChooN commented May 21, 2021

Motivation and context

Resolve #3128. Trying to avoid unnecessary requests while fetching projects API.

How has this been tested?

Manually

Checklist

License

  • I submit my code changes under the same MIT License that covers the project.
    Feel free to contact the maintainers if that's a concern.
  • I have updated the license header for each file (see an example below)
# Copyright (C) 2021 Intel Corporation
#
# SPDX-License-Identifier: MIT

@ActiveChooN ActiveChooN changed the title Project tasks loading only when needed [WIP] Project tasks loading only when needed May 21, 2021
@ActiveChooN ActiveChooN changed the title [WIP] Project tasks loading only when needed Project tasks loading only when needed May 21, 2021
@bsekachev
Copy link
Member

@ActiveChooN
Could you please look at remark lint issues and to cypress tests related with projects? (actions_projects)? They should not failed.

@dvkruchinin
Probably the tests in issues_prs and canvas3d_functionality should not be affected by this patch. It is not clear why them failed. Could you please take a look?

@bsekachev bsekachev self-assigned this May 24, 2021
@dvkruchinin
Copy link
Contributor

@bsekachev

Probably the tests in issues_prs and canvas3d_functionality should not be affected by this patch. It is not clear why them failed. Could you please take a look?

Sure. I`ll take a look.

CHANGELOG.md Outdated Show resolved Hide resolved
cvat-ui/src/actions/projects-actions.ts Outdated Show resolved Hide resolved
cvat-ui/src/actions/projects-actions.ts Outdated Show resolved Hide resolved
cvat-ui/src/components/project-page/project-page.tsx Outdated Show resolved Hide resolved
cvat-core/src/api-implementation.js Show resolved Hide resolved

const [project] = projects.filter((_project) => _project.id === id);
const projectSubsets = [''];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No subset assigned?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a default value for the task without a subset.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, just on UI we could rename it as we wish for better UX, right?

@bsekachev
Copy link
Member

BTW, should not we paginate project tasks? Now it lists (and fetches from the server) all the tasks. It is probably inefficient. Another question is how to list such tasks considering several subsets.

@dvkruchinin
Copy link
Contributor

I looked at it. This is similar to a situation that has already occurred (https://github.com/openvinotoolkit/cvat/pull/3001/files). In this PR, a horizontal scroll bar appears.
Crop polygon properly -- Testing issue 2992 -- Draw a polygon with vertices outside the image (failed)

Co-authored-by: Boris Sekachev <boris.sekachev@intel.com>
@ActiveChooN
Copy link
Contributor Author

@ActiveChooN
Could you please look at remark lint issues and to cypress tests related with projects? (actions_projects)? They should not failed.

@dvkruchinin
Probably the tests in issues_prs and canvas3d_functionality should not be affected by this patch. It is not clear why them failed. Could you please take a look?

Remark lint failed due to empty bullet list items. I Will check other related test failures.

BTW, should not we paginate project tasks?

Yes, it's a good idea. And better way to do it on a server and just to order tasks by subset and filter by project, then cache responses on a client. But it looks like a separate feature.

@bsekachev bsekachev merged commit a17d054 into develop May 25, 2021
@bsekachev bsekachev deleted the dk/fix-issue-3128 branch May 25, 2021 09:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

With big amount of projects/tasks Projects page get slow to open and makes too much api and db requests
3 participants