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 10 commits into
base: main
Choose a base branch
from
Open

feat: locally overlay-kit #102

wants to merge 10 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: d5f348b

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 10, 2025 3:43am

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 Report

Attention: Patch coverage is 90.84967% with 14 lines in your changes missing coverage. Please review.

Project coverage is 81.31%. Comparing base (59f2917) to head (b63856f).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #102      +/-   ##
==========================================
- Coverage   81.48%   81.31%   -0.17%     
==========================================
  Files          11       13       +2     
  Lines         243      273      +30     
  Branches       49       54       +5     
==========================================
+ Hits          198      222      +24     
- Misses         43       47       +4     
- Partials        2        4       +2     
Components Coverage Δ
overlay-kit 81.31% <90.84%> (-0.17%) ⬇️

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.

2 participants