-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Conversation
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! |
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! |
There was a problem hiding this 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 |
There was a problem hiding this comment.
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?)
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
semicolon
There was a problem hiding this comment.
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>'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indent by 2.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
Explanation
This PR upgrades constants to Angular 8. Also fixes #7292.
Checklist
python scripts/pre_commit_linter.py
andbash scripts/run_frontend_tests.sh
.