diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 6032adafa7cb..77ac2087bfe0 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -256,6 +256,7 @@ # Global stylesheet. /core/templates/css/oppia.css @ankita240796 +/core/templates/css/oppia-material.css @srijanreddy98 @bansalnitish # Interaction project. @@ -352,6 +353,7 @@ # Readme /core/README.md @ankita240796 +/core/templates/css/README.md @srijanreddy98 @bansalnitish /extensions/README.md @ankita240796 /scripts/README.md @ankita240796 diff --git a/core/templates/components/material.module.ts b/core/templates/components/material.module.ts index d8774d8d4b2f..d3b8a7e27539 100644 --- a/core/templates/components/material.module.ts +++ b/core/templates/components/material.module.ts @@ -20,12 +20,22 @@ import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { MatButtonModule } from '@angular/material/button'; import { MatCardModule } from '@angular/material/card'; +import { MatCheckboxModule } from '@angular/material/checkbox'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; @NgModule({ - imports: [CommonModule, BrowserAnimationsModule, - MatButtonModule, MatCardModule + imports: [ + BrowserAnimationsModule, + CommonModule, + MatButtonModule, + MatCardModule, + MatCheckboxModule ], - exports: [BrowserAnimationsModule, MatButtonModule, MatCardModule] + exports: [ + BrowserAnimationsModule, + MatButtonModule, + MatCardModule, + MatCheckboxModule + ] }) export class MaterialModule {} diff --git a/core/templates/components/shared-component.module.ts b/core/templates/components/shared-component.module.ts index 9e10e1a5178b..dd7c42732924 100644 --- a/core/templates/components/shared-component.module.ts +++ b/core/templates/components/shared-component.module.ts @@ -20,6 +20,7 @@ import 'zone.js'; import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; +import { FormsModule } from '@angular/forms'; import { BackgroundBannerComponent } from './common-layout-directives/common-elements/background-banner.component'; @@ -34,10 +35,14 @@ import { TranslatePipe } from 'filters/translate.pipe'; import { SafePipe } from 'filters/safe-pipe'; import { SkillMasteryViewerComponent } from './skill-mastery/skill-mastery.component'; -import { SharingLinksComponent } from - './common-layout-directives/common-elements/sharing-links.component'; import { ExplorationEmbedButtonModalComponent } from './button-directives/exploration-embed-button-modal.component'; +import { SharingLinksComponent } from + './common-layout-directives/common-elements/sharing-links.component'; +import { StorySummaryTileDirective } from + './summary-tile/story-summary-tile.directive'; +import { SubtopicSummaryTileDirective } from + './summary-tile/subtopic-summary-tile.directive'; import { SocialButtonsComponent } from 'components/button-directives/social-buttons.component'; import { NgbModalModule } from '@ng-bootstrap/ng-bootstrap'; @@ -50,23 +55,50 @@ import { ProfileLinkTextComponent } from @NgModule({ - imports: [CommonModule, MaterialModule, NgbModalModule], - declarations: [BackgroundBannerComponent, TranslatePipe, - SafePipe, SharingLinksComponent, ExplorationEmbedButtonModalComponent, - SkillMasteryViewerComponent, AttributionGuideComponent, - LazyLoadingComponent, LoadingDotsComponent, SocialButtonsComponent, - ProfileLinkImageComponent, ProfileLinkTextComponent, - ExplorationSummaryTileDirective], - entryComponents: [BackgroundBannerComponent, SharingLinksComponent, + imports: [CommonModule, MaterialModule, NgbModalModule, FormsModule], + + declarations: [ + AttributionGuideComponent, + BackgroundBannerComponent, + ExplorationEmbedButtonModalComponent, + ExplorationSummaryTileDirective, + LazyLoadingComponent, + LoadingDotsComponent, + ProfileLinkImageComponent, + ProfileLinkTextComponent, + SafePipe, + SharingLinksComponent, + SkillMasteryViewerComponent, + StorySummaryTileDirective, + SocialButtonsComponent, + SubtopicSummaryTileDirective, + TranslatePipe + ], + + entryComponents: [ + BackgroundBannerComponent, + SharingLinksComponent, SkillMasteryViewerComponent, AttributionGuideComponent, LazyLoadingComponent, LoadingDotsComponent, SocialButtonsComponent, ProfileLinkImageComponent, ProfileLinkTextComponent, // These elements will remain here even after migration. ExplorationEmbedButtonModalComponent, + SkillMasteryViewerComponent, + SocialButtonsComponent ], + exports: [ - BackgroundBannerComponent, TranslatePipe, SafePipe, - SharingLinksComponent, MaterialModule, ExplorationSummaryTileDirective + // Modules. + FormsModule, + MaterialModule, + // Components, directives, and pipes. + BackgroundBannerComponent, + ExplorationSummaryTileDirective, + SafePipe, + SharingLinksComponent, + StorySummaryTileDirective, + SubtopicSummaryTileDirective, + TranslatePipe ], }) diff --git a/core/templates/components/summary-tile/story-summary-tile.directive.html b/core/templates/components/summary-tile/story-summary-tile.directive.html index 261e2362e422..650640daf69d 100644 --- a/core/templates/components/summary-tile/story-summary-tile.directive.html +++ b/core/templates/components/summary-tile/story-summary-tile.directive.html @@ -1,7 +1,7 @@
- <[$ctrl.getStorySummary().getTitle()]> + <[$ctrl.storySummary.getTitle()]> <[$ctrl.nodeCount]> <[($ctrl.nodeCount > 1) ? 's' : '']> @@ -9,16 +9,16 @@
+ ng-style="{background: $ctrl.storySummary.getThumbnailBgColor()}"> + ng-style="{background: $ctrl.storySummary.getThumbnailBgColor()}">
-
+
- + done
+ ng-style="{background: $ctrl.subtopic.getThumbnailBgColor()}"> + ng-style="{background: $ctrl.subtopic.getThumbnailBgColor()}">
- <[$ctrl.getSubtopic().getTitle()]> + <[$ctrl.subtopic.getTitle()]>
diff --git a/core/templates/pages/topic-viewer-page/practice-tab/practice-tab.component.ts b/core/templates/pages/topic-viewer-page/practice-tab/practice-tab.component.ts new file mode 100644 index 000000000000..239bbf496742 --- /dev/null +++ b/core/templates/pages/topic-viewer-page/practice-tab/practice-tab.component.ts @@ -0,0 +1,83 @@ +// Copyright 2018 The Oppia Authors. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS-IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/** + * @fileoverview Component for the topic viewer practice tab. + */ + +import { Component, Input, OnInit } from '@angular/core'; +import { downgradeComponent } from '@angular/upgrade/static'; + +import { Subtopic } from 'domain/topic/SubtopicObjectFactory'; +import { UrlInterpolationService } from + 'domain/utilities/url-interpolation.service'; +import { PracticeSessionPageConstants } from + 'pages/practice-session-page/practice-session-page.constants.ts'; + +@Component({ + selector: 'practice-tab', + templateUrl: './practice-tab.component.html', + styleUrls: [] +}) +export class PracticeTabComponent implements OnInit { + @Input() topicName: string; + @Input() subtopicsList: Array; + selectedSubtopics: Array = []; + availableSubtopics: Array = []; + selectedSubtopicIndices: Array = []; + + constructor( + private urlInterpolationService: UrlInterpolationService + ) {} + + ngOnInit(): void { + this.selectedSubtopics = []; + this.availableSubtopics = this.subtopicsList.filter( + (subtopic: Subtopic) => { + return subtopic.getSkillSummaries().length > 0; + } + ); + this.selectedSubtopicIndices = Array( + this.availableSubtopics.length).fill(false); + } + + isStartButtonDisabled(): boolean { + for (var idx in this.selectedSubtopicIndices) { + if (this.selectedSubtopicIndices[idx]) { + return false; + } + } + return true; + } + + openNewPracticeSession(): void { + const selectedSubtopicIds = []; + for (let idx in this.selectedSubtopicIndices) { + if (this.selectedSubtopicIndices[idx]) { + selectedSubtopicIds.push( + this.availableSubtopics[idx].getId()); + } + } + const practiceSessionsUrl = this.urlInterpolationService.interpolateUrl( + PracticeSessionPageConstants.PRACTICE_SESSIONS_URL, { + topic_name: this.topicName, + comma_separated_subtopic_ids: selectedSubtopicIds.join(',') + }); + window.location.href = practiceSessionsUrl; + } +} + +angular.module('oppia').directive( + 'practiceTab', downgradeComponent( + {component: PracticeTabComponent})); diff --git a/core/templates/pages/topic-viewer-page/practice-tab/practice-tab.directive.html b/core/templates/pages/topic-viewer-page/practice-tab/practice-tab.directive.html deleted file mode 100644 index c3dc10892543..000000000000 --- a/core/templates/pages/topic-viewer-page/practice-tab/practice-tab.directive.html +++ /dev/null @@ -1,64 +0,0 @@ -
- -

- -

- - - - - <[subtopic.getTitle()]> - - - - -
-
- diff --git a/core/templates/pages/topic-viewer-page/practice-tab/practice-tab.directive.ts b/core/templates/pages/topic-viewer-page/practice-tab/practice-tab.directive.ts deleted file mode 100644 index 2d88f3d81924..000000000000 --- a/core/templates/pages/topic-viewer-page/practice-tab/practice-tab.directive.ts +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright 2018 The Oppia Authors. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS-IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/** - * @fileoverview Directive for the stories list. - */ - -require('pages/practice-session-page/practice-session-page.constants.ajs.ts'); -require('domain/utilities/url-interpolation.service.ts'); -require('services/contextual/window-dimensions.service.ts'); - -angular.module('oppia').directive('practiceTab', [ - '$window', 'UrlInterpolationService', - 'PRACTICE_SESSIONS_URL', - function( - $window, UrlInterpolationService, - PRACTICE_SESSIONS_URL) { - return { - restrict: 'E', - scope: {}, - bindToController: { - getTopicName: '&topicName', - getSubtopicsList: '&subtopicsList' - }, - templateUrl: UrlInterpolationService.getDirectiveTemplateUrl( - '/pages/topic-viewer-page/practice-tab/practice-tab.directive.html'), - controllerAs: '$ctrl', - controller: [ - '$scope', - function( - $scope) { - var ctrl = this; - - ctrl.openNewPracticeSession = function() { - var selectedSubtopicIds = []; - for (var idx in ctrl.selectedSubtopicIndices) { - if (ctrl.selectedSubtopicIndices[idx]) { - selectedSubtopicIds.push( - ctrl.availableSubtopics[idx].getId()); - } - } - var practiceSessionsUrl = UrlInterpolationService.interpolateUrl( - PRACTICE_SESSIONS_URL, { - topic_name: ctrl.getTopicName(), - comma_separated_subtopic_ids: selectedSubtopicIds.join(',') - }); - $window.location.href = practiceSessionsUrl; - }; - - ctrl.isStartButtonDisabled = function() { - for (var idx in ctrl.selectedSubtopicIndices) { - if (ctrl.selectedSubtopicIndices[idx]) { - return false; - } - } - return true; - }; - - ctrl.$onInit = function() { - ctrl.selectedSubtopics = []; - ctrl.availableSubtopics = ctrl.getSubtopicsList().filter( - function(subtopic) { - return subtopic.getSkillSummaries().length > 0; - } - ); - ctrl.selectedSubtopicIndices = Array( - ctrl.availableSubtopics.length).fill(false); - }; - } - ] - }; - }]); diff --git a/core/templates/pages/topic-viewer-page/stories-list/topic-viewer-stories-list.component.html b/core/templates/pages/topic-viewer-page/stories-list/topic-viewer-stories-list.component.html new file mode 100644 index 000000000000..ad06702bd6f5 --- /dev/null +++ b/core/templates/pages/topic-viewer-page/stories-list/topic-viewer-stories-list.component.html @@ -0,0 +1,20 @@ +
+
+ +

