Repository: oppia/oppia

Issue:
No option for contributor (translator) dashboard as preferred dashboard
![Screenshot (10)](https://user-images.githubusercontent.com/115101990/225438620-ac3f4944-fa66-4722-b841-a68b376e7539.png)



Discussion:
Thanks, I agree that this seems reasonable to add as an option here.

Resolving patch:
diff --git a/core/controllers/profile.py b/core/controllers/profile.py
--- a/core/controllers/profile.py
+++ b/core/controllers/profile.py
@@ -444,7 +444,8 @@ class SignupHandler(
                     'type': 'basestring',
                     'choices': [
                         constants.DASHBOARD_TYPE_LEARNER,
-                        constants.DASHBOARD_TYPE_CREATOR
+                        constants.DASHBOARD_TYPE_CREATOR,
+                        constants.DASHBOARD_TYPE_CONTRIBUTOR
                     ]
                 }
             },
diff --git a/core/storage/user/gae_models.py b/core/storage/user/gae_models.py
--- a/core/storage/user/gae_models.py
+++ b/core/storage/user/gae_models.py
@@ -121,7 +121,10 @@ class UserSettingsModel(base_models.BaseModel):
         indexed=True,
         choices=[
             constants.DASHBOARD_TYPE_LEARNER,
-            constants.DASHBOARD_TYPE_CREATOR])
+            constants.DASHBOARD_TYPE_CREATOR,
+            constants.DASHBOARD_TYPE_CONTRIBUTOR
+        ]
+    )
     # The preferred dashboard display preference.
     creator_dashboard_display_pref = datastore_services.StringProperty(
         default=constants.ALLOWED_CREATOR_DASHBOARD_DISPLAY_PREFS['CARD'],


Test patch:
diff --git a/core/tests/build_sources/assets/constants.js b/core/tests/build_sources/assets/constants.js
--- a/core/tests/build_sources/assets/constants.js
+++ b/core/tests/build_sources/assets/constants.js
@@ -23,6 +23,7 @@ var constants = {
   "LIBRARY_TILE_WIDTH_PX": 208,
   "DASHBOARD_TYPE_CREATOR": "creator",
   "DASHBOARD_TYPE_LEARNER": "learner",
+  "DASHBOARD_TYPE_CONTRIBUTOR": "contributor",
   "DEFAULT_COLOR": "#a33f40",
   "DEFAULT_THUMBNAIL_ICON": "Lightbulb",
   "DEFAULT_CATEGORY_ICON": "Lightbulb",
diff --git a/core/tests/webdriverio_desktop/preferences.js b/core/tests/webdriverio_desktop/preferences.js
--- a/core/tests/webdriverio_desktop/preferences.js
+++ b/core/tests/webdriverio_desktop/preferences.js
@@ -150,6 +150,12 @@ describe('Preferences', function() {
       await preferencesPage.selectCreatorDashboard();
       await general.goToHomePage();
       await waitFor.urlToBe('http://localhost:9001/creator-dashboard');
+
+      await preferencesPage.get();
+      await preferencesPage.selectContributorDashboard();
+      await general.goToHomePage();
+      await waitFor.urlToBe('http://localhost:9001/contributor-dashboard');
+
       await preferencesPage.get();
       await preferencesPage.selectLearnerDashboard();
       await general.goToHomePage();
diff --git a/core/tests/webdriverio_utils/PreferencesPage.js b/core/tests/webdriverio_utils/PreferencesPage.js
--- a/core/tests/webdriverio_utils/PreferencesPage.js
+++ b/core/tests/webdriverio_utils/PreferencesPage.js
@@ -25,6 +25,7 @@ var PreferencesPage = function() {
   var USER_PREFERENCES_URL = '/preferences';
   var audioLanguageSelector = $('.e2e-test-audio-language-selector');
   var creatorDashboardRadio = $('.e2e-test-creator-dashboard-radio');
+  var contributorDashboardRadio = $('.e2e-test-contributor-dashboard-radio');
   var customProfilePhoto = $('.e2e-test-custom-photo');
   var deleteAccountButton = $('.e2e-test-delete-account-button');
   var editorRoleEmailsCheckbox = $('.e2e-test-editor-role-email-checkbox');
@@ -205,6 +206,12 @@ var PreferencesPage = function() {
     await saveNewChanges('Creator Dashboard Option');
   };
 
+  this.selectContributorDashboard = async function() {
+    await action.click(
+      'Contributor Dashboard radio', contributorDashboardRadio);
+    await saveNewChanges('Contributor Dashboard Option');
+  };
+
   this.selectLearnerDashboard = async function() {
     await action.click(
       'Learner Dashboard radio', learnerDashboardRadio);