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

Upgrade constants to Angular 8 #7066

Merged
merged 118 commits into from
Aug 8, 2019
Merged

Upgrade constants to Angular 8 #7066

merged 118 commits into from
Aug 8, 2019

Conversation

YashJipkate
Copy link
Contributor

@YashJipkate YashJipkate commented Jul 1, 2019

Explanation

This PR upgrades constants to Angular 8. Also fixes #7292.

Checklist

  • The PR title starts with "Fix #bugnum: ", followed by a short, clear summary of the changes. (If this PR fixes part of an issue, prefix the title with "Fix part of #bugnum: ...".)
  • The PR explanation includes the words "Fixes #bugnum: ..." (or "Fixes part of #bugnum" if the PR only partially fixes an issue).
  • The linter/Karma presubmit checks have passed.
    • These should run automatically, but if not, you can manually trigger them locally using python scripts/pre_commit_linter.py and bash scripts/run_frontend_tests.sh.
  • The PR is made from a branch that's not called "develop".
  • The PR has an appropriate "CHANGELOG: ..." label (If you are unsure of which label to add, ask the reviewers for guidance).
  • The PR follows the style guide.
  • The PR addresses the points mentioned in the codeowner checks for the files/folders changed. (See the codeowner's wiki page.)
  • The PR is assigned to an appropriate reviewer.
    • If you're a new contributor, please ask on Gitter for someone to assign a reviewer and don't tick this checkbox.
    • If you're not sure who the appropriate reviewer is, please assign to the issue's "owner" -- see the "talk-to" label on the issue. Do not only request the review but also add the reviewer as an assignee.

@YashJipkate YashJipkate requested a review from seanlip August 5, 2019 20:06
@YashJipkate YashJipkate assigned seanlip and unassigned YashJipkate Aug 5, 2019
@YashJipkate YashJipkate closed this Aug 5, 2019
@YashJipkate YashJipkate reopened this Aug 5, 2019
@oppiabot
Copy link

oppiabot bot commented Aug 6, 2019

Hi @YashJipkate. Due to recent changes in the "develop" branch, this PR now has a merge conflict. Please follow this link if you need help resolving the conflict, so that the PR can be merged. Thanks!

@oppiabot
Copy link

oppiabot bot commented Aug 7, 2019

Hi @YashJipkate. Due to recent changes in the "develop" branch, this PR now has a merge conflict. Please follow this link if you need help resolving the conflict, so that the PR can be merged. Thanks!

Copy link
Member

@seanlip seanlip left a comment

Choose a reason for hiding this comment

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

One small thing, otherwise looks good to merge. Thanks!


angular.module('oppia').constant('VIEW_HINT_PENALTY', 0.1);
public static VIEW_HINT_PENALTY = 0.1
Copy link
Member

Choose a reason for hiding this comment

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

Are semicolons needed at the ends of these lines? It seems inconsistent at the moment -- some have them and some don't. Let's be consistent.

(Probably prefer the version that has semicolons, since that's standard in JS, though I'm a little less famliiar with JS classes. @kevinlee12, any thoughts?)

Copy link
Contributor

Choose a reason for hiding this comment

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

Semicolons aren't needed, though I can enable that eslint rule.

Copy link
Member

Choose a reason for hiding this comment

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

Yep, let's stipulate a style, and have eslint check it, so that everything stays consistent.

'MODE_SELECT_DIFFICULTY', 'MODE_SELECT_DIFFICULTY');
angular.module('oppia').constant('MODE_SELECT_SKILL', 'MODE_SELECT_SKILL');
export class QuestionsListConstants {
public static DEFAULT_SKILL_DIFFICULTY = 0.3
Copy link
Member

Choose a reason for hiding this comment

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

Ditto, inconsistencies in trailing semicolons. Please look out for these elsewhere.

@kevinlee12 we should perhaps turn on a lint check in eslint for this if there's one.

'EVENT_UNDO_REDO_SERVICE_CHANGE_APPLIED', 'undoRedoServiceChangeApplied');
export class EditorDomainConstants {
public static EVENT_UNDO_REDO_SERVICE_CHANGE_APPLIED =
'undoRedoServiceChangeApplied'
Copy link
Member

Choose a reason for hiding this comment

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

semicolon

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done!

@@ -23,10 +23,13 @@ export class SkillDomainConstants {
'/skill_editor_handler/data/<skill_id>';

public static SKILL_DATA_URL_TEMPLATE =
'/skill_data_handler/<comma_separated_skill_ids>'
'/skill_data_handler/<comma_separated_skill_ids>';
Copy link
Member

Choose a reason for hiding this comment

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

Indent by 2.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done!

@YashJipkate YashJipkate closed this Aug 8, 2019
@YashJipkate YashJipkate reopened this Aug 8, 2019
@seanlip seanlip merged commit edb62fc into oppia:develop Aug 8, 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.

Address review comments on #7283
4 participants