+ +
+
+
+ + diff --git a/core/templates/pages/topic-viewer-page/stories-list/topic-viewer-stories-list.component.ts b/core/templates/pages/topic-viewer-page/stories-list/topic-viewer-stories-list.component.ts new file mode 100644 index 000000000000..5b492174236b --- /dev/null +++ b/core/templates/pages/topic-viewer-page/stories-list/topic-viewer-stories-list.component.ts @@ -0,0 +1,35 @@ +// Copyright 2018 The Oppia Authors. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS-IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/** + * @fileoverview Component for the topic viewer stories list. + */ + +import { Component, Input } from '@angular/core'; +import { downgradeComponent } from '@angular/upgrade/static'; + +import { StorySummary } from 'domain/story/StorySummaryObjectFactory'; + +@Component({ + selector: 'stories-list', + templateUrl: './topic-viewer-stories-list.component.html', + styleUrls: [] +}) +export class StoriesListComponent { + @Input() canonicalStorySummaries: StorySummary[]; + constructor() {} +} +angular.module('oppia').directive( + 'storiesList', downgradeComponent( + {component: StoriesListComponent})); diff --git a/core/templates/pages/topic-viewer-page/stories-list/topic-viewer-stories-list.directive.html b/core/templates/pages/topic-viewer-page/stories-list/topic-viewer-stories-list.directive.html deleted file mode 100644 index c79b93c57445..000000000000 --- a/core/templates/pages/topic-viewer-page/stories-list/topic-viewer-stories-list.directive.html +++ /dev/null @@ -1,8 +0,0 @@ -
- -

