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

Add resize service #577

Merged
merged 2 commits into from
Aug 11, 2019
Merged

Add resize service #577

merged 2 commits into from
Aug 11, 2019

Conversation

hgzimmerman
Copy link
Member

Adds a service to handle resize events.
Implementation as loosely dictated by #541.

If you want to make this a full-blown window service instead of just focusing on resizes, let me know the other events this service should handle and I'll try to add them.

Copy link
Member

@jstarry jstarry left a comment

Choose a reason for hiding this comment

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

Thanks for the implementation!! I think that specific utility services are better than one big WindowService.

  • Need to add a mod resize; statement inside src/services/mod.rs
  • Please re-export the ResizeService just like the other services

src/services/resize.rs Show resolved Hide resolved
src/services/resize.rs Show resolved Hide resolved
…dd doc comments, add window dimensions when the callback is called
@hgzimmerman
Copy link
Member Author

Sorry about that, I've had this service lying around for the greater part of a year and I just copied+pasted them into Yew without doing a proper check first. Coding before coffee leads to these mistakes 😄.

@jstarry
Copy link
Member

jstarry commented Aug 11, 2019

Haha no worries, thanks for addressing the feedback with lightning speed 👍

@jstarry
Copy link
Member

jstarry commented Aug 11, 2019

bors r+

bors bot added a commit that referenced this pull request Aug 11, 2019
577: Add resize service r=jstarry a=hgzimmerman

Adds a service to handle resize events.
Implementation as loosely dictated by #541.

If you want to make this a full-blown window service instead of just focusing on resizes, let me know the other events this service should handle and I'll try to add them.

Co-authored-by: Henry Zimmerman <zimhen7@gmail.com>
@bors
Copy link
Contributor

bors bot commented Aug 11, 2019

Build succeeded

  • continuous-integration/travis-ci/push

@bors bors bot merged commit d357201 into yewstack:master Aug 11, 2019
@jstarry jstarry mentioned this pull request Sep 27, 2019
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