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

Fix code duplication in ExplorationPlayerStateService #6000

Merged
merged 45 commits into from
Dec 20, 2018

Conversation

brianrodri
Copy link
Contributor

@brianrodri brianrodri commented Dec 18, 2018

Code Health improvements to ExplorationPlayerStateService. Without them, it is error-prone to add dependencies or fixes to the service since there are so many branches to consider. This tries to consolidate the pieces that belong close together.

@brianrodri brianrodri requested a review from aks681 December 18, 2018 03:07
@brianrodri brianrodri self-assigned this Dec 18, 2018
@codecov-io
Copy link

codecov-io commented Dec 18, 2018

Codecov Report

Merging #6000 into develop will not change coverage.
The diff coverage is 0%.

Impacted file tree graph

@@           Coverage Diff           @@
##           develop   #6000   +/-   ##
=======================================
  Coverage     45.3%   45.3%           
=======================================
  Files          520     520           
  Lines        30667   30667           
  Branches      4597    4597           
=======================================
  Hits         13893   13893           
  Misses       16774   16774
Impacted Files Coverage Δ
...xploration_player/ExplorationPlayerStateService.js 1.53% <0%> (ø) ⬆️

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 09120b4...e405c8e. Read the comment docs.

@brianrodri brianrodri changed the title Clean up ExplorationPlayerStateService Code Health improvements to ExplorationPlayerStateService Dec 18, 2018
@brianrodri brianrodri changed the title Code Health improvements to ExplorationPlayerStateService Fix code duplication in ExplorationPlayerStateService Dec 19, 2018
@brianrodri brianrodri requested review from BenHenning and nithusha21 and removed request for aks681 December 19, 2018 00:04
Copy link
Contributor

@nithusha21 nithusha21 left a comment

Choose a reason for hiding this comment

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

Overall LGTM. Thanks! One question. Do we not prefer variables/function names prefixed with _? I think we previously used it to refer to private variables/functions. If not, would you like to have a lint check that prevents this?

Also, @BenHenning what's your opinion on names prefixed with _?

Also did you revert the issues -> improvements change as it was done in the other PR? Just confirming!

@brianrodri
Copy link
Contributor Author

brianrodri commented Dec 20, 2018

I've double-checked our style guide, and I've found:

We are moving away from using underscores as prefixes for variable names, so, in the future, use var localVariable and not var _localVariable. Instead, we are adopting the convention that anything declared using var is private to the controller/service/etc. If you want a variable to be accessible to the controller, declare it on $scope instead.

And yeah, I accidentally committed the issues -> improvements change to this PR, but it was meant to be part of the other.

Going to go ahead and merge now, thanks!

@brianrodri brianrodri merged commit 6663a74 into oppia:develop Dec 20, 2018
@brianrodri brianrodri deleted the cleanup-epss branch December 20, 2018 08:17
@nithusha21
Copy link
Contributor

Ah thanks for checking! Would you like to have the linting checks include this? If so, I would suggest filing an issue for the same!

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

Successfully merging this pull request may close these issues.

3 participants