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

Support for multiple SwiftEntryKit instances working in parallel #366

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ZsoltMolnarMBH
Copy link

@ZsoltMolnarMBH ZsoltMolnarMBH commented Mar 23, 2022

Issue Link 🔗

No issue.

Goals 🥅

Support for multiple SwiftEntryKit instances working in parallel. No API breaking changes!
These changes allow the programmer to create separate instances and use them at the same time.
For example: an alert and a toast can be shown at the same time, as long as they are displayed by different SwiftEntryKit instances, and their windowLevel differs.

Implementation Details ✏️

SwiftEntryKit initializer made public.
Move logic from SwiftEntryKit class functions to instance functions.
SwiftEntryKit class functions now call a their instance counterpart on a new public static let shared: SwiftEntryKit instance.
Eliminated static references between EKWindowProvider and lower level components, for consistent behaviour.

Testing Details 🔍

Create 2 SwiftEntryKit instances.
For example:

extension SwiftEntryKit {
    static let toast = SwiftEntryKit()
    static let alert = SwiftEntryKit()
}

Call display on them at the same time (make sure the given EKAttributes have windowLevel property, toast is logical to have higher)
Observe the alert and toast showing up at the same time.

Screenshot Links 📷

Simulator Screen Recording - iPhone 12 - 2022-03-23 at 18 31 31

Copy link

@AXGithub AXGithub left a comment

Choose a reason for hiding this comment

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

must Support for multiple SwiftEntryKit instances working in parallel

@ZsoltMolnarrr
Copy link

ZsoltMolnarrr commented May 7, 2022

@AXGithub

must Support for multiple SwiftEntryKit instances working in parallel

The current state of the PR does support multiple SwiftEntryKit instances working in parallel. This is actually visible on the attached gif, where one instance is showing an ActionSheet and one showing a Toast.

Could you please specify the changes you would require?

@AXGithub
Copy link

AXGithub commented May 11, 2022

@AXGithub

must Support for multiple SwiftEntryKit instances working in parallel

The current state of the PR does support multiple SwiftEntryKit instances working in parallel. This is actually visible on the attached gif, where one instance is showing an ActionSheet and one showing a Toast.

Could you please specify the changes you would require?

image

version: 2.0.0

@ZsoltMolnarMBH
Copy link
Author

@AXGithub

must Support for multiple SwiftEntryKit instances working in parallel

The current state of the PR does support multiple SwiftEntryKit instances working in parallel. This is actually visible on the attached gif, where one instance is showing an ActionSheet and one showing a Toast.
Could you please specify the changes you would require?

image

version: 2.0.0

Please reply in full english sentences specifying the actual change you require.
Also would you mind sharing why you are specifically perform this review process?

@petsound
Copy link

It would be great if this could be merged into SwiftEntryKit. I have seen no issues using this code and it has been very useful. Though going by the lack of activity to SwiftEntryKit, it seems as though this project may be abandoned (which would be a shame).

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.

4 participants