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: add Event::Ready #2433

Merged
merged 2 commits into from Aug 15, 2021
Merged

feat: add Event::Ready #2433

merged 2 commits into from Aug 15, 2021

Conversation

lemarier
Copy link
Member

@lemarier lemarier commented Aug 15, 2021

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Docs
  • New Binding Issue #___
  • Code style update
  • Refactor
  • Build-related changes
  • Other, please describe:

Does this PR introduce a breaking change? (check one)

  • Yes. Issue #___
  • No

The PR fulfills these requirements:

  • When resolving a specific issue, it's referenced in the PR's title (e.g. fix: #xxx[,#xxx], where "xxx" is the issue number)
  • A change file is added if any packages will require a version bump due to this PR per the instructions in the readme.

If adding a new feature, the PR's description includes:

  • A convincing reason for adding this feature (to avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it)

Other information:

Signed-off-by: David Lemarier <david@lemarier.ca>
@lemarier lemarier requested a review from a team as a code owner August 15, 2021 12:47
@lemarier lemarier requested review from a team August 15, 2021 12:47
@amrbashir
Copy link
Member

amrbashir commented Aug 15, 2021

Seems like we are bit by bit adding new events and making the run() callback similar to tao's EventLoop::run(), should we just move all the events handling there instead of hooks on the builder ? I think it will make it easier for users since they won't have to keep cloning/moving their structs into multiple closures.

ofc removing the hooks are breaking changes so we could keep hooks and also expose all events inside run() and later in tauri 2.0 we could remove one of them based on what users like more or just let them coexist?

@lemarier
Copy link
Member Author

lemarier commented Aug 15, 2021

Seems like we are bit by bit adding new events and making the run() callback similar to tao's EventLoop::run(), should we just move all the events handling there instead of hooks on the builder ? I think it will make it easier for users since they won't have to keep cloning/moving their structs into multiple closures.

Yeah ofc this would be great but not sure whats the main plan, but as we may support others runtime, not sure exposing tao event loop directly is safe. So it'll require anyhow some kind of wrapper.

ofc removing the hooks are breaking changes so we could keep hooks and also expose all events inside run() and later in tauri 2.0 we could remove one of them based on what users like more or just let them coexist?

Yes I think you are 100% right here

@amrbashir
Copy link
Member

Yeah ofc this would be great but not sure whats the main plan, but as we may support others runtime, not sure exposing tao event loop directly is safe. So it'll require anyhow some kind of wrapper.

No, I didn't mean tao's events directly, I meant exposing tauri's events, instead of splitting some of them on the Builder and some of them inside run()

@lucasfernog
Copy link
Member

I think we're ok right now, the other events are not related to the event loop.

Signed-off-by: David Lemarier <david@lemarier.ca>
@lucasfernog lucasfernog merged commit 28c6b7a into dev Aug 15, 2021
@lucasfernog lucasfernog deleted the feat/init-event branch August 15, 2021 20:10
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.

None yet

3 participants