From f94dcdc59394db2f629c6335e315c23003c6adb5 Mon Sep 17 00:00:00 2001 From: jainv4156 <123441149+jainv4156@users.noreply.github.com> Date: Fri, 7 Feb 2025 02:36:53 +0530 Subject: [PATCH] =?UTF-8?q?Rename=20tabs=20to=20'Learn'=20and=20'Study';?= =?UTF-8?q?=20update=20'revision=20card'=20to=20'study=20=E2=80=A6=20(#566?= =?UTF-8?q?8)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Explanation Fixes #5651 ## Essential Checklist - [ ] Any changes to [scripts/assets](https://github.com/oppia/oppia-android/tree/develop/scripts/assets) files have their rationale included in the PR explanation. - [x] The PR follows the [style guide](https://github.com/oppia/oppia-android/wiki/Coding-style-guide). - [x] The PR does not contain any unnecessary code changes from Android Studio ([reference](https://github.com/oppia/oppia-android/wiki/Guidance-on-submitting-a-PR#undo-unnecessary-changes)). - [x] The PR is made from a branch that's **not** called "develop" and is up-to-date with "develop". - [x] The PR is **assigned** to the appropriate reviewers ([reference](https://github.com/oppia/oppia-android/wiki/Guidance-on-submitting-a-PR#clarification-regarding-assignees-and-reviewers-section)). ## For UI-specific PRs only If your PR includes UI-related changes, then: - Add screenshots for portrait/landscape for both a tablet & phone of the before & after UI changes - For the screenshots above, include both English and pseudo-localized (RTL) screenshots (see [RTL guide](https://github.com/oppia/oppia-android/wiki/RTL-Guidelines)) - Add a video showing the full UX flow with a screen reader enabled (see [accessibility guide](https://github.com/oppia/oppia-android/wiki/Accessibility-A11y-Guide)) - For PRs introducing new UI elements or color changes, both light and dark mode screenshots must be included - Add a screenshot demonstrating that you ran affected Espresso tests locally & that they're passing ## UI Changes # Before ![image](https://github.com/user-attachments/assets/d4be38fb-6516-4a4d-a6d2-c704fb3acec7) # After ![image](https://github.com/user-attachments/assets/a6a9c255-89e7-4cfd-b68b-07738e9d0ea8) - I can't find the use of 'revision card' --------- Co-authored-by: Adhiambo Peres <59600948+adhiamboperes@users.noreply.github.com> --- .../android/app/topic/TopicFragmentPresenter.kt | 12 ++++++------ .../java/org/oppia/android/app/topic/TopicTab.kt | 8 ++++---- .../org/oppia/android/app/topic/ViewPagerAdapter.kt | 4 ++-- app/src/main/res/values/strings.xml | 6 +++--- ...of-the-Oppia-Android-codebase-and-architecture.md | 6 +++--- wiki/Spotlight-Guide.md | 8 ++++---- wiki/Terminology-in-Oppia.md | 6 +++--- 7 files changed, 25 insertions(+), 25 deletions(-) diff --git a/app/src/main/java/org/oppia/android/app/topic/TopicFragmentPresenter.kt b/app/src/main/java/org/oppia/android/app/topic/TopicFragmentPresenter.kt index cdade036e52..5b04139073f 100644 --- a/app/src/main/java/org/oppia/android/app/topic/TopicFragmentPresenter.kt +++ b/app/src/main/java/org/oppia/android/app/topic/TopicFragmentPresenter.kt @@ -86,7 +86,7 @@ class TopicFragmentPresenter @Inject constructor( fun startSpotlight() { viewModel.numberOfChaptersCompletedLiveData.observe(fragment) { numberOfChaptersCompleted -> if (numberOfChaptersCompleted != null) { - val lessonsTabView = tabLayout.getTabAt(computeTabPosition(TopicTab.LESSONS))?.view + val lessonsTabView = tabLayout.getTabAt(computeTabPosition(TopicTab.LEARN))?.view lessonsTabView?.let { val lessonsTabSpotlightTarget = SpotlightTarget( lessonsTabView, @@ -97,7 +97,7 @@ class TopicFragmentPresenter @Inject constructor( checkNotNull(getSpotlightManager()).requestSpotlight(lessonsTabSpotlightTarget) if (numberOfChaptersCompleted > 2) { - val revisionTabView = tabLayout.getTabAt(computeTabPosition(TopicTab.REVISION))?.view + val revisionTabView = tabLayout.getTabAt(computeTabPosition(TopicTab.STUDY))?.view val revisionTabSpotlightTarget = SpotlightTarget( revisionTabView!!, resourceHandler.getStringInLocale(R.string.topic_revision_tab_spotlight_hint), @@ -149,9 +149,9 @@ class TopicFragmentPresenter @Inject constructor( }.attach() if (!isConfigChanged && topicId.isNotEmpty()) { if (enableExtraTopicTabsUi.value) { - setCurrentTab(if (storyId.isNotEmpty()) TopicTab.LESSONS else TopicTab.INFO) + setCurrentTab(if (storyId.isNotEmpty()) TopicTab.LEARN else TopicTab.INFO) } else { - setCurrentTab(TopicTab.LESSONS) + setCurrentTab(TopicTab.LEARN) } } viewPager2.registerOnPageChangeCallback(object : ViewPager2.OnPageChangeCallback() { @@ -164,9 +164,9 @@ class TopicFragmentPresenter @Inject constructor( private fun logTopicEvents(tab: TopicTab) { val eventContext = when (tab) { TopicTab.INFO -> oppiaLogger.createOpenInfoTabContext(topicId) - TopicTab.LESSONS -> oppiaLogger.createOpenLessonsTabContext(topicId) + TopicTab.LEARN -> oppiaLogger.createOpenLessonsTabContext(topicId) TopicTab.PRACTICE -> oppiaLogger.createOpenPracticeTabContext(topicId) - TopicTab.REVISION -> oppiaLogger.createOpenRevisionTabContext(topicId) + TopicTab.STUDY -> oppiaLogger.createOpenRevisionTabContext(topicId) } analyticsController.logImportantEvent(eventContext, profileId) } diff --git a/app/src/main/java/org/oppia/android/app/topic/TopicTab.kt b/app/src/main/java/org/oppia/android/app/topic/TopicTab.kt index 3fbcead8bb6..055e7107cb3 100644 --- a/app/src/main/java/org/oppia/android/app/topic/TopicTab.kt +++ b/app/src/main/java/org/oppia/android/app/topic/TopicTab.kt @@ -19,10 +19,10 @@ enum class TopicTab( tabIconResId = R.drawable.ic_info_icon_24dp, contentDescriptionResId = R.string.info_tab_content_description ), - LESSONS( + LEARN( positionWithTwoTabs = 0, positionWithFourTabs = 1, - tabLabelResId = R.string.lessons, + tabLabelResId = R.string.learn, tabIconResId = R.drawable.ic_lessons_icon_24dp, contentDescriptionResId = R.string.lessons_tab_content_description ), @@ -33,10 +33,10 @@ enum class TopicTab( tabIconResId = R.drawable.ic_practice_icon_24dp, contentDescriptionResId = R.string.practice_tab_content_description ), - REVISION( + STUDY( positionWithTwoTabs = 1, positionWithFourTabs = 3, - tabLabelResId = R.string.revision, + tabLabelResId = R.string.study, tabIconResId = R.drawable.ic_revision_icon_24dp, contentDescriptionResId = R.string.revision_tab_content_description ); diff --git a/app/src/main/java/org/oppia/android/app/topic/ViewPagerAdapter.kt b/app/src/main/java/org/oppia/android/app/topic/ViewPagerAdapter.kt index 2481285a63f..7f93e7928cf 100644 --- a/app/src/main/java/org/oppia/android/app/topic/ViewPagerAdapter.kt +++ b/app/src/main/java/org/oppia/android/app/topic/ViewPagerAdapter.kt @@ -25,13 +25,13 @@ class ViewPagerAdapter( TopicTab.INFO -> { TopicInfoFragment.newInstance(profileId, topicId) } - TopicTab.LESSONS -> { + TopicTab.LEARN -> { TopicLessonsFragment.newInstance(profileId, classroomId, topicId, storyId) } TopicTab.PRACTICE -> { TopicPracticeFragment.newInstance(profileId, topicId) } - TopicTab.REVISION -> { + TopicTab.STUDY -> { TopicRevisionFragment.newInstance(profileId, topicId) } } diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 15ee1fdbc10..4d6299de34d 100755 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -30,7 +30,7 @@ Concept Card Concept Card 1 Concept Card 2 - Revision Card + Study Guide Leave to Topic Page? Your progress will not be saved. Leave @@ -82,9 +82,9 @@ Introduction Frequently Asked Questions (FAQs) Info - Lessons + Learn Practice - Revision + Study Administrator Controls Topic page Topic: %s diff --git a/wiki/Overview-of-the-Oppia-Android-codebase-and-architecture.md b/wiki/Overview-of-the-Oppia-Android-codebase-and-architecture.md index 31c790b5aca..a74bcf127f5 100644 --- a/wiki/Overview-of-the-Oppia-Android-codebase-and-architecture.md +++ b/wiki/Overview-of-the-Oppia-Android-codebase-and-architecture.md @@ -34,7 +34,7 @@ This module contains all the activities and fragments, as well as the view, view - **app/view** - Basic Dagger code for View implementation. - **app/viewmodel** - Basic Dagger code for ViewModel implementation. -In addition to the above-mentioned subdirectories, this module also contains other subdirectories that contain activities, fragments, interfaces and view models for various screens in the app. These subdirectories follow the naming convention **app/**. For example, the subdirectory **app/resumeLesson** contains all the activities, fragments, interfaces and ViewModels used by the resume lesson screen. +In addition to the above-mentioned subdirectories, this module also contains other subdirectories that contain activities, fragments, interfaces and view models for various screens in the app. These subdirectories follow the naming convention **app/**. For example, the subdirectory **app/resumeLessonLesson** contains all the activities, fragments, interfaces and ViewModels used by the resume lesson screen. #### 2. data @@ -152,7 +152,7 @@ Following these steps would lead to completing the entire task with all the code **Task:** -Finding code from a string ( e g., story name under lessons tab) that you see in UI when running the app all the way to the UI components, domain controllers and the tests ultimately behind that text appearing. +Finding code from a string ( e g., story name under Learn tab) that you see in UI when running the app all the way to the UI components, domain controllers and the tests ultimately behind that text appearing. example 2 task image @@ -162,7 +162,7 @@ Finding code from a string ( e g., story name under lessons tab) that you see in 1. The first step is to identify the id of the UI component that is responsible for displaying the text. We can do this by using the layout inspector of the android studio. -2. To do this, run the app on an emulator. Now navigate to the screen that displays the UI component, i.e. the lessons tab. +2. To do this, run the app on an emulator. Now navigate to the screen that displays the UI component, i.e. the Learn tab. 3. Next, open the layout inspector from the android studio, and click on the UI component displaying the story name. Now all the attributes of this UI component are displayed on the right side of the layout inspector. Here, you can see this UI component's id, i.e. story_name_text_view. diff --git a/wiki/Spotlight-Guide.md b/wiki/Spotlight-Guide.md index 60d4db2dff9..a60a9b5a97c 100644 --- a/wiki/Spotlight-Guide.md +++ b/wiki/Spotlight-Guide.md @@ -48,10 +48,10 @@ message Spotlight { // Corresponds to the onboarding screen's next button. SpotlightViewState onboarding_next_button = 1; - // Corresponds to the topic fragment's lessons tab. + // Corresponds to the topic fragment's Learn tab. SpotlightViewState topic_lesson_tab = 2; - // Corresponds to the topic fragment's revision tab. + // Corresponds to the topic fragment's Study tab. SpotlightViewState topic_revision_tab = 3; // Add and describe your new spotlit feature here. @@ -65,10 +65,10 @@ message SpotlightStateDatabase { // Corresponds to the onboarding screen's next button. SpotlightViewState onboarding_next_button = 1; - // Corresponds to the topic fragment's lessons tab. + // Corresponds to the topic fragment's Learn tab. SpotlightViewState topic_lesson_tab = 2; - // Corresponds to the topic fragment's revision tab. + // Corresponds to the topic fragment's Study tab. SpotlightViewState topic_revision_tab = 3; // Similarly, add storage for your new feature here. diff --git a/wiki/Terminology-in-Oppia.md b/wiki/Terminology-in-Oppia.md index 6ad759808c3..816412340a8 100644 --- a/wiki/Terminology-in-Oppia.md +++ b/wiki/Terminology-in-Oppia.md @@ -42,14 +42,14 @@ C4 --> c6("Card-6") 3. **Promoted Story**: Promoted Story is mainly the recent Story/Chapter you played. It is shown on the "home screen" with heading text "Stories For You". 4. **Skill**: This is a concrete learning outcome that describes something that a learner should be able to do. It is usually stated in the form “Given X, compute/calculate/draw/etc. Y.” For example: “Given a fraction, identify its numerator.” 5. **Exploration/Chapter**: This is a structured learning experience that is part of a story, and provides the learner with an active way to learn new concepts, as well as targeted feedback. It is the core unit of learning in Oppia. The flow/screen that appears when any story is started is known as the Exploration/Chapter. -6. **Concept Card**: This is a non-story-based explanation of how to perform a particular skill. It serves as a reference/reminder for students who may have encountered the skill before but forgotten how to carry it out. These can be accessed from the "Revision" tab or are linked within the chapter you are playing. +6. **Concept Card**: This is a non-story-based explanation of how to perform a particular skill. It serves as a reference/reminder for students who may have encountered the skill before but forgotten how to carry it out. These can be accessed from the "Study" tab or are linked within the chapter you are playing. 7. **Question/QuestionPlayer**: This is a standalone question that may be used by students as part of a practice session. - +8. **Study Guide/Revision Card**: A Study Guide summarizes key topics and concepts, helping users quickly review and reinforce what they have learned. Note that the UI displays "Study Guide" instead of "Revision Card", though the codebase still uses the term "revision card" for consistency. ## How to visit? ### Concept Card -`Home` --> `Choose Topic` --> `Revision Tab` --> `Select revision card` --> `Goto hyperlink present in description text` +`Home` --> `Choose Topic` --> `Study Tab` --> `Select Study Guide` --> `Goto hyperlink present in description text` Visit Concept Card