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

refactor: Create service for determining screen size #599

Merged
merged 5 commits into from Aug 27, 2017

Conversation

Projects
None yet
2 participants
@azzang
Copy link
Contributor

azzang commented Aug 23, 2017

The service provides a function that wraps $mdMedia (an AngularJS Material service) and returns a boolean indicating whether a screen is wider than 960px.

The service can be extended by adding similar functions to test for other breakpoints.

Resolves: #465

refactor: Create service for determining screen size
The service provides a function that wraps $mdMedia (an AngularJS Material service)
and returns a boolean indicating whether a screen is wider than 960px.

The service can be extended by adding similar functions to test for other breakpoints.

Resolves: #465
@codecov

This comment has been minimized.

Copy link

codecov bot commented Aug 23, 2017

Codecov Report

Merging #599 into master will increase coverage by 0.05%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #599      +/-   ##
==========================================
+ Coverage   98.41%   98.46%   +0.05%     
==========================================
  Files         269      272       +3     
  Lines        4340     4353      +13     
==========================================
+ Hits         4271     4286      +15     
+ Misses         69       67       -2
Impacted Files Coverage Δ
client/app/components/group/group.controller.js 100% <ø> (ø) ⬆️
...ent/app/components/group/_pickupList/pickupList.js 100% <ø> (ø) ⬆️
...ts/group/groupDetail/_groupOptions/groupOptions.js 100% <ø> (ø) ⬆️
...oupDetail/_groupOptions/groupOptions.controller.js 100% <ø> (ø) ⬆️
...omponents/group/store/pickupManage/pickupManage.js 40% <ø> (ø) ⬆️
...lient/app/components/group/_storeList/storeList.js 100% <ø> (ø) ⬆️
client/app/components/_topbar/topbar.controller.js 90% <ø> (-2.86%) ⬇️
client/app/components/group/group.js 100% <ø> (ø) ⬆️
...nt/app/components/group/groupDetail/groupDetail.js 100% <ø> (ø) ⬆️
.../components/group/pickupFeedback/pickupFeedback.js 100% <ø> (ø) ⬆️
... and 16 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5576471...6dab179. Read the comment docs.

@tiltec

This comment has been minimized.

Copy link
Member

tiltec commented Aug 25, 2017

Looks good to me! Would you be up for replacing calls to $mdMedia in our codebase with your brand new service?

@azzang

This comment has been minimized.

Copy link
Contributor

azzang commented Aug 25, 2017

@tiltec

This comment has been minimized.

Copy link
Member

tiltec commented Aug 26, 2017

$ctrl.ScreenSize.isMediumOrLarger()

That seems the best choice to me, too.

Though maybe it makes sense to shorten isMediumOrLarger() to something like gtSm()?

@azzang

This comment has been minimized.

Copy link
Contributor

azzang commented Aug 26, 2017

@tiltec

This comment has been minimized.

Copy link
Member

tiltec commented Aug 27, 2017

Thanks @azzang, great work! (also for the whitespace fixes 👍 )
I will merge it to master now, the changes should be live soon on dev.foodsaving.world

@tiltec tiltec merged commit 0bcdec7 into yunity:master Aug 27, 2017

5 checks passed

Node Security No known vulnerabilities found
Details
ci/circleci Your tests passed on CircleCI!
Details
codecov/patch 100% of diff hit (target 98.41%)
Details
codecov/project 98.46% (+0.05%) compared to 5576471
Details
security/snyk No new vulnerabilities
Details
@azzang

This comment has been minimized.

Copy link
Contributor

azzang commented Aug 27, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment