-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
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 66.72% 60.10% -6.63%
===========================================
Files 786 554 -232
Lines 60312 38855 -21457
Branches 10255 10290 +35
===========================================
- Hits 40242 23352 -16890
+ Misses 20067 15500 -4567
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:
|
✅ 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.
|
…an be handled properly
nass600
left a comment
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.
Great push 👏 . Other than trying to avoid the multiple modal definitions on top of core for the libraries looks amazing
web/libs/app-common/src/pages/AccountSettings/sections/PersonalJWTToken.tsx
Outdated
Show resolved
Hide resolved
web/libs/app-common/src/pages/AccountSettings/hooks/useHotkeys.ts
Outdated
Show resolved
Hide resolved
web/libs/app-common/src/pages/AccountSettings/sections/Hotkeys/Help.tsx
Outdated
Show resolved
Hide resolved
…tton delete main action button look
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.scssto rely on the styles from@humansignal/ui, ensuring consistent appearance and reducing duplicated CSS. (web/apps/labelstudio/src/components/Modal/Modal.scssweb/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.