-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Enhanced labels mapping on client #8251
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 changes enhance the CVAT application by improving the labels mapping feature, particularly for skeleton annotations. New functionalities enable users to assign attributes to skeleton points, while the UI and underlying logic of the labels mapper and object mapper components have been refined. These adjustments streamline the mapping process and improve usability, ensuring a more flexible and visually coherent user experience. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant UI as CVAT UI
participant Mapper as LabelsMapperComponent
participant Model as ModelFunction
User->>UI: Initiate mapping
UI->>Mapper: Request mapping details
Mapper-->>UI: Provide updated mapping
User->>Model: Submit skeleton with attributes
Model-->>Mapper: Return skeleton with sublabel attributes
Mapper-->>UI: Update UI with new mappings
Assessment against linked issues
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 Configuration File (
|
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 (4)
- changelog.d/20240801_154204_boris_enhanced_labels_mapping.md (1 hunks)
- cvat-ui/src/components/model-runner-modal/labels-mapper.tsx (9 hunks)
- cvat-ui/src/components/model-runner-modal/object-mapper.tsx (4 hunks)
- cvat-ui/src/components/model-runner-modal/styles.scss (3 hunks)
Additional comments not posted (12)
changelog.d/20240801_154204_boris_enhanced_labels_mapping.md (2)
1-1
: LGTM!The new section "Added" is correctly added to the changelog.
3-4
: LGTM!The changelog entry clearly describes the new feature and provides a link to the relevant pull request.
cvat-ui/src/components/model-runner-modal/styles.scss (3)
17-34
: LGTM!The
.tree-display
class is well-defined and consistent with the intended design. It includes relative positioning, a left border, and a pseudo-element for non-first children.
Line range hint
35-53
: LGTM!The
.cvat-runner-label-mapper
class extends.tree-display
for consistent styling and includes additional styles for text alignment and overflow management.
57-65
: LGTM!The
.cvat-runner-attribute-mapper
class extends.tree-display
for consistent styling and includes additional styles for margin and padding management.cvat-ui/src/components/model-runner-modal/object-mapper.tsx (2)
23-23
: LGTM!The new prop
containerTitle
is correctly added to theProps
interface and is of typestring
.
74-76
: LGTM!The
containerTitle
prop is correctly integrated within the component and ensures consistent styling with other text elements.cvat-ui/src/components/model-runner-modal/labels-mapper.tsx (5)
88-97
: LGTM!The
getMappingItem
function is well-implemented and enhances the readability and maintainability of the code.
99-121
: LGTM!The
updateSublabelAttributesMapping
function is well-implemented and ensures that sublabel attributes are correctly mapped without resetting existing mappings.
123-138
: LGTM!The
updateSublabelsMapping
function is well-implemented and ensures that sublabels are correctly mapped without resetting existing mappings.
39-42
: LGTM! Verify the usage ofLabelType
constants.The updated logic for label compatibility looks good. Ensure that the
LabelType
constants are correctly defined and used throughout the codebase.
Line range hint
178-191
:
LGTM! Verify the integration of helper functions.The updates to the
LabelsMapperComponent
enhance its functionality and maintainability. Ensure that the new helper functions are correctly integrated and tested.Verification successful
Let's correct the file type specification and re-run the script to verify the integration of the helper functions.
LGTM! The helper functions are correctly integrated within the
LabelsMapperComponent
.The functions
getMappingItem
,updateSublabelAttributesMapping
, andupdateSublabelsMapping
are used appropriately withincvat-ui/src/components/model-runner-modal/labels-mapper.tsx
.
- The functions are utilized to manage mappings between model labels and task labels, including sublabels and attributes.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the integration of helper functions within the `LabelsMapperComponent`. # Test: Search for the usage of helper functions. Expect: Correct integration in relevant files. rg --type tsx -A 5 $'getMappingItem|updateSublabelAttributesMapping|updateSublabelsMapping'Length of output: 120
Script:
#!/bin/bash # Description: Verify the integration of helper functions within the `LabelsMapperComponent`. # Test: Search for the usage of helper functions. Expect: Correct integration in relevant files. rg --type ts -A 5 'getMappingItem|updateSublabelAttributesMapping|updateSublabelsMapping'Length of output: 6583
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #8251 +/- ##
===========================================
- Coverage 83.38% 83.36% -0.02%
===========================================
Files 389 389
Lines 41526 41526
Branches 3856 3856
===========================================
- Hits 34626 34620 -6
- Misses 6900 6906 +6
|
Quality Gate passedIssues Measures |
Motivation and context
Resolved #8213
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
New Features
containerTitle
, to the ObjectMapperComponent for improved usability.Bug Fixes
Style
Documentation