Skip to content

Commit

Permalink
Fix #4397, #4923: Change the closing button description for consisten…
Browse files Browse the repository at this point in the history
…cy & gender neutral profile image (#4953)

Fixes #4397: The closing button on the nav bar of concept card activity
had inconsistent voice output, it is changed to "navigate up" for
consistency.
Fixes #4923: "Have outline person as default gender-neutral image"
 

## Essential Checklist
<!-- Please tick the relevant boxes by putting an "x" in them. -->
- [x] The PR title and explanation each start with "Fix #bugnum: " (If
this PR fixes part of an issue, prefix the title with "Fix part of
#bugnum: ...".)
- [x] 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

![Screenshot 2023-05-09
120944](https://github.com/oppia/oppia-android/assets/74568012/7487abae-ad58-4807-8731-5a057d681afa)
![Screenshot 2023-05-09
120920](https://github.com/oppia/oppia-android/assets/74568012/0c583328-9f6c-4dcb-89f1-3903008290a5)
![Screenshot 2023-05-09
120932](https://github.com/oppia/oppia-android/assets/74568012/d6c9bf8f-f917-4e30-a7ae-169c9e10a07b)
![Screenshot 2023-05-09
134648](https://github.com/oppia/oppia-android/assets/74568012/ed5327d8-8886-4b3c-8f16-c29919560ef0)
![Screenshot 2023-05-09
134632](https://github.com/oppia/oppia-android/assets/74568012/00a5173d-6f7b-4599-b95e-71fcfacc33ff)


- For the screenshots above, include both English and pseudo-localized
(RTL) screenshots (see [RTL guide]


![Screenshot 2023-05-09
135514](https://github.com/oppia/oppia-android/assets/74568012/c93c128a-7040-4cc1-9193-dc86edce3c68)
![Screenshot 2023-05-09
135209](https://github.com/oppia/oppia-android/assets/74568012/3cee8597-1230-478a-8e8c-1bdff8ac1650)
![Screenshot 2023-05-09
135235](https://github.com/oppia/oppia-android/assets/74568012/367b6e81-98c5-41ff-9c5d-8563d18385bf)
![Screenshot 2023-05-09
135319](https://github.com/oppia/oppia-android/assets/74568012/b915a26c-9e93-433d-8604-e79d401be19b)

---------

Co-authored-by: Ben Henning <ben@oppia.org>
  • Loading branch information
XichengSpencer and BenHenning authored May 16, 2023
1 parent 832f9ce commit da80fab
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class ConceptCardFragmentPresenter @Inject constructor(

binding.conceptCardToolbar.setNavigationIcon(R.drawable.ic_close_white_24dp)
binding.conceptCardToolbar.setNavigationContentDescription(
R.string.concept_card_close_icon_description
R.string.navigate_up
)
binding.conceptCardToolbar.setNavigationOnClickListener {
(fragment.requireActivity() as? ConceptCardListener)?.dismissConceptCard()
Expand Down
12 changes: 4 additions & 8 deletions app/src/main/res/drawable/ic_default_avatar.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="48dp"
android:height="48dp"
android:viewportWidth="48"
android:viewportHeight="48">
<path
android:pathData="M48,48H0v-0.52A21.65,21.65 0,0 1,0.47 42.6a4.62,4.62 0,0 1,3.71 -3.49c4.05,-1 8.08,-2 12.12,-3.08a0.55,0.55 0,0 0,0.5 -0.62c0,-1 0,-2.09 0,-3.14a1,1 0,0 0,-0.18 -0.56,14.57 14.57,0 0,1 -3.21,-6.06c-0.07,-0.26 -0.2,-0.29 -0.47,-0.29a2,2 0,0 1,-1.12 -0.25,5 5,0 0,1 -1.19,-1.19c-1.11,-1.55 -1,-3.31 -0.77,-5.06a1.7,1.7 0,0 1,1.28 -1.54,0.4 0.4,0 0,0 0.33,-0.52A45,45 0,0 1,11.09 8a3.68,3.68 0,0 1,0.67 -2,10.11 10.11,0 0,1 0.71,-0.88 10.76,10.76 0,0 1,2.9 -2.19,0.86 0.86,0 0,0 0.2,-0.18 1.09,1.09 0,0 0,-0.25 0l-0.71,0.1a1.69,1.69 0,0 1,-0.23 0c0,-0.06 0.09,-0.15 0.16,-0.18 0.79,-0.35 1.57,-0.71 2.37,-1A9.17,9.17 0,0 1,22.54 0.85a0.66,0.66 0,0 0,0.24 0l0.53,-0.14L22.86,0.5 22.63,0.36A1.1,1.1 0,0 1,22.89 0.3c0.95,-0.1 1.9,-0.21 2.85,-0.26a4.44,4.44 0,0 1,1.79 0.1,7.77 7.77,0 0,1 3.89,3.12 0.68,0.68 0,0 0,0.56 0.26,4.37 4.37,0 0,1 3,0.55 1.66,1.66 0,0 1,0.62 0.67c0.31,0.7 0.55,1.43 0.81,2.15a1.09,1.09 0,0 1,0.06 0.36,3.07 3.07,0 0,0 -0.31,-0.17L35.9,7a1.29,1.29 0,0 0,0.05 0.35,2.08 2.08,0 0,0 0.32,0.4 2.33,2.33 0,0 1,0.66 1.75c-0.13,2.4 -0.24,4.8 -0.38,7.2 0,0.36 0,0.58 0.4,0.69a1.59,1.59 0,0 1,1.19 1.45,16.27 16.27,0 0,1 0,3.12 4.29,4.29 0,0 1,-1.66 3,2.57 2.57,0 0,1 -1.33,0.49c-0.4,0 -0.56,0.1 -0.65,0.47a14.44,14.44 0,0 1,-3 5.73,1 1,0 0,0 -0.25,0.63c0,1.07 0,2.15 0,3.23a0.54,0.54 0,0 0,0.48 0.59c4,1 7.91,2.08 11.89,3 2.25,0.53 3.67,1.76 4,4C47.86,44.66 47.88,46.34 48,48Z"
android:fillColor="#FFFFFF"/>
<vector android:height="24dp" android:tint="#FFFFFF"
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#FFFFFF" android:pathData="M12,12c2.21,0 4,-1.79 4,-4s-1.79,-4 -4,-4 -4,1.79 -4,4 1.79,4 4,4zM12,14c-2.67,0 -8,1.34 -8,4v2h16v-2c0,-2.66 -5.33,-4 -8,-4z"/>
</vector>
1 change: 0 additions & 1 deletion app/src/main/res/values-ar/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
<string name="cellular_data_alert_dialog_description">تشغيل الصوت عبر الإنترنت قد يستخدم الكثير من بيانات الهاتف.</string>
<string name="cellular_data_alert_dialog_checkbox">لا تُظهِر هذه الرسالة مُجددًا</string>
<string name="concept_card_toolbar_title">بطاقة المفهوم</string>
<string name="concept_card_close_icon_description">الضغط هنا سوف يغلق بطاقة المفهوم</string>
<string name="revision_card_toolbar_title">بطاقة المراجعة</string>
<string name="unsaved_exploration_dialog_title">هل تريد المغادرة إلى صفحة الموضوع؟</string>
<string name="unsaved_exploration_dialog_description">لن يتم حفظ تقدمك.</string>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-pt-rBR/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
<string name="cellular_data_alert_dialog_description">O streaming de áudio pode usar muitos dados móveis.</string>
<string name="cellular_data_alert_dialog_checkbox">Não mostre esta mensagem novamente</string>
<string name="concept_card_toolbar_title">Cartão de Conceito</string>
<string name="concept_card_close_icon_description">Clicar aqui fechará o cartão de conceito.</string>
<string name="revision_card_toolbar_title">Cartão de Revisão</string>
<string name="unsaved_exploration_dialog_title">Pretende ir para a página do tópico?</string>
<string name="unsaved_exploration_dialog_description">Seu progresso não será salvo.</string>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-sw/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
<string name="cellular_data_alert_dialog_description">Kutiririsha sauti kunaweza kutumia data nyingi ya mtandao wa simu.</string>
<string name="cellular_data_alert_dialog_checkbox">Usionyeshe ujumbe huu tena</string>
<string name="concept_card_toolbar_title">Kadi ya Dhana</string>
<string name="concept_card_close_icon_description">Kubofya kwenye hii kutafunga kadi ya dhana.</string>
<string name="revision_card_toolbar_title">Kadi ya Marudio</string>
<string name="unsaved_exploration_dialog_title">Je, ungependa kwenda kwenye Ukurasa wa Mada?</string>
<string name="unsaved_exploration_dialog_description">Maendeleo yako hayatahifadhiwa.</string>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
<string name="cellular_data_alert_dialog_description">Streaming audio may use a lot of cellular data.</string>
<string name="cellular_data_alert_dialog_checkbox">Don\'t show this message again</string>
<string name="concept_card_toolbar_title">Concept Card</string>
<string name="concept_card_close_icon_description">Clicking on this will close the concept card.</string>
<string name="revision_card_toolbar_title">Revision Card</string>
<string name="unsaved_exploration_dialog_title">Leave to Topic Page?</string>
<string name="unsaved_exploration_dialog_description">Your progress will not be saved.</string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ class ConceptCardFragmentTest {
onView(withId(R.id.open_dialog_0)).perform(click())
testCoroutineDispatchers.runCurrent()

onView(withContentDescription(R.string.concept_card_close_icon_description))
onView(withContentDescription(R.string.navigate_up))
.inRoot(isDialog())
.perform(click())
testCoroutineDispatchers.runCurrent()
Expand Down

0 comments on commit da80fab

Please sign in to comment.