Skip to content

Commit

Permalink
Apply folders by feature to Exploration Player and Admin page (oppia#…
Browse files Browse the repository at this point in the history
…6892)

* Exploration player

* Fix lint

* Fix e2e

* Admin page

* Fix e2e

* fix e2e

* Fix e2e
  • Loading branch information
YashJipkate authored and seanlip committed Jun 12, 2019
1 parent 49b672f commit 419a0f2
Show file tree
Hide file tree
Showing 125 changed files with 360 additions and 231 deletions.
4 changes: 2 additions & 2 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
/core/templates/dev/head/domain/summary/ @aks681
/core/templates/dev/head/domain/state_card/ @aks681
/core/templates/dev/head/pages/exploration-editor-page/ @DubeySandeep
/core/templates/dev/head/pages/exploration_player/ @aks681
/core/templates/dev/head/pages/exploration-player-page/ @aks681
/core/templates/dev/head/components/state-editor/ @aks681
/core/templates/dev/head/services/ComputeGraphService.ts @DubeySandeep
/core/templates/dev/head/services/ContextService*.ts @aks681
Expand Down Expand Up @@ -334,7 +334,7 @@
/core/controllers/moderator*.py @seanlip
/core/controllers/recent_commits*.py @seanlip
/core/domain/moderator_services*.py @seanlip
/core/templates/dev/head/pages/admin/ @seanlip
/core/templates/dev/head/pages/admin-page/ @seanlip
/core/templates/dev/head/pages/moderator-page/ @seanlip


Expand Down
2 changes: 1 addition & 1 deletion core/controllers/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def get(self):
'role_graph_data': role_services.get_role_graph_data()
})

self.render_template('dist/admin.html')
self.render_template('dist/admin-page.mainpage.html')


class AdminHandler(base.BaseHandler):
Expand Down
4 changes: 2 additions & 2 deletions core/controllers/reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ def get(self, exploration_id):
self.values.update(exploration_data_values)
self.values['iframed'] = True
self.render_template(
'dist/exploration_player.html',
'dist/exploration-player-page.mainpage.html',
iframe_restriction=None)


Expand Down Expand Up @@ -234,7 +234,7 @@ def get(self, exploration_id):
self.values.update(exploration_data_values)
self.values['iframed'] = False
self.render_template(
'dist/exploration_player.html')
'dist/exploration-player-page.mainpage.html')


class ExplorationHandler(base.BaseHandler):
Expand Down
3 changes: 2 additions & 1 deletion core/templates/dev/head/App.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@ oppia.constant('SITE_NAME', 'Oppia.org');

oppia.constant('DEFAULT_PROFILE_IMAGE_PATH', '/avatar/user_blue_72px.png');
oppia.constant('FEEDBACK_POPOVER_PATH',
'/pages/exploration_player/feedback_popup_container_directive.html');
'/pages/exploration-player-page/templates/' +
'feedback-popup-container.template.html');

oppia.constant('LOGOUT_URL', '/logout');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,17 @@
* @fileoverview Directive for hint and solution buttons.
*/

