-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Fixed attributes update on cvat-canvas #8137
Conversation
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughThe recent update to the Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
Quality Gate passedIssues Measures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- cvat-canvas/src/typescript/canvasView.ts (2 hunks)
Additional comments not posted (3)
cvat-canvas/src/typescript/canvasView.ts (3)
2401-2402
: Improvement: Mapping of attribute IDs to names.The introduction of the
attrNames
mapping improves readability and maintainability by making attribute name lookups more efficient.
2408-2408
: Correctness: Ensure attribute name exists.Before updating the text content, ensure that the attribute name exists in the
attrNames
mapping to avoid potential runtime errors.- span.textContent = `${attrNames[attrID]}: ${state.attributes[attrID]}`; + if (attrNames[attrID]) { + span.textContent = `${attrNames[attrID]}: ${state.attributes[attrID]}`; + }
2986-2986
: Improvement: Mapping of attribute IDs to names.The introduction of the
attrNames
mapping improves readability and maintainability by making attribute name lookups more efficient.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #8137 +/- ##
===========================================
- Coverage 83.62% 83.27% -0.35%
===========================================
Files 383 389 +6
Lines 40507 41272 +765
Branches 3830 3855 +25
===========================================
+ Hits 33873 34369 +496
- Misses 6634 6903 +269
|
Motivation and context
Resolved #8133
How has this been tested?
Checklist
develop
branch(cvat-canvas,
cvat-core,
cvat-data and
cvat-ui)
License
Feel free to contact the maintainers if that's a concern.
Summary by CodeRabbit