- -
-
diff --git a/core/templates/pages/topic-viewer-page/stories-list/topic-viewer-stories-list.directive.ts b/core/templates/pages/topic-viewer-page/stories-list/topic-viewer-stories-list.directive.ts deleted file mode 100644 index b4b4ba0b6f2f..000000000000 --- a/core/templates/pages/topic-viewer-page/stories-list/topic-viewer-stories-list.directive.ts +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright 2018 The Oppia Authors. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS-IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/** - * @fileoverview Directive for the stories list. - */ - -require('components/summary-tile/story-summary-tile.directive.ts'); - -require('domain/utilities/url-interpolation.service.ts'); - -angular.module('oppia').directive('storiesList', ['UrlInterpolationService', - function(UrlInterpolationService) { - return { - restrict: 'E', - scope: {}, - bindToController: { - getCanonicalStorySummaries: '&canonicalStorySummaries', - }, - templateUrl: UrlInterpolationService.getDirectiveTemplateUrl( - '/pages/topic-viewer-page/stories-list/' + - 'topic-viewer-stories-list.directive.html'), - controllerAs: '$ctrl', - controller: [function() {}] - }; - }]); diff --git a/core/templates/pages/topic-viewer-page/subtopics-list/subtopics-list.component.html b/core/templates/pages/topic-viewer-page/subtopics-list/subtopics-list.component.html new file mode 100644 index 000000000000..57132e18ca77 --- /dev/null +++ b/core/templates/pages/topic-viewer-page/subtopics-list/subtopics-list.component.html @@ -0,0 +1,70 @@ +
+
+ +

+ +

+
+ +
+
+
+ + +
+
+
+
+
+ diff --git a/core/templates/pages/topic-viewer-page/subtopics-list/subtopics-list.component.ts b/core/templates/pages/topic-viewer-page/subtopics-list/subtopics-list.component.ts new file mode 100644 index 000000000000..a0a74036d508 --- /dev/null +++ b/core/templates/pages/topic-viewer-page/subtopics-list/subtopics-list.component.ts @@ -0,0 +1,38 @@ +// Copyright 2018 The Oppia Authors. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS-IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/** + * @fileoverview Component for topic-viewer subtopics list. + */ + +import { Component, Input } from '@angular/core'; +import { downgradeComponent } from '@angular/upgrade/static'; + +import { Subtopic } from 'domain/topic/SubtopicObjectFactory'; + +@Component({ + selector: 'subtopics-list', + templateUrl: './subtopics-list.component.html', + styleUrls: [] +}) +export class SubtopicsListComponent { + @Input() subtopicsList: Subtopic[]; + @Input() topicId: string; + @Input() topicName: string; + constructor() {} +} + +angular.module('oppia').directive( + 'subtopicsList', downgradeComponent( + {component: SubtopicsListComponent})); diff --git a/core/templates/pages/topic-viewer-page/subtopics-list/subtopics-list.directive.html b/core/templates/pages/topic-viewer-page/subtopics-list/subtopics-list.directive.html deleted file mode 100644 index a3325e5ae2b1..000000000000 --- a/core/templates/pages/topic-viewer-page/subtopics-list/subtopics-list.directive.html +++ /dev/null @@ -1,59 +0,0 @@ -
- -

