refactor(packages): simplify and clarify overlay-related types and constants #92
+80
−81
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
this pull request refactors and standardizes the overlay store and event handling logic for improved type safety, maintainability, and clarity. the following changes have been applied across multiple files to ensure consistent usage of types and improve the developer experience.
Changes
general improvements
overlayItem['id']
for overlayid across all relevant files. this ensures type consistency and eliminates redundant type definitions.file-specific changes
store.ts
overlayId
tooverlayItemId
for better semantic clarity.overlayData
tooverlayState
to align with its usage as the application’s overlay state.overlayOrderList
→orderIds
overlayData
→data
registerOverlaysStore
→registerOverlayStore
use-sync-overlay-store.ts
registerOverlaysStore
toregisterOverlayStore
.event.ts
overlayId
type tooverlayItem['id']
in all related function definitions:open
openAsync
close
unmount
Motivation and Context
this refactor improves the overall maintainability and type safety of the overlay system:
overlayItem['id']
ensures that all references to id maintain a single source of truth.overlayData
→overlayState
andoverlayOrderList
→orderIds
make the codebase easier to understand and navigate.this change is part of a larger effort to enhance code quality and maintainability across the project.
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist
Further Comments
this refactor does not introduce new functionality but focuses on improving the maintainability and readability of the overlay system. any future changes to the overlay store or related logic will benefit from the increased type safety and consistency established in this pr.