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

[Refactoring] Update id naming convention #9206

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from

Conversation

klakhov
Copy link
Contributor

@klakhov klakhov commented Mar 13, 2025

Motivation and context

For a long time we now have been using *ID naming convention for id variables, but in some code that was added before this, some variables keep *Id naming convention. This PR tries to unify it.

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 Mar 13, 2025
@klakhov klakhov requested a review from bsekachev March 13, 2025 10:51
@codecov-commenter
Copy link

codecov-commenter commented Mar 13, 2025

Codecov Report

Attention: Patch coverage is 84.48276% with 9 lines in your changes missing coverage. Please review.

Project coverage is 74.13%. Comparing base (17bb612) to head (3662425).
Report is 2 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #9206      +/-   ##
===========================================
- Coverage    74.14%   74.13%   -0.01%     
===========================================
  Files          428      428              
  Lines        44973    44971       -2     
  Branches      3917     3917              
===========================================
- Hits         33345    33340       -5     
- Misses       11628    11631       +3     
Components Coverage Δ
cvat-ui 77.21% <84.48%> (-0.02%) ⬇️
cvat-server 71.58% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@bsekachev
Copy link
Member

For a long time we now have been using *ID naming convention

First of all, I can't remember any discussions regarding naming conventions.

Anyway, we may follow Id, or ID, it is discussable (chat GPT recommends using resourceId BTW as it corresponds to camel case. However I would split that patch into two:

  1. Renaming just variables, easy to review
  2. Renaming object properties, class properties, etc. This change will break something in enterprise repos or something untested and needs to be reviewed carefully.

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