- -

- - - -
- - -
-
-
- diff --git a/core/templates/pages/topic-viewer-page/subtopics-list/subtopics-list.directive.ts b/core/templates/pages/topic-viewer-page/subtopics-list/subtopics-list.directive.ts deleted file mode 100644 index 974331a338c1..000000000000 --- a/core/templates/pages/topic-viewer-page/subtopics-list/subtopics-list.directive.ts +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2018 The Oppia Authors. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS-IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/** - * @fileoverview Directive for the subtopics list. - */ - -require('components/summary-tile/subtopic-summary-tile.directive.ts'); - -require('domain/utilities/url-interpolation.service.ts'); - -angular.module('oppia').directive('subtopicsList', [ - 'UrlInterpolationService', function(UrlInterpolationService) { - return { - restrict: 'E', - scope: {}, - bindToController: { - getSubtopics: '&subtopicsList', - getTopicId: '&topicId', - getTopicName: '&topicName' - }, - templateUrl: UrlInterpolationService.getDirectiveTemplateUrl( - '/pages/topic-viewer-page/subtopics-list/' + - 'subtopics-list.directive.html'), - controllerAs: '$ctrl', - controller: [function() {}] - }; - }]); diff --git a/core/templates/pages/topic-viewer-page/topic-viewer-page.component.html b/core/templates/pages/topic-viewer-page/topic-viewer-page.component.html index d69af0ad8db0..b0dc1c11686a 100644 --- a/core/templates/pages/topic-viewer-page/topic-viewer-page.component.html +++ b/core/templates/pages/topic-viewer-page/topic-viewer-page.component.html @@ -48,17 +48,17 @@
- +
- +
- +
diff --git a/core/templates/pages/topic-viewer-page/topic-viewer-page.component.ts b/core/templates/pages/topic-viewer-page/topic-viewer-page.component.ts index 0483bbea2251..6e6161a8f8b7 100644 --- a/core/templates/pages/topic-viewer-page/topic-viewer-page.component.ts +++ b/core/templates/pages/topic-viewer-page/topic-viewer-page.component.ts @@ -24,9 +24,7 @@ require('components/skills-mastery-list/skills-mastery-list.directive.ts'); require('pages/topic-viewer-page/info-tab/topic-info-tab.directive.ts'); require( 'pages/topic-viewer-page/stories-list/' + - 'topic-viewer-stories-list.directive.ts'); -require('pages/topic-viewer-page/subtopics-list/subtopics-list.directive.ts'); -require('pages/topic-viewer-page/practice-tab/practice-tab.directive.ts'); + 'topic-viewer-stories-list.component.ts'); require('domain/topic_viewer/topic-viewer-backend-api.service.ts'); require('services/alerts.service.ts'); require('services/page-title.service.ts'); diff --git a/core/templates/pages/topic-viewer-page/topic-viewer-page.import.ts b/core/templates/pages/topic-viewer-page/topic-viewer-page.import.ts index 7ffad1b72ff3..2668af143f57 100644 --- a/core/templates/pages/topic-viewer-page/topic-viewer-page.import.ts +++ b/core/templates/pages/topic-viewer-page/topic-viewer-page.import.ts @@ -24,5 +24,5 @@ require('base-components/oppia-root.directive.ts'); require( 'pages/topic-viewer-page/navbar-breadcrumb/' + - 'topic-viewer-navbar-breadcrumb.directive.ts'); + 'topic-viewer-navbar-breadcrumb.component.ts'); require('pages/topic-viewer-page/topic-viewer-page.component.ts'); diff --git a/core/templates/pages/topic-viewer-page/topic-viewer-page.module.ts b/core/templates/pages/topic-viewer-page/topic-viewer-page.module.ts index 885395d7b54a..e71cd8246ab2 100644 --- a/core/templates/pages/topic-viewer-page/topic-viewer-page.module.ts +++ b/core/templates/pages/topic-viewer-page/topic-viewer-page.module.ts @@ -31,18 +31,27 @@ import { BrowserModule } from '@angular/platform-browser'; import { downgradeComponent } from '@angular/upgrade/static'; import { HttpClientModule } from '@angular/common/http'; import { HTTP_INTERCEPTORS } from '@angular/common/http'; -import { RequestInterceptor } from 'services/request-interceptor.service'; -import { SharedComponentsModule } from 'components/shared-component.module'; -import { OppiaAngularRootComponent } from - 'components/oppia-angular-root.component'; import { AppConstants } from 'app.constants'; -import { InteractionsExtensionsConstants } from - 'interactions/interactions-extension.constants'; +import { OppiaAngularRootComponent } from + 'components/oppia-angular-root.component'; +import { SharedComponentsModule } from 'components/shared-component.module'; import { ObjectsDomainConstants } from 'domain/objects/objects-domain.constants'; import { TopicViewerDomainConstants } from 'domain/topic_viewer/topic-viewer-domain.constants'; +import { InteractionsExtensionsConstants } from + 'interactions/interactions-extension.constants'; +import { TopicViewerNavbarBreadcrumbComponent } from + // eslint-disable-next-line max-len + 'pages/topic-viewer-page/navbar-breadcrumb/topic-viewer-navbar-breadcrumb.component'; +import { PracticeTabComponent } from + 'pages/topic-viewer-page/practice-tab/practice-tab.component'; +import { StoriesListComponent } from + 'pages/topic-viewer-page/stories-list/topic-viewer-stories-list.component'; +import { SubtopicsListComponent } from + 'pages/topic-viewer-page/subtopics-list/subtopics-list.component'; +import { RequestInterceptor } from 'services/request-interceptor.service'; @NgModule({ imports: [ @@ -51,10 +60,18 @@ import { TopicViewerDomainConstants } from SharedComponentsModule ], declarations: [ - OppiaAngularRootComponent + OppiaAngularRootComponent, + PracticeTabComponent, + StoriesListComponent, + SubtopicsListComponent, + TopicViewerNavbarBreadcrumbComponent ], entryComponents: [ - OppiaAngularRootComponent + OppiaAngularRootComponent, + PracticeTabComponent, + StoriesListComponent, + SubtopicsListComponent, + TopicViewerNavbarBreadcrumbComponent ], providers: [ AppConstants, diff --git a/scripts/check_frontend_coverage.py b/scripts/check_frontend_coverage.py index 8a356fe7a545..5d47f76c1e5c 100644 --- a/scripts/check_frontend_coverage.py +++ b/scripts/check_frontend_coverage.py @@ -260,7 +260,7 @@ 'player-position.service.ts', 'player-transcript.service.ts', 'Polyfills.ts', - 'practice-tab.directive.ts', + 'practice-tab.component.ts', 'pretest-question-backend-api.service.ts', 'profile-link-image.component.ts', 'profile-link-text.component.ts', @@ -372,7 +372,6 @@ 'subtopic-viewer-navbar-breadcrumb.component.ts', 'SubtopicObjectFactory.ts', 'SubtopicPageObjectFactory.ts', - 'subtopics-list.directive.ts', 'suggestion-modal-for-exploration-editor.service.ts', 'suggestion-modal-for-exploration-player.service.ts', 'summary-list-header.directive.ts', @@ -391,8 +390,7 @@ 'topic-questions-tab.directive.ts', 'topic-selector.directive.ts', 'topic-summary-tile.directive.ts', - 'topic-viewer-navbar-breadcrumb.directive.ts', - 'topic-viewer-stories-list.directive.ts', + 'topic-viewer-navbar-breadcrumb.component.ts', 'TopicObjectFactory.ts', 'topics-and-skills-dashboard-backend-api.service.ts', 'topics-and-skills-dashboard-navbar-breadcrumb.directive.ts', diff --git a/scripts/linters/general_purpose_linter.py b/scripts/linters/general_purpose_linter.py index f9a745ba941b..9b9def6eb188 100644 --- a/scripts/linters/general_purpose_linter.py +++ b/scripts/linters/general_purpose_linter.py @@ -39,6 +39,7 @@ 'core/tests/release_sources/tmp_unzip.zip', 'scripts/linters/test_files/*', 'core/tests/release_sources/tmp_unzip.tar.gz', 'core/templates/combined-tests.spec.ts', + 'core/templates/css/oppia-material.css', '%s/*' % js_ts_linter.COMPILED_TYPESCRIPT_TMP_PATH) GENERATED_FILE_PATHS = (