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 #4909 : Remove the unused condition from various lessons_chapters_view for Accessibility #4910

Merged
merged 34 commits into from
Jul 4, 2023
Merged
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
a766855
Remove unused importantForAccessibility conditions
MohitGupta121 Mar 18, 2023
b985122
Fixed review changes.
MohitGupta121 Mar 18, 2023
bae82e7
Changes as per review
MohitGupta121 Mar 18, 2023
67a21a3
Merge branch 'develop' into remove_unused_conditions
MohitGupta121 Mar 21, 2023
7b9d5fc
Merge branch 'develop' into remove_unused_conditions
MohitGupta121 Mar 22, 2023
c67c882
Merge branch 'develop' into remove_unused_conditions
MohitGupta121 Mar 25, 2023
5419291
Merge branch 'develop' into remove_unused_conditions
MohitGupta121 Apr 4, 2023
461db1c
Merge branch 'develop' into remove_unused_conditions
MohitGupta121 Apr 6, 2023
5783039
Merge branch 'develop' into remove_unused_conditions
MohitGupta121 Apr 12, 2023
3c8bbb5
Merge branch 'develop' into remove_unused_conditions
MohitGupta121 Apr 15, 2023
c637f48
Merge branch 'develop' into remove_unused_conditions
MohitGupta121 Apr 18, 2023
671008d
Merge branch 'develop' into remove_unused_conditions
MohitGupta121 Apr 25, 2023
c75aa31
Merge branch 'develop' into remove_unused_conditions
MohitGupta121 May 2, 2023
b4eeca5
Merge branch 'develop' into remove_unused_conditions
MohitGupta121 May 4, 2023
30e391c
Merge branch 'develop' into remove_unused_conditions
MohitGupta121 May 9, 2023
340a44f
Merge branch 'develop' into remove_unused_conditions
MohitGupta121 May 15, 2023
63b2826
Merge branch 'develop' into remove_unused_conditions
MohitGupta121 May 21, 2023
ef3c5c7
Merge branch 'develop' into remove_unused_conditions
MohitGupta121 May 26, 2023
a05d82d
Merge branch 'develop' into remove_unused_conditions
MohitGupta121 May 31, 2023
0c5fc5a
Merge remote-tracking branch 'upstream/develop' into remove_unused_co…
MohitGupta121 Jun 6, 2023
ca66448
Fix Lock chapter talkback
MohitGupta121 Jun 6, 2023
cfa6c18
Merge branch 'develop' into remove_unused_conditions
MohitGupta121 Jun 6, 2023
317855f
Fix one failed test
MohitGupta121 Jun 6, 2023
08de88f
Merge remote-tracking branch 'origin/remove_unused_conditions' into r…
MohitGupta121 Jun 6, 2023
4ea7dbb
Merge branch 'develop' into remove_unused_conditions
MohitGupta121 Jun 9, 2023
defd3d5
Merge branch 'develop' into remove_unused_conditions
MohitGupta121 Jun 15, 2023
aca1b39
Fix duplicate talkbacks
MohitGupta121 Jun 15, 2023
c0875f3
Merge branch 'develop' into remove_unused_conditions
MohitGupta121 Jun 19, 2023
2ee7e6b
Fixed content description test
MohitGupta121 Jun 20, 2023
2643b02
Merge branch 'develop' into remove_unused_conditions
MohitGupta121 Jun 28, 2023
52d6afc
Merge branch 'develop' into remove_unused_conditions
MohitGupta121 Jun 29, 2023
3a6fb92
Merge remote-tracking branch 'upstream/develop' into remove_unused_co…
MohitGupta121 Jun 30, 2023
463d3e4
Attempt 1 to fix test
MohitGupta121 Jul 1, 2023
2a9341a
Fix some naming
MohitGupta121 Jul 3, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@ class ChapterSummaryViewModel(
ChapterPlayState.NOT_PLAYABLE_MISSING_PREREQUISITES -> {
if (previousChapterTitle != null) {
resourceHandler.getStringInLocaleWithWrapping(
R.string.chapter_prerequisite_title_label, index.toString(), previousChapterTitle
R.string.chapter_prerequisite_title_label,
(index + 1).toString(),
chapterTitle,
index.toString(),
previousChapterTitle
)
} else {
resourceHandler.getStringInLocaleWithWrapping(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
android:layout_gravity="center"
android:layout_marginStart="10dp"
android:fontFamily="sans-serif"
android:importantForAccessibility="@{viewModel.chapterPlayState != ChapterPlayState.NOT_PLAYABLE_MISSING_PREREQUISITES ? View.IMPORTANT_FOR_ACCESSIBILITY_YES : View.IMPORTANT_FOR_ACCESSIBILITY_NO}"
android:importantForAccessibility="no"
android:minWidth="20dp"
android:minHeight="20dp"
android:text="@{viewModel.computePlayChapterIndexText()}"
Expand All @@ -59,7 +59,7 @@
android:background="@drawable/chapter_white_bg_with_bright_green_border"
android:fontFamily="sans-serif"
android:gravity="center|start"
android:importantForAccessibility="@{viewModel.chapterPlayState != ChapterPlayState.NOT_PLAYABLE_MISSING_PREREQUISITES ? View.IMPORTANT_FOR_ACCESSIBILITY_YES : View.IMPORTANT_FOR_ACCESSIBILITY_NO}"
android:importantForAccessibility="no"
android:minHeight="48dp"
android:paddingStart="12dp"
android:paddingEnd="12dp"
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout/lessons_locked_chapter_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
android:layout_gravity="center"
android:layout_marginStart="10dp"
android:fontFamily="sans-serif"
android:importantForAccessibility="@{viewModel.chapterPlayState != ChapterPlayState.NOT_PLAYABLE_MISSING_PREREQUISITES ? View.IMPORTANT_FOR_ACCESSIBILITY_YES : View.IMPORTANT_FOR_ACCESSIBILITY_NO}"
rt4914 marked this conversation as resolved.
Show resolved Hide resolved
android:importantForAccessibility="no"
android:minWidth="20dp"
android:minHeight="20dp"
android:text="@{viewModel.computePlayChapterIndexText()}"
Expand Down Expand Up @@ -65,7 +65,7 @@
android:background="@color/component_color_lessons_tab_activity_lessons_locked_chapter_name_background_color"
android:fontFamily="sans-serif"
android:gravity="center|start"
android:importantForAccessibility="@{viewModel.chapterPlayState != ChapterPlayState.NOT_PLAYABLE_MISSING_PREREQUISITES ? View.IMPORTANT_FOR_ACCESSIBILITY_YES : View.IMPORTANT_FOR_ACCESSIBILITY_NO}"
android:importantForAccessibility="no"
adhiamboperes marked this conversation as resolved.
Show resolved Hide resolved
android:minHeight="48dp"
android:paddingStart="12dp"
android:paddingEnd="12dp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
android:background="@drawable/chapter_dark_green_bg_with_bright_green_border"
android:fontFamily="sans-serif"
android:gravity="center"
android:importantForAccessibility="@{viewModel.chapterPlayState != ChapterPlayState.NOT_PLAYABLE_MISSING_PREREQUISITES ? View.IMPORTANT_FOR_ACCESSIBILITY_YES : View.IMPORTANT_FOR_ACCESSIBILITY_NO}"
android:importantForAccessibility="no"
android:minWidth="60dp"
android:minHeight="48dp"
android:paddingStart="8dp"
Expand All @@ -48,7 +48,7 @@
android:layout_height="0dp"
android:fontFamily="sans-serif"
android:gravity="center|start"
android:importantForAccessibility="@{viewModel.chapterPlayState != ChapterPlayState.NOT_PLAYABLE_MISSING_PREREQUISITES ? View.IMPORTANT_FOR_ACCESSIBILITY_YES : View.IMPORTANT_FOR_ACCESSIBILITY_NO}"
android:importantForAccessibility="no"
android:minHeight="48dp"
android:paddingStart="12dp"
android:paddingEnd="12dp"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
<string name="chapter_name">Chapter %s: %s</string>
<string name="chapter_completed">Chapter %s with title %s is completed</string>
<string name="chapter_in_progress">Chapter %s with title %s is in progress</string>
<string name="chapter_prerequisite_title_label">Complete Chapter %s: %s to unlock this chapter.</string>
<string name="chapter_prerequisite_title_label">Chapter %s: %s is currently locked. Please complete chapter %s: %s to unlock this chapter.</string>
<string name="chapter_prerequisite_title_label_without_chapter_title">Complete the previous chapter to unlock this chapter.</string>
<string name="text_input_default_content_description">Enter text.</string>
<string name="fractions_default_hint_text">Enter a fraction in the form x/x, or a mixed number in the form x x/x.</string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,16 +151,25 @@ import javax.inject.Singleton
qualifiers = "port-xxhdpi"
)
class TopicLessonsFragmentTest {
@get:Rule val initializeDefaultLocaleRule = InitializeDefaultLocaleRule()
@get:Rule val oppiaTestRule = OppiaTestRule()

@Inject lateinit var testCoroutineDispatchers: TestCoroutineDispatchers
@Inject lateinit var storyProgressTestHelper: StoryProgressTestHelper
@Inject lateinit var fakeOppiaClock: FakeOppiaClock
@Inject lateinit var fakeAccessibilityService: FakeAccessibilityService
@Inject lateinit var spotlightStateController: SpotlightStateController
@Inject lateinit var explorationCheckpointTestHelper: ExplorationCheckpointTestHelper
@Inject lateinit var fakeExplorationRetriever: FakeExplorationRetriever
@get:Rule
val initializeDefaultLocaleRule = InitializeDefaultLocaleRule()
@get:Rule
val oppiaTestRule = OppiaTestRule()

@Inject
lateinit var testCoroutineDispatchers: TestCoroutineDispatchers
@Inject
lateinit var storyProgressTestHelper: StoryProgressTestHelper
@Inject
lateinit var fakeOppiaClock: FakeOppiaClock
@Inject
lateinit var fakeAccessibilityService: FakeAccessibilityService
@Inject
lateinit var spotlightStateController: SpotlightStateController
@Inject
lateinit var explorationCheckpointTestHelper: ExplorationCheckpointTestHelper
@Inject
lateinit var fakeExplorationRetriever: FakeExplorationRetriever

@field:[Inject EnableExtraTopicTabsUi]
lateinit var enableExtraTopicTabsUiValue: PlatformParameterValue<Boolean>
Expand Down Expand Up @@ -365,7 +374,8 @@ class TopicLessonsFragmentTest {
.check(
matches(
withContentDescription(
"Complete Chapter 1: What is a Ratio? to unlock this chapter."
"Chapter 2: What is a Ratio? is currently locked. Please complete chapter 1: " +
"Exploration to unlock this chapter."
)
)
)
Expand Down