-
Notifications
You must be signed in to change notification settings - Fork 3.1k
chore: FIT-773: [FE] Refactor Modal components to avoid problematic imports #8626
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
base: develop
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for label-studio-playground ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #8626 +/- ##
===========================================
- Coverage 67.09% 59.77% -7.33%
===========================================
Files 786 516 -270
Lines 60311 37613 -22698
Branches 10254 10055 -199
===========================================
- Hits 40467 22483 -17984
+ Misses 19841 15130 -4711
+ Partials 3 0 -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:
|
✅ Deploy Preview for label-studio-docs-new-theme canceled.
|
✅ Deploy Preview for label-studio-storybook ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for heartex-docs canceled.
|
This pull request refactors the modal implementation across the Label Studio frontend codebase to use the standardized modal components and APIs from
@humansignal/ui
. The changes remove custom modal logic, consolidate modal usage, and ensure all modals are wrapped with the necessary application providers for consistency and maintainability. This improves code reuse, simplifies future updates, and enhances backward compatibility.Modal System Refactor and Standardization
Modal.jsx
,ModalPopup.jsx
, and related files to use the standardized modal API from@humansignal/ui
, removing custom modal rendering and lifecycle management. (web/apps/labelstudio/src/components/Modal/Modal.jsx
[1]web/apps/labelstudio/src/components/Modal/ModalPopup.jsx
[2]web/libs/datamanager/src/components/Common/Modal/Modal.jsx
[3]Modal.tsx
,ModalPopup.tsx
) that automatically inject Label Studio-specific providers (likeApiProvider
,ConfigProvider
, etc.) into every modal for backward compatibility and seamless integration. (web/apps/labelstudio/src/components/Modal/Modal.tsx
[1]web/apps/labelstudio/src/components/Modal/ModalPopup.tsx
[2]Codebase Cleanup and Consistency
Modal.scss
to rely on the styles from@humansignal/ui
, ensuring consistent appearance and reducing duplicated CSS. (web/apps/labelstudio/src/components/Modal/Modal.scss
web/apps/labelstudio/src/components/Modal/Modal.scssL1-L160)StorageProviderForm
,AccountSettings
, and JWT Token sections) to use the new modal API from@humansignal/ui
, eliminating legacy imports and ensuring consistent provider injection. (web/libs/app-common/src/blocks/StorageProviderForm/index.tsx
[1] [2];web/libs/app-common/src/pages/AccountSettings/hooks/useHotkeys.ts
[3];web/libs/app-common/src/pages/AccountSettings/sections/Hotkeys/Help.tsx
[4] [5];web/libs/app-common/src/pages/AccountSettings/sections/PersonalJWTToken.tsx
[6]These changes make modal usage more robust, easier to maintain, and aligned with the shared UI library, reducing technical debt and improving developer experience.