require('pages/exploration_player/ExplorationPlayerStateService.ts');
require('pages/exploration_player/HintsAndSolutionManagerService.ts');
require('pages/exploration_player/HintAndSolutionModalService.ts');
require('pages/exploration_player/PlayerConstants.ts');
require('pages/exploration_player/PlayerPositionService.ts');
require('pages/exploration_player/PlayerTranscriptService.ts');
require('pages/exploration_player/StatsReportingService.ts');
require(
'pages/exploration-player-page/services/exploration-player-state.service.ts');
require(
'pages/exploration-player-page/services/' +
'hints-and-solution-manager.service.ts');
require(
'pages/exploration-player-page/services/hint-and-solution-modal.service.ts');
require('pages/exploration-player-page/exploration-player-page.constants.ts');
require('pages/exploration-player-page/services/player-position.service.ts');
require('pages/exploration-player-page/services/player-transcript.service.ts');
require('pages/exploration-player-page/services/stats-reporting.service.ts');
require('services/ContextService.ts');
require('services/contextual/DeviceInfoService.ts');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,18 @@ require(
require(
'components/common-layout-directives/common-elements/' +
'background-banner.directive.ts');
require('pages/exploration_player/ConversationSkinDirective.ts');
require('pages/exploration_player/ExplorationFooterDirective.ts');
require('pages/exploration_player/LearnerLocalNavDirective.ts');
require('pages/exploration_player/LearnerViewInfoDirective.ts');
require(
'pages/exploration-player-page/learner-experience/' +
'conversation-skin.directive.ts');
require(
'pages/exploration-player-page/layout-directives/' +
'exploration-footer.directive.ts');
require(
'pages/exploration-player-page/layout-directives/' +
'learner-local-nav.directive.ts');
require(
'pages/exploration-player-page/layout-directives/' +
'learner-view-info.directive.ts');

oppia.directive('questionPlayer', [
'$http', 'UrlInterpolationService',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ require(
require(
'pages/exploration-editor-page/editor-tab/services/' +
'solution-verification.service.ts');
require('pages/exploration_player/CurrentInteractionService.ts');
require(
'pages/exploration-player-page/services/current-interaction.service.ts');
require(
'components/state-editor/state-editor-properties-services/' +
'state-customization-args.service.ts');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@

require('domain/classifier/AnswerClassificationResultObjectFactory.ts');
require('domain/exploration/OutcomeObjectFactory.ts');
require('pages/exploration_player/AnswerClassificationService.ts');
require(
'pages/exploration-player-page/services/answer-classification.service.ts');

describe('Answer classification result object factory', function() {
var oof, acrof;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

require('domain/exploration/ReadOnlyExplorationBackendApiService.ts');
require('domain/utilities/UrlInterpolationService.ts');
require('pages/exploration_player/PlayerConstants.ts');
require('pages/exploration-player-page/exploration-player-page.constants.ts');

oppia.factory('EditableExplorationBackendApiService', [
'$http', '$q', 'ReadOnlyExplorationBackendApiService',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

require('domain/utilities/UrlInterpolationService.ts');
require('pages/exploration_player/PlayerConstants.ts');
require('pages/exploration-player-page/exploration-player-page.constants.ts');

oppia.factory('ReadOnlyExplorationBackendApiService', [
'$http', '$q', 'UrlInterpolationService',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
* card domain objects used in the exploration player.
*/

require('pages/exploration_player/AudioTranslationLanguageService.ts');
require(
'pages/exploration-player-page/services/' +
'audio-translation-language.service.ts');
require('services/ExplorationHtmlFormatterService.ts');

oppia.factory('StateCardObjectFactory', [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

require('domain/objects/NumberWithUnitsObjectFactory.ts');
require('domain/utilities/UrlInterpolationService.ts');
require('pages/admin/AdminTaskManagerService.ts');
require('pages/admin-page/services/admin-task-manager.service.ts');

oppia.directive('adminDevModeActivitiesTab', [
'$http', 'AdminTaskManagerService', 'UrlInterpolationService',
Expand All @@ -33,8 +33,8 @@ oppia.directive('adminDevModeActivitiesTab', [
setStatusMessage: '='
},
templateUrl: UrlInterpolationService.getDirectiveTemplateUrl(
'/pages/admin/activities_tab/' +
'admin_dev_mode_activities_tab_directive.html'),
'/pages/admin-page/activities-tab/' +
'admin-dev-mode-activities-tab.directive.html'),
controllerAs: '$ctrl',
controller: [function() {
var ctrl = this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ oppia.directive('adminProdModeActivitiesTab', [
scope: {},
bindToController: {},
templateUrl: UrlInterpolationService.getDirectiveTemplateUrl(
'/pages/admin/activities_tab/' +
'admin_prod_mode_activities_tab_directive.html'),
'/pages/admin-page/activities-tab/' +
'admin-prod-mode-activities-tab.directive.html'),
controllerAs: '$ctrl',
controller: [function() {}]
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,18 +62,21 @@ require(
'schema-based-unicode-editor.directive.ts');
// ^^^ this block of requires should be removed ^^^

require('pages/admin/AdminNavbarDirective.ts');
require('pages/admin/activities_tab/AdminDevModeActivitiesTabDirective.ts');
require('pages/admin/activities_tab/AdminProdModeActivitiesTabDirective.ts');
require('pages/admin/config_tab/AdminConfigTabDirective.ts');
require('pages/admin/jobs_tab/AdminJobsTabDirective.ts');
require('pages/admin/misc_tab/AdminMiscTabDirective.ts');
require('pages/admin/roles_tab/AdminRolesTabDirective.ts');
require('pages/admin-page/navbar/admin-navbar.directive.ts');
require(
'pages/admin-page/activities-tab/admin-dev-mode-activities-tab.directive.ts');
require(
'pages/admin-page/activities-tab/' +
'admin-prod-mode-activities-tab.directive.ts');
require('pages/admin-page/config-tab/admin-config-tab.directive.ts');
require('pages/admin-page/jobs-tab/admin-jobs-tab.directive.ts');
require('pages/admin-page/misc-tab/admin-misc-tab.directive.ts');
require('pages/admin-page/roles-tab/admin-roles-tab.directive.ts');
require('value_generators/valueGeneratorsRequires.ts');

require('domain/objects/NumberWithUnitsObjectFactory.ts');
require('domain/utilities/UrlInterpolationService.ts');
require('pages/admin/AdminRouterService.ts');
require('pages/admin-page/services/admin-router.service.ts');
require('services/UtilsService.ts');

oppia.constant('ADMIN_HANDLER_URL', '/adminhandler');
Expand All @@ -91,7 +94,7 @@ oppia.directive('adminPage', ['UrlInterpolationService',
scope: {},
bindToController: {},
templateUrl: UrlInterpolationService.getDirectiveTemplateUrl(
'/pages/admin/admin_page_directive.html'),
'/pages/admin-page/admin-page.directive.html'),
controllerAs: '$ctrl',
controller: [
'$http', '$location', '$scope', 'AdminRouterService', 'DEV_MODE',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
* @fileoverview Directives required in admin panel.
*/

require('pages/admin/AdminPageDirective.ts');
require('pages/admin-page/admin-page.directive.ts');
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/

require('domain/utilities/UrlInterpolationService.ts');
require('pages/admin/AdminTaskManagerService.ts');
require('pages/admin-page/services/admin-task-manager.service.ts');

oppia.directive('adminConfigTab', [
'$http', 'AdminTaskManagerService', 'UrlInterpolationService',
Expand All @@ -30,8 +30,7 @@ oppia.directive('adminConfigTab', [
setStatusMessage: '='
},
templateUrl: UrlInterpolationService.getDirectiveTemplateUrl(
'/pages/admin/config_tab/' +
'admin_config_tab_directive.html'),
'/pages/admin-page/config-tab/admin-config-tab.directive.html'),
controllerAs: '$ctrl',
controller: [function() {
var ctrl = this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ oppia.directive('adminJobsTab', [
setStatusMessage: '='
},
templateUrl: UrlInterpolationService.getDirectiveTemplateUrl(
'/pages/admin/jobs_tab/' +
'admin_jobs_tab_directive.html'),
'/pages/admin-page/jobs-tab/admin-jobs-tab.directive.html'),
controllerAs: '$ctrl',
controller: [function() {
var ctrl = this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/

require('domain/utilities/UrlInterpolationService.ts');
require('pages/admin/AdminTaskManagerService.ts');
require('pages/admin-page/services/admin-task-manager.service.ts');

oppia.directive('adminMiscTab', [
'$http', '$window', 'AdminTaskManagerService', 'UrlInterpolationService',
Expand All @@ -32,8 +32,7 @@ oppia.directive('adminMiscTab', [
setStatusMessage: '='
},
templateUrl: UrlInterpolationService.getDirectiveTemplateUrl(
'/pages/admin/misc_tab/' +
'admin_misc_tab_directive.html'),
'/pages/admin-page/misc-tab/admin-misc-tab.directive.html'),
controllerAs: '$ctrl',
controller: [function() {
var ctrl = this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/

require('domain/utilities/UrlInterpolationService.ts');
require('pages/admin/AdminRouterService.ts');
require('pages/admin-page/services/admin-router.service.ts');
require('services/UserService.ts');

oppia.directive('adminNavbar', [
Expand All @@ -33,8 +33,7 @@ oppia.directive('adminNavbar', [
getUserEmail: '&userEmail'
},
templateUrl: UrlInterpolationService.getDirectiveTemplateUrl(
'/pages/admin/' +
'admin_navbar_directive.html'),
'/pages/admin-page/navbar/admin-navbar.directive.html'),
controllerAs: '$ctrl',
controller: ['UserService', function(UserService) {
var ctrl = this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
* @fileoverview Directive for the Roles tab in the admin panel.
*/

require('pages/admin/roles_tab/RoleGraphDirective.ts');
require('pages/admin-page/roles-tab/role-graph.directive.ts');

require('domain/utilities/UrlInterpolationService.ts');
require('pages/admin/AdminTaskManagerService.ts');
require('pages/admin-page/services/admin-task-manager.service.ts');

oppia.directive('adminRolesTab', [
'$http', 'AdminTaskManagerService', 'UrlInterpolationService',
Expand All @@ -34,7 +34,7 @@ oppia.directive('adminRolesTab', [
setStatusMessage: '='
},
templateUrl: UrlInterpolationService.getDirectiveTemplateUrl(
'/pages/admin/roles_tab/roles_tab_directive.html'),
'/pages/admin-page/roles-tab/role-graph.directive.html'),
controllerAs: '$ctrl',
controller: [function() {
var ctrl = this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ oppia.directive('roleGraph', [
graphDataLoaded: '@'
},
templateUrl: UrlInterpolationService.getDirectiveTemplateUrl(
'/pages/admin/roles_tab/role_graph_directive.html'),
'/pages/admin-page/roles-tab/admin-roles-tab.directive.html'),
controllerAs: '$ctrl',
controller: [
'$element', '$timeout', '$filter', 'StateGraphLayoutService',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* @fileoverview Tests for AdminRouterService.
*/

require('pages/admin/AdminRouterService.ts');
require('pages/admin-page/services/admin-router.service.ts');

describe('Admin router service', function() {
var AdminRouterService = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* @fileoverview Tests for AdminTaskManagerService.
*/

require('pages/admin/AdminTaskManagerService.ts');
require('pages/admin-page/services/admin-task-manager.service.ts');

describe('Admin task manager service', function() {
var AdminTaskManagerService = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ require(
'components/common-layout-directives/common-elements/' +
'background-banner.directive.ts');
require('components/summary-tile/collection-summary-tile.directive.ts');
require('pages/exploration_player/PlayerConstants.ts');
require('pages/exploration-player-page/exploration-player-page.constants.ts');
require(
'pages/exploration-editor-page/feedback-tab/thread-table/' +
'thread-table.directive.ts');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
*/

require('pages/exploration-editor-page/services/angular-name.service.ts');
require('pages/exploration_player/AnswerClassificationService.ts');
require(
'pages/exploration-player-page/services/answer-classification.service.ts');
require(
'components/state-editor/state-editor-properties-services/' +
'state-editor.service.ts');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@

require('domain/utilities/UrlInterpolationService.ts');
require('pages/exploration-editor-page/services/exploration-states.service.ts');
require('pages/exploration_player/CurrentInteractionService.ts');
require(
'pages/exploration-player-page/services/current-interaction.service.ts');

oppia.directive('testInteractionPanel', [
'UrlInterpolationService', function(UrlInterpolationService) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,10 @@ require(
require(
'pages/exploration-editor-page/editor-tab/training-panel/' +
'training-modal.service.ts');
require('pages/exploration_player/AnswerClassificationService.ts');
require('pages/exploration_player/CurrentInteractionService.ts');
require(
'pages/exploration-player-page/services/answer-classification.service.ts');
require(
'pages/exploration-player-page/services/current-interaction.service.ts');
require(
'components/state-editor/state-editor-properties-services/' +
'state-editor.service.ts');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ require(
require(
'pages/exploration-editor-page/editor-tab/training-panel/' +
'training-data.service.ts');
require('pages/exploration_player/AnswerClassificationService.ts');
require(
'pages/exploration-player-page/services/answer-classification.service.ts');
require(
'components/state-editor/state-editor-properties-services/' +
'state-editor.service.ts');
Expand Down
Loading

0 comments on commit 419a0f2

Please sign in to comment.