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

Upgrade React and Antd till the latest version #7466

Merged
merged 77 commits into from May 23, 2024
Merged

Conversation

bsekachev
Copy link
Member

@bsekachev bsekachev commented Feb 9, 2024

Motivation and context

  • Annotation menu
  • OpenCV is not loaded automatically
  • Eslint
  • Stylelint
  • Tests

How has this been tested?

Checklist

  • I submit my changes into the develop branch
  • I have created a changelog fragment
  • I have updated the documentation accordingly
  • I have added tests to cover my changes
  • I have linked related issues (see GitHub docs)
  • I have increased versions of npm packages if it is necessary
    (cvat-canvas,
    cvat-core,
    cvat-data and
    cvat-ui)

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.

@bsekachev bsekachev closed this Feb 9, 2024
@bsekachev bsekachev reopened this Feb 9, 2024
@bsekachev
Copy link
Member Author

/check

Copy link
Contributor

github-actions bot commented Feb 9, 2024

❌ Some checks failed
📄 See logs here

@bsekachev bsekachev changed the title Upgrade react from 16 to 18 Upgrade React and Antd till the latest version Feb 9, 2024
bsekachev and others added 12 commits February 13, 2024 11:58
<!-- Raise an issue to propose your change
(https://github.com/opencv/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://opencv.github.io/cvat/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. -->
This is a preparatory PR before I add more events.

### 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
- ~~[ ] 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~~
- ~~[ ] 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))~~
- ~~[ ] I have increased versions of npm packages if it is necessary

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

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

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

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

### License

- [x] I submit _my code changes_ under the same [MIT License](
https://github.com/opencv/cvat/blob/develop/LICENSE) that covers the
project.
  Feel free to contact the maintainers if that's a concern.
By default failed rq jobs are kept for 1 year. It is too long and leads
to keeping a lot of unnecessary results in Redis.
…ansaction (#7460)

Non-database actions like deleting directories, sending webhooks,
scheduling reports should only be done after the current transaction is
committed. If we do it immediately, and the transaction is later
aborted, then we will have (for example) sent a webhook about an event
that didn't actually happen.

There's also a secondary benefit to moving this action outside of the
transaction; the less time we spend inside a transaction, the better,
since a transaction may lock out other clients from working on the
affected DB rows.

In addition, prevent the affected actions from crashing the view handler
with an exception (using the `robust=True` option). I don't think it's
reasonable to (for example) return a 500 response to a `PATCH` request
just because we failed to send the corresponding webhook.

There is one more type of action that should be modified in this way
(sending events), but it would be easier to do that after a refactoring
that I did in another patch, so I'll do it later.
@bsekachev bsekachev removed the request for review from azhavoro May 9, 2024 13:10
Copy link
Contributor

@klakhov klakhov left a comment

Choose a reason for hiding this comment

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

Sidepanel became white:
image

cvat-ui/src/components/actions-menu/styles.scss Outdated Show resolved Hide resolved
cvat-ui/src/components/actions-menu/styles.scss Outdated Show resolved Hide resolved
cvat-ui/src/components/analytics-page/styles.scss Outdated Show resolved Hide resolved
Copy link
Contributor

@klakhov klakhov left a comment

Choose a reason for hiding this comment

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

There is something wrong with initial position of opencv tool popup
opencvplacement

@bsekachev
Copy link
Member Author

@klakhov Applied

Copy link
Contributor

@klakhov klakhov left a comment

Choose a reason for hiding this comment

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

Exclamation mark and excessive left padding now appear on organization switch modal. Also I cant close it without selecting something new
image

Do we really want to use blue hover effect? I think it doesn't stand out enough on gray background. Maybe we can use scaling effect instead.
image

Here I suppose using bold black font would be better instead of blue too.
image

If we dont have an assignee, maybe we dont want to show the line with it at all? Or at least say something like not assigned so we dont have emty space.
I like the idea of showing stage+state in one status row like annotation in progress or annotation rejected, it looks cool. But it looks strange with new, maybe we should use an alias for that something like annotation not started.
image

Small padding problem on models page(it seems the same problem is on the projects page):
image

Major version update for package.json?

cvat-ui/src/components/header/header.tsx Outdated Show resolved Hide resolved
@bsekachev
Copy link
Member Author

bsekachev commented May 16, 2024

Exclamation mark and excessive left padding now appear on organization switch modal

I believe this is new antd style:
image

Major version update for package.json?

I do not see reasons to update major version. Generally all the changes are cosmetic.

@bsekachev
Copy link
Member Author

Also I cant close it without selecting something new

Applied

Do we really want to use blue hover effect?

Default antd button, I reversed it as it was with custom css.

Here I suppose using bold black font would be better instead of blue too.

The same.

If we dont have an assignee, maybe we dont want to show the line with it at all? Or at least say something like not assigned so we dont have emty space.

The main idea is to keep height the same. Sliding bottom part is annoying a little bit.

I like the idea of showing stage+state in one status row like annotation in progress or annotation rejected, it looks cool. But it looks strange with new, maybe we should use an alias for that something like annotation not started.

The main idea behind it was to keep vertical space, using horizontal free space. I would avoid customizing logic in described way.

Small padding problem on models page(it seems the same problem is on the projects page):

Fixed on projects/jobs/models. Also fixed top bars on different resolutions.

@codecov-commenter
Copy link

codecov-commenter commented May 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.35%. Comparing base (f1341d5) to head (eee0294).
Report is 1 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #7466      +/-   ##
===========================================
- Coverage    83.38%   83.35%   -0.03%     
===========================================
  Files          380      381       +1     
  Lines        40034    40051      +17     
  Branches      3769     3769              
===========================================
+ Hits         33382    33386       +4     
- Misses        6652     6665      +13     
Components Coverage Δ
cvat-ui 79.27% <100.00%> (-0.05%) ⬇️
cvat-server 87.12% <ø> (ø)

Copy link
Contributor

@klakhov klakhov left a comment

Choose a reason for hiding this comment

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

Looks good!

@bsekachev bsekachev merged commit 0ea15b5 into develop May 23, 2024
32 checks passed
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.

None yet

6 participants