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 #12910 use app.constants.ts instead of constants.ts #17084

Merged
merged 34 commits into from
Feb 4, 2023

Conversation

462702985
Copy link
Contributor

@462702985 462702985 commented Jan 20, 2023

Overview

  1. This PR fixes or fixes part of Use app.constants.ts instead of constants.ts #12910
  2. This PR does the following: use app.constants.ts instead of constants.ts

Essential 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 linter/Karma presubmit checks have passed locally on your machine.
  • "Allow edits from maintainers" is checked. (See here for instructions on how to enable it.)
    • This lets reviewers restart your CircleCI tests for you.
  • The PR is made from a branch that's not called "develop".

Proof that changes are correct

image
image
image

Proof of changes on mobile phone

Proof of changes in Arabic language

image

PR Pointers

  • Make sure to follow the instructions for making a code change.
  • If you need a review or an answer to a question, and don't have permissions to assign people, leave a comment like the following: "{{Question/comment}} @{{reviewer_username}} PTAL". Oppiabot will help assign that person for you.
  • For what code owners will expect, see the Code Owner's wiki page.
  • Make sure your PR follows conventions in the style guide, otherwise this will lead to review delays.
  • Never force push. If you do, your PR will be closed.
  • Some of the e2e tests are flaky, and can fail for reasons unrelated to your PR. We are working on fixing this, but in the meantime, if you need to restart the tests, please check the "If your build fails" wiki page.

@462702985 462702985 requested a review from a team as a code owner January 20, 2023 19:09
@462702985 462702985 requested a review from a team January 20, 2023 19:09
@462702985 462702985 requested a review from a team as a code owner January 20, 2023 19:09
@462702985 462702985 requested review from a team January 20, 2023 19:09
@oppiabot
Copy link

oppiabot bot commented Jan 20, 2023

Hi @462702985, can you complete the following:

  1. The karma and linter checklist has not been checked, please make sure to run the frontend tests and lint tests before pushing.
    Thanks!

@oppiabot
Copy link

oppiabot bot commented Jan 20, 2023

Hi @vojtechjelinek, @seanlip -- could one of you please add the appropriate changelog label to this pull request? Thanks!

Copy link
Member

@vojtechjelinek vojtechjelinek left a comment

Choose a reason for hiding this comment

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

Thanks! Took a pass.

Comment on lines 23 to 26
import constants from 'assets/constants';

for (var constantName in constants) {
angular.module('oppia').constant(constantName, constants[constantName]);
Copy link
Member

Choose a reason for hiding this comment

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

I think it is fine to keep import constants from 'assets/constants'; here, so that we do not need to create commonConstants in AppConstants. But add an explanatory comment.

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

@@ -20,6 +20,7 @@ import commonConstants from 'assets/constants';

export const AppConstants = {
...commonConstants,
commonConstants,
Copy link
Member

Choose a reason for hiding this comment

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

This should not be needed.

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

Comment on lines 22 to 24
import { AppConstants } from 'app.constants';

const subtopicValidationConstants = AppConstants.commonConstants;
Copy link
Member

Choose a reason for hiding this comment

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

Again, use AppConstants directly.

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

Comment on lines 29 to 30
import { AppConstants } from 'app.constants';
const newStoryConstants = AppConstants.commonConstants;
Copy link
Member

Choose a reason for hiding this comment

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

Again, use AppConstants directly.

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

Comment on lines 29 to 30
const topicConstants = AppConstants.commonConstants;

Copy link
Member

Choose a reason for hiding this comment

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

Again, use AppConstants directly.

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

Comment on lines 32 to 33
const splashConstants = AppConstants.commonConstants;

Copy link
Member

Choose a reason for hiding this comment

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

Again, use AppConstants directly.

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

Comment on lines 28 to 30
import { AppConstants } from 'app.constants';

const newChapterConstants = AppConstants.commonConstants;
Copy link
Member

Choose a reason for hiding this comment

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

Again, use AppConstants directly.

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

Comment on lines 48 to 50
import { AppConstants } from 'app.constants';

const storyNodeConstants = AppConstants.commonConstants;
Copy link
Member

Choose a reason for hiding this comment

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

Again, use AppConstants directly.

Copy link
Member

Choose a reason for hiding this comment

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

ditto elsewhere, also you can probably remove the comment starting with TODO(#9186):

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ditto elsewhere, also you can probably remove the comment starting with TODO(#9186):
All comments addressed

@seanlip seanlip removed their assignment Jan 21, 2023
@462702985
Copy link
Contributor Author

Hi, one frontend time out Disconnected, can you rerun the tests again?

Copy link
Contributor

@chris7716 chris7716 left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks!

@oppiabot
Copy link

oppiabot bot commented Feb 1, 2023

Assigning @kevintab95, @BenHenning, @heyimShivam for code owner reviews. Thanks!

Copy link
Member

@BenHenning BenHenning left a comment

Choose a reason for hiding this comment

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

Thanks @462702985. Approved for platform parameters code owners.

@BenHenning BenHenning removed their assignment Feb 1, 2023
@462702985 462702985 removed their assignment Feb 2, 2023
@seanlip
Copy link
Member

seanlip commented Feb 3, 2023

@vojtechjelinek @kevintab95 @heyimShivam Please review for codeowners. Thanks!

@vojtechjelinek
Copy link
Member

@462702985 Please do not close the comments from reviewers yourself.

Copy link
Member

@vojtechjelinek vojtechjelinek left a comment

Choose a reason for hiding this comment

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

LGTM!

@vojtechjelinek vojtechjelinek removed their assignment Feb 3, 2023
Copy link
Contributor

@heyimShivam heyimShivam left a comment

Choose a reason for hiding this comment

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

LGTM

@oppiabot
Copy link

oppiabot bot commented Feb 4, 2023

Unassigning @heyimShivam since they have already approved the PR.

@oppiabot
Copy link

oppiabot bot commented Feb 4, 2023

Unassigning @kevintab95 since they have already approved the PR.

@kevintab95 kevintab95 merged commit b8a1035 into oppia:develop Feb 4, 2023
adityanarayanm095 pushed a commit to adityanarayanm095/oppia that referenced this pull request Feb 15, 2023
…7084)

* use app.constants.ts instead of constants.ts

* delete commonConstants in AppConstants

* remove TODO(oppia#9186)

* address comments

* linter checks

* Update core/templates/pages/contributor-dashboard-page/opportunities-list-item/opportunities-list-item.component.ts

Co-authored-by: Vojtěch Jelínek <vojtech.jelinek@hey.com>

* Update core/templates/pages/contributor-dashboard-page/services/contribution-opportunities-backend-api.service.ts

Co-authored-by: Vojtěch Jelínek <vojtech.jelinek@hey.com>

* delete unnecessary changes

* minor bug

* minor bug

* minor change

---------

Co-authored-by: Vojtěch Jelínek <vojtech.jelinek@hey.com>
@462702985 462702985 deleted the mybranch branch February 16, 2023 16:43
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.

7 participants