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

Added automatic saving for settings and persistent storage for image filter settings #9032

Merged
merged 14 commits into from
Feb 13, 2025

Conversation

klakhov
Copy link
Contributor

@klakhov klakhov commented Jan 31, 2025

Motivation and context

  • Removed save button on the settings modal, now settings are auto saved
  • Added serialization for image processing filters so they can be restored automatically

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)

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.

@klakhov klakhov added the ui/ux label Jan 31, 2025
@klakhov klakhov requested a review from bsekachev as a code owner January 31, 2025 12:17
@codecov-commenter
Copy link

codecov-commenter commented Feb 3, 2025

Codecov Report

Attention: Patch coverage is 88.23529% with 6 lines in your changes missing coverage. Please review.

Project coverage is 73.95%. Comparing base (a8ce52b) to head (7c8f77b).
Report is 1 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #9032   +/-   ##
========================================
  Coverage    73.95%   73.95%           
========================================
  Files          428      428           
  Lines        44532    44582   +50     
  Branches      3881     3890    +9     
========================================
+ Hits         32933    32972   +39     
- Misses       11599    11610   +11     
Components Coverage Δ
cvat-ui 77.52% <88.23%> (+<0.01%) ⬆️
cvat-server 71.00% <ø> (ø)

@klakhov klakhov requested a review from nmanovic as a code owner February 4, 2025 06:44

export function restoreSettingsAsync(): ThunkAction {
return async (dispatch, getState): Promise<void> => {
const state: CombinedState = getState();
Copy link
Member

@bsekachev bsekachev Feb 11, 2025

Choose a reason for hiding this comment

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

I understand that you just copypasted the code, but the current implementation looks mind blowing. So, if you have ideas how it can be refactored, you are welcome

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I refactored parts related to the player, workspace, and image filter settings restoration—now the code looks cleaner.

As for the part that is handling shortcuts, where we currently have four nested loops—yes, it definitely needs refactoring. Ideally, conflictDetector should find all conflicts without requiring additional iterations. However, tackling this now feels a bit overwhelming. I'll work on it in a separate PR.

For now, let's focus on merging this customer request.

Copy link

@klakhov klakhov merged commit 2cba4d3 into develop Feb 13, 2025
34 checks passed
@cvat-bot cvat-bot bot mentioned this pull request Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants