Skip to content

Commit

Permalink
Style Change: New styles for the Oppia Deprecation Dialog Design (#4997)
Browse files Browse the repository at this point in the history
<!-- READ ME FIRST: Please fill in the explanation section below and
check off every point from the Essential Checklist! -->
## Explanation
<!--
- Explain what your PR does. If this PR fixes an existing bug, please
include
- "Fixes #bugnum:" in the explanation so that GitHub can auto-close the
issue
  - when this PR is merged.
  -->
The introduction of the new deprecation dialogs for the App/OS
Deprecation feature led to a minor redesign of the dialogs. This
includes style changes to the dialogs that will display various
deprecation messages. The proposed dialogs can be seen on this [Figma
link](https://www.figma.com/file/dTWHwMDdZ8RUrR3rFmzxey/Oppia-deprecation-project?type=design&node-id=0-1&t=oJZSjk9XX4yQKo4f-0).
When merged, this PR will introduce the new theme needed to achieve the
desired dialog designs.

### The difference between the current and the proposed dialog are
highlighted below

Current Design             |  Proposed Design
:-------------------------:|:-------------------------:
![A screenshot of the current deprecation
dialog](https://github.com/oppia/oppia-android/assets/18438114/4518dbd5-a5b5-4d37-b4a9-a5d02e465e87)
| ![A screenshot of the redesigned deprecation
dialog](https://github.com/oppia/oppia-android/assets/18438114/271704cd-a593-446a-9acd-1458343e2a7e)


## 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: ...".)
- [ ] 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
<!-- Delete these section if this PR does not include UI-related
changes. -->
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))
- Add a screenshot demonstrating that you ran affected Espresso tests
locally & that they're passing
  • Loading branch information
kkmurerwa authored Jun 22, 2023
1 parent 74d4b05 commit 329c377
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/component_color_shared_primary_button_background_color" />
<corners android:radius="4dp" />
<size
android:width="32dp"
android:height="32dp" />
</shape>
12 changes: 12 additions & 0 deletions app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -468,4 +468,16 @@
<item name="cornerSize">50%</item>
<item name="cornerFamily">rounded</item>
</style>

<!-- Deprecation AlertDialog Button -->
<style name="DeprecationAlertDialogPositiveButton">
<item name="android:background">@drawable/dialog_positive_rounded_button_solid_color_primary_background</item>
<item name="android:textColor">@color/component_color_shared_secondary_4_text_color</item>
<item name="android:layout_marginStart">24dp</item>
<item name="android:layout_marginEnd">10dp</item>
<item name="android:paddingEnd">20dp</item>
<item name="android:paddingStart">20dp</item>
<item name="android:paddingTop">4dp</item>
<item name="android:paddingBottom">4dp</item>
</style>
</resources>
8 changes: 7 additions & 1 deletion app/src/main/res/values/themes.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<resources xmlns:tools="http://schemas.android.com/tools">

<style name="OppiaTheme" parent="Theme.MaterialComponents.Light.DarkActionBar.Bridge">
<item name="colorPrimary">@color/color_palette_primary_color</item>
Expand Down Expand Up @@ -52,6 +52,12 @@
<item name="android:textColorPrimary">@color/component_color_shared_primary_dark_text_color</item>
</style>

<style name="DeprecationAlertDialogTheme" parent="OppiaAlertDialogTheme">
<item name="android:paddingBottom">4dp</item>
<item name="android:color">@color/component_color_shared_secondary_2_text_color</item>
<item name="buttonBarPositiveButtonStyle">@style/DeprecationAlertDialogPositiveButton</item>
</style>

<style name="OppiaActionBarTheme" parent="ThemeOverlay.MaterialComponents.Dark.ActionBar" >
<item name="android:background">@color/component_color_shared_activity_action_bar_color</item>
</style>
Expand Down

0 comments on commit 329c377

Please sign in to comment.