Skip to content
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

feat: locally overlay-kit #102

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open

feat: locally overlay-kit #102

wants to merge 11 commits into from

Conversation

jungpaeng
Copy link
Member

@jungpaeng jungpaeng commented Jan 9, 2025

Description

Related Issue: Fixes # (issue_number)

This PR modifies the overlay-kit, which was previously available only globally, to be usable in local environments.

To achieve this, components like OverlayProvider have been adapted into a createOverlayProvider format, making them reusable locally.

Users can now utilize the new function experimental_createOverlayContext, which enables this local usage. However, since this function is experimental, caution is advised when using it.

Changes

  • Transformed OverlayProvider and similar components into createOverlayProvider for local use.
  • Introduced a new function, experimental_createOverlayContext, allowing local context creation for overlays.

Motivation and Context

Previously, the overlay-kit could only be used globally, limiting flexibility in development.

This change enables developers to utilize overlay functionality in localized contexts, enhancing modularity and reusability.

How Has This Been Tested?

  • Manually tested the experimental_createOverlayContext function in local environments to verify its functionality.

Screenshots (if appropriate):

example code

image

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

Since experimental_createOverlayContext is experimental, users should proceed with caution and monitor its behavior in various use cases.

@jungpaeng jungpaeng requested a review from Copilot January 9, 2025 06:43
@jungpaeng jungpaeng self-assigned this Jan 9, 2025
Copy link

changeset-bot bot commented Jan 9, 2025

🦋 Changeset detected

Latest commit: b64faa5

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 Minor

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

Copy link

vercel bot commented Jan 9, 2025

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

Name Status Preview Comments Updated (UTC)
overlay-kit ❌ Failed (Inspect) Jan 13, 2025 6:14am

Choose a reason for hiding this comment

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

Copilot reviewed 5 out of 9 changed files in this pull request and generated no comments.

Files not reviewed (4)
  • packages/src/context/provider.tsx: Evaluated as low risk
  • packages/src/context/use-sync-overlay-store.ts: Evaluated as low risk
  • packages/src/utils/index.ts: Evaluated as low risk
  • packages/src/event.ts: Evaluated as low risk
@codecov-commenter
Copy link

codecov-commenter commented Jan 9, 2025

Codecov Report

Attention: Patch coverage is 92.02454% with 13 lines in your changes missing coverage. Please review.

Project coverage is 84.24%. Comparing base (59f2917) to head (b64faa5).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #102      +/-   ##
==========================================
+ Coverage   81.48%   84.24%   +2.76%     
==========================================
  Files          11       13       +2     
  Lines         243      273      +30     
  Branches       49       55       +6     
==========================================
+ Hits          198      230      +32     
+ Misses         43       40       -3     
- Partials        2        3       +1     
Components Coverage Δ
overlay-kit 84.24% <92.02%> (+2.76%) ⬆️

@XionWCFM
Copy link
Contributor

I really needed this feature. I want to try it 🔥

@jungpaeng
Copy link
Member Author

I really needed this feature. I want to try it 🔥

You can try the package by installing it with the following command:

npm install overlay-kit@canary

The official release will be published along with updated documentation. Your feedback is highly valued and greatly appreciated!

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.

3 participants