-
Notifications
You must be signed in to change notification settings - Fork 3k
feat: FIT-450: Improve empty state for data manager #8149
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
feat: FIT-450: Improve empty state for data manager #8149
Conversation
…g and drop and browse to upload functionality.
…d results filter empty state. Adds inbox icon.
✅ Deploy Preview for label-studio-docs-new-theme canceled.
|
✅ Deploy Preview for label-studio-playground canceled.
|
✅ Deploy Preview for heartex-docs canceled.
|
✅ Deploy Preview for label-studio-storybook canceled.
|
Codecov Report✅ All modified and coverable lines are covered by tests.
Additional details and impacted files@@ Coverage Diff @@
## develop #8149 +/- ##
===========================================
- Coverage 70.58% 64.26% -6.33%
===========================================
Files 725 725
Lines 52670 52670
Branches 9015 9015
===========================================
- Hits 37179 33846 -3333
- Misses 15488 18821 +3333
Partials 3 3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Pull Request Overview
Improves empty state functionality for Data Manager by implementing role-based empty states and enhanced import functionality. This provides better guidance to users based on their permissions and project state.
- Unified empty state component that handles different user roles (REVIEWER, ANNOTATOR) and project states
- Enhanced drag-and-drop functionality with improved UI feedback and file import capabilities
- Updated modal dialogs with improved destructive action patterns and better button styling
Reviewed Changes
Copilot reviewed 14 out of 15 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
web/libs/ui/src/assets/icons/index.ts | Exports new IconInbox icon for empty states |
web/libs/datamanager/src/sdk/dm-sdk.js | Adds role property to DataManager configuration |
web/libs/datamanager/src/components/MainView/DataView/tests/EmptyState.test.tsx | Test coverage for EmptyState component accessibility features |
web/libs/datamanager/src/components/MainView/DataView/Table.scss | Adds dropzone styling with drag-and-drop visual feedback |
web/libs/datamanager/src/components/MainView/DataView/Table.jsx | Integrates unified EmptyState component with role-based functionality |
web/libs/datamanager/src/components/MainView/DataView/EmptyState.jsx | New unified empty state component with role-based UI and import functionality |
web/libs/datamanager/src/components/DataManager/Toolbar/ActionsButton.jsx | Updates action dialogs with improved destructive action patterns |
web/libs/datamanager/src/components/Common/Modal/Modal.scss | Increases modal width for better content display |
web/libs/datamanager/src/components/Common/Modal/Modal.jsx | Updates modal buttons to use new variant system |
web/libs/datamanager/src/components/Common/Menu/MenuItem.jsx | Adds variant prop while maintaining backward compatibility |
web/apps/labelstudio/src/pages/Settings/StorageSettings/StorageSettings.jsx | Adds auto-open functionality for source storage modal |
web/apps/labelstudio/src/pages/Settings/StorageSettings/StorageSet.jsx | Implements ref forwarding for programmatic modal opening |
web/apps/labelstudio/src/pages/DataManager/DataManager.jsx | Adds event handlers for storage modal and file import functionality |
web/apps/labelstudio/src/pages/CreateProject/Import/Import.jsx | Handles auto-start import when files are provided via event |
Comments suppressed due to low confidence (1)
web/libs/datamanager/src/components/MainView/DataView/EmptyState.jsx:294
- Direct access to global window.APP_SETTINGS creates tight coupling and makes testing difficult. Consider passing this as a prop or using a context/configuration provider.
)}
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
web/libs/datamanager/src/components/MainView/DataView/EmptyState.jsx
Outdated
Show resolved
Hide resolved
web/libs/datamanager/src/components/MainView/DataView/EmptyState.jsx
Outdated
Show resolved
Hide resolved
The EmptyState component was updated to use 'userRole' instead of 'role' to avoid ARIA role conflicts, but Table.jsx was still passing 'role'. This caused the Reviewer role to show the default empty state instead of the role-specific content.
- Annotators with auto-distribution now see role-specific empty state even when filters are applied, instead of generic filter message - Filter empty state now only applies to Owners/Admins/Managers - Fixed logic order: role-specific checks first, then filter checks - Updated both EmptyState.tsx files to maintain consistency - Cleared caches to ensure fresh component loading
This will help identify why hasFilters is incorrectly true when no filters are applied. Check console for 'DEBUG hasFilters' messages to see the filtersApplied value.
This reverts commit 9daee6d.
/git merge
|
/git merge
|
…e file and test file.
… the removed empty state functionality.
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.
@ricardoantoniocm Looks good. I believe this EmptyState could be promoted to the Design System as we have it spread all over the app
/git merge
|
/git merge
|
/fm sync |
This PR was automatically generated via Follow Merge. Workflow Run
Please ensure that all linked upstream Pull Requests are merged before proceeding with this one.
Reason for change
This PR addresses the user experience of the data manager's empty state. The previous "blank" state was unhelpful and didn't provide users with clear guidance on how to get started. This change introduces a new, comprehensive empty state component that is more informative.
The new component provides different messaging and actions based on the context:
This improvement enhances the user experience by providing a clear path forward, reducing friction for new users, and improving usability for existing users.
The Connect Storage button pushes the user to the Cloud Storages page and automatically opens the Add Source Storage modal, streamlining the process. It also leverages the Import modal for processing any uploaded files.
This PR also introduces improvements to the destructive confirmation dialogs used in the Data Manager, fixing the variants of the buttons as well as implementing more meaningful copy on the title, body text and buttons.
Screenshots
Before
Empty State

No results from filters

Destructive DM Actions

After
Empty State

No results from filters

Destructive DM Actions

Rollout strategy
EmptyState
component will be deployed as part of the normal release cycle.Testing
I've conducted the following testing to ensure the new component works as expected:
EmptyState
component, covering all display modes and props.DataManager
andTable
components.Reviewer notes