-
Notifications
You must be signed in to change notification settings - Fork 202
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[GEN-1977]: improve SSE, and add SSE to UI E2E tests (#1991)
This pull request includes several changes to the frontend web application, focusing on codebase simplification and consistency improvements. The most important changes involve the refactoring of notification types, the use of hooks, and the modification of various components to enhance maintainability and readability. ### Notification Type Refactoring: * Updated notification types to use `NOTIFICATION_TYPE` enum across multiple components for consistency (`frontend/webapp/components/modals/cancel-warning/index.tsx`, `frontend/webapp/components/modals/delete-warning/index.tsx`, `frontend/webapp/containers/main/destinations/add-destination/index.tsx`, `frontend/webapp/containers/main/destinations/destination-form-body/index.tsx`, `frontend/webapp/containers/main/instrumentation-rules/rule-drawer/index.tsx`). [[1]](diffhunk://#diff-c197a79280b54ef188b35a5e804a91ff95db0b8137b0f2c7f8dacd545a4f4650L21-R22) [[2]](diffhunk://#diff-4f8fac3da993d379d6710a6607b6f25708649cb2da5b4a5f433f8e62dde1d03fL27-R27) [[3]](diffhunk://#diff-a5ff632e01d3e161b70dce2f959db69fd1893edb484af12b7849810487347001L96-R97) [[4]](diffhunk://#diff-dfeb6d04b2e764197b17375e8347405ed7c67a7d706a34b6a2eaf09582e3b52cL90-R94) [[5]](diffhunk://#diff-759940924dd4ee0c6895f60e21ca040542d9cf1d3f69162677c9983d62b12f8cL77-R77) ### Hook Usage: * Removed `useSSE` hook from `layout.tsx` and added it to `overview/page.tsx` to optimize its usage (`frontend/webapp/app/layout.tsx`, `frontend/webapp/app/(overview)/overview/page.tsx`). [[1]](diffhunk://#diff-788a38ec94bfca9467b13cb6eb93cdeccd4237facfb5fff310e05b3af67413efL4) [[2]](diffhunk://#diff-788a38ec94bfca9467b13cb6eb93cdeccd4237facfb5fff310e05b3af67413efL18-L19) [[3]](diffhunk://#diff-b5ae53796816cc6e1e253bb851d6a2fa404789188ea7964c716ee2ebcbcb776eR4-R13) * Added `useConfig` hook to `page.tsx` and refactored notification logic to use `useNotificationStore` (`frontend/webapp/app/page.tsx`). ### Component Refactoring: * Simplified `AddEntity` component by updating prop names and using `useComputePlatform` hook (`frontend/webapp/components/overview/add-entity/index.tsx`). [[1]](diffhunk://#diff-c2573243562745e61986b398f50211fc364b6391e2a2d792f518a72a86b44ea2R1-R8) [[2]](diffhunk://#diff-c2573243562745e61986b398f50211fc364b6391e2a2d792f518a72a86b44ea2L68-R74) [[3]](diffhunk://#diff-c2573243562745e61986b398f50211fc364b6391e2a2d792f518a72a86b44ea2L94-R94) * Refactored `NotificationManager` component to use `NOTIFICATION_TYPE` and added data attributes for testing (`frontend/webapp/components/notification/notification-manager.tsx`). [[1]](diffhunk://#diff-57b5151297ef94f210fd8223cf1e64f73a19c43cc5f57f94cc74338251942c35L9-R9) [[2]](diffhunk://#diff-57b5151297ef94f210fd8223cf1e64f73a19c43cc5f57f94cc74338251942c35L85-R92) [[3]](diffhunk://#diff-57b5151297ef94f210fd8223cf1e64f73a19c43cc5f57f94cc74338251942c35L129-R129) [[4]](diffhunk://#diff-57b5151297ef94f210fd8223cf1e64f73a19c43cc5f57f94cc74338251942c35L178-R178) ### Import and Type Adjustments: * Consolidated imports and types in various files to improve code readability and maintainability (`frontend/webapp/containers/main/destinations/add-destination/index.tsx`, `frontend/webapp/containers/main/destinations/destination-form-body/index.tsx`, `frontend/webapp/containers/main/destinations/destination-form-body/test-connection/index.tsx`, `frontend/webapp/containers/main/instrumentation-rules/rule-drawer/index.tsx`). [[1]](diffhunk://#diff-a5ff632e01d3e161b70dce2f959db69fd1893edb484af12b7849810487347001R5-L13) [[2]](diffhunk://#diff-dfeb6d04b2e764197b17375e8347405ed7c67a7d706a34b6a2eaf09582e3b52cL4-R7) [[3]](diffhunk://#diff-dfeb6d04b2e764197b17375e8347405ed7c67a7d706a34b6a2eaf09582e3b52cL37-R37) [[4]](diffhunk://#diff-f3cd3c3f26599e006f302fa0cafb3d46211d3a0a766cf835013289cde7b63100L6-R21) [[5]](diffhunk://#diff-759940924dd4ee0c6895f60e21ca040542d9cf1d3f69162677c9983d62b12f8cL5-R12) ### Additional Changes: * Added missing imports and adjusted component structures for better alignment with project conventions (`frontend/webapp/components/modals/delete-warning/index.tsx`, `frontend/webapp/containers/main/instrumentation-rules/rule-modal/index.tsx`). [[1]](diffhunk://#diff-4f8fac3da993d379d6710a6607b6f25708649cb2da5b4a5f433f8e62dde1d03fL2-R3) [[2]](diffhunk://#diff-183ce38153926d5ca73d74249c98e035a00de4a376645a10bc098c181636c501R4) [[3]](diffhunk://#diff-183ce38153926d5ca73d74249c98e035a00de4a376645a10bc098c181636c501L61-R62)
- Loading branch information
1 parent
851beb4
commit fc8ed14
Showing
41 changed files
with
238 additions
and
277 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.