Skip to content

Conversation

@dayongkr
Copy link
Contributor

@dayongkr dayongkr commented Jun 2, 2025

Description

Improved the error message when attempting to open multiple overlays with the same overlayId.

Related Issue: Fixes #172

  • Why is this change required?
    The original error message did not indicate which overlayId was causing the conflict, making it difficult to debug in complex UI scenarios.

  • What problem does it solve?
    Developers can now immediately see which overlayId was duplicated, reducing debugging time.

  • Dependencies: None


Changes

  • Updated the error message in the overlay reducer to include the conflicting overlayId:

    throw new Error(
      `You can't open the multiple overlays with the same overlayId (${action.overlay.id}). Please set a different id.`
    );

Motivation and Context

This change was motivated by recurring developer confusion when encountering the "duplicate overlayId" error without enough context. Including the overlayId directly in the error message makes it immediately actionable and improves DX .


How Has This Been Tested?

None


Screenshots (if appropriate):

Not applicable


Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have performed a self-review of my own code.
  • My code is commented, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.
  • Any dependent changes have been merged and published in downstream modules.

Further Comments

None.

@dayongkr dayongkr requested a review from jungpaeng as a code owner June 2, 2025 10:12
@changeset-bot
Copy link

changeset-bot bot commented Jun 2, 2025

🦋 Changeset detected

Latest commit: fd436bb

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
overlay-kit Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Jun 2, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
overlay-kit ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 11, 2025 2:37am

@dayongkr
Copy link
Contributor Author

dayongkr commented Jun 2, 2025

While developing a service, I found this error message made debugging a bit difficult, so I created an issue and submitted a PR since the fix seemed straightforward.

If there's already another way to identify the overlayId, please let me know!

Copy link
Member

@jungpaeng jungpaeng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@dayongkr
Copy link
Contributor Author

dayongkr commented Jun 5, 2025

As you know, due to limitations in our development environment, I wasn’t able to include the changeset file from the forked repository.

I’d really appreciate it if you could commit it. Thanks!!

@jungpaeng jungpaeng merged commit 617b0a0 into toss:main Jun 11, 2025
7 of 9 checks passed
@github-actions github-actions bot mentioned this pull request Jun 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enhance error message when duplicate overlayId is used

2 participants