Skip to content

Conversation

@jpggvilaca
Copy link
Contributor

@jpggvilaca jpggvilaca commented Oct 21, 2025

📝 Description

  • Pressing "n" should now assign "Empty" label for Detection project and "No object" for segmentation projects
Screenshot 2025-10-21 at 15 53 52

✨ Type of Change

Select the type of change your PR introduces:

  • 🐞 Bug fix – Non-breaking change which fixes an issue
  • 🚀 New feature – Non-breaking change which adds functionality
  • 🔨 Refactor – Non-breaking change which refactors the code base
  • 💥 Breaking change – Changes that break existing functionality
  • 📚 Documentation update
  • 🔒 Security update
  • 🧪 Tests

🧪 Testing Scenarios

Describe how the changes were tested and how reviewers can test them too:

  • ✅ Tested manually
  • 🤖 Run automated end-to-end tests

✅ Checklist

Before submitting the PR, ensure the following:

  • 🔍 PR title is clear and meaningful
  • ✍️ PR description clearly explains the changes and their reason
  • 📝 I have linked the PR to the corresponding GitHub Issues, if any
  • 💬 I have commented my code, especially in hard-to-understand areas
  • 📄 I have made corresponding changes to the documentation
  • ✅ I have added tests that prove my fix is effective or my feature works

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a new hotkey ('n') to assign an empty label to selected annotations in the annotator interface. This feature enables users to quickly assign empty labels without manually clicking through the UI.

Key changes:

  • Added 'empty-label' hotkey action type and default key binding ('n')
  • Implemented hotkey handler that assigns empty label to selected annotations when triggered

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
web_ui/src/pages/annotator/providers/annotator-provider/utils.ts Added 'empty-label' to HotKeyActions type and DefaultHotkeys configuration with 'n' key binding
web_ui/src/pages/annotator/components/primary-toolbar/hot-keys-button/use-availability-of-hotkeys.hook.ts Enabled the 'empty-label' hotkey by setting its availability to true
web_ui/src/pages/annotator/components/main-content/labels-shortcuts/labels-shortcuts.component.tsx Implemented the hotkey handler that finds the empty label and assigns it to selected annotations

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

(event) => {
event.preventDefault();

if (emptyLabel && selectedAnnotations.length > 0) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is the check being made on the selected annotations? For detection and segmentation the empty label can also be when the user has no annotations selected - for local annotation projects we always replace the whole scene with a single "full image" annotation that only has the empty label.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

True! I wasnt 100% sure. Updated :)

dwesolow
dwesolow previously approved these changes Oct 22, 2025
@jpggvilaca jpggvilaca added this pull request to the merge queue Oct 22, 2025
Merged via the queue into main with commit 671a6f8 Oct 22, 2025
28 checks passed
@jpggvilaca jpggvilaca deleted the jvilaca/add-hotkey-empty-label branch October 22, 2025 07:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants