Releases: toss/overlay-kit
[email protected]
[email protected]
Patch Changes
- #190
de244a0Thanks @healtheloper! - chore: add use client banner to build configuration
[email protected]
Patch Changes
-
#187
c3dfcf1Thanks @jungpaeng! - Fixed a bug where overlays could not be reopened after closing with the same ID.Fixed Issues
- Resolved issue where overlays would not display when reopened with the same
overlayIdafter being closed - Improved mounting state tracking with added
isMountedproperty in overlay state management - Added state change detection logic to ensure proper reopen handling
Changes
- Added
isMountedproperty toOverlayItemtype for better mounting state tracking - Enhanced
ADDaction in reducer to handle reopening of existing closed overlays - Implemented automatic reopen mechanism through state comparison in
OverlayProvider - Added test cases for overlay reopen scenarios
This fix ensures overlays work as expected when closing and reopening them.
- Resolved issue where overlays would not display when reopened with the same
[email protected]
Patch Changes
-
#185
f261784Thanks @jungpaeng! - fix: prevent unnecessary re-renders of existing overlays with memoPrevent unnecessary re-renders of existing overlays when new overlays are opened, improving performance.
Key Changes
- Added React.memo: Applied memo to overlay controller component to prevent re-renders when props haven't changed
- Integrated state management: Streamlined state management by integrating it directly into the component and removing redundant prop passing
Performance Improvements
- Eliminated unnecessary re-renders of existing overlays when adding new overlays in multi-overlay scenarios
- Provides more predictable and maintainable state management flow
- Maintained existing API compatibility while optimizing internal performance
This change maintains backward compatibility and provides performance improvements without requiring any code changes from users.
-
#183
579abafThanks @jungpaeng! - test: fix duplicate overlayId error message expectationUpdated test case to match the actual implementation where duplicate overlayId error messages now include the specific overlayId value for better debugging experience.
[email protected]
Patch Changes
-
#145
1a5d4bbThanks @gwagjiug! - fix: remove unnecessary type assertion from Context.Provider -
#167
b19f2c6Thanks @jiji-hoon96! - refactor: Extract determine current overlay logic to a utility function -
#158
a6e2f15Thanks @jiji-hoon96! - refactor: Replace map with forEach in event emitter -
#168
4f70bdbThanks @DongGukMon! - feat: extend environment guard to recognise React Native -
#173
617b0a0Thanks @dayongkr! - Enhance error message for duplicated id
[email protected]
Patch Changes
-
#161
ec07614Thanks @jungpaeng! - feat: Change to allow each overlay provider to have a unique event IDEach overlay provider now uses a unique event ID instead of relying on shared global identifiers.
This change improves event handling accuracy and avoids potential collisions when managing multiple overlays from different providers.
It is backward-compatible for existing overlays that do not explicitly set a provider-specific ID.
[email protected]
Minor Changes
- #149
a98a312Thanks @jungpaeng! - refactor: migrate event based store
Patch Changes
-
#151
07f42a5Thanks @jungpaeng! - feat: Add component keyFixed an issue with overlay components not properly remounting when unmounted and immediately reopened with the same ID.
Added a newcomponentKeyproperty that's separate fromoverlayIdto ensure React properly handles component lifecycle. Each timeoverlay.open()is called, a new randomcomponentKeyis generated internally even when reusing the sameoverlayId.This fix resolves scenarios where calling
unmount()followed byopen()with the same overlay ID in quick succession would result in the overlay not being visible to users.
[email protected]
Minor Changes
-
8c4d54dThanks @jungpaeng! - feat: export types from content-overlay-controllerExport
OverlayControllerComponentandOverlayAsyncControllerComponenttypes from content-overlay-controller module for better type accessibility in consumer projects.
[email protected]
[email protected]
Patch Changes
-
#113
b57d15bThanks @jungpaeng! - Improve overlay unmount logic and add test cases- Enhanced current overlay state management during unmount
- When unmounting a middle overlay with multiple overlays open, the last overlay becomes current
- When unmounting the last overlay, the previous overlay becomes current
- Added test cases
- Test for unmounting multiple overlays in different orders
- Test for tracking current overlay state using useCurrentOverlay hook
- Enhanced current overlay state management during unmount