-
Notifications
You must be signed in to change notification settings - Fork 527
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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. --> Fixes part of #5344 This PR refactors the new Classroom List Screen to align with the updated design mocks provided in [Figma](https://www.figma.com/design/H4BaHlwnALtjQcemP322hE/Oppia-Multiple-Classroom-Android-(Ashley's-Expansion)?node-id=3064-11726&t=dnQTkdXXXWoeh9k3-0). The changes include: - Implementing functionality to collapse the classroom cards when the carousel sticks to the top. - Updating the dark mode color scheme to match the new design specifications. https://github.com/user-attachments/assets/cf7600a1-d0b8-4c42-af3c-67950589f8f7 https://github.com/user-attachments/assets/dfe8b564-0d37-450d-bc6a-d244e7aa58d7 ## Screenshots ### Phone |Portrait|Landscape| |--|--| |![image](https://github.com/user-attachments/assets/a288aa3f-e0b6-41d0-a1c0-2d98917ae85a)|![image](https://github.com/user-attachments/assets/eb087b19-11bf-4be6-b54b-e7f4eca869a8)| |![image](https://github.com/user-attachments/assets/d36a67df-6a96-40bb-82cd-41c7af76e9a7)|![image](https://github.com/user-attachments/assets/da2b3a56-c307-4f54-a53d-3f0f969b1f91)| |![image](https://github.com/user-attachments/assets/29a64410-c516-447f-add8-8399174f32b2)|![image](https://github.com/user-attachments/assets/d1be0cff-de26-44d6-867a-f8506fa5e110)| |![image](https://github.com/user-attachments/assets/66b99d9c-459f-4845-9148-cb355cd59882)|![image](https://github.com/user-attachments/assets/1521321b-cdcd-488c-b826-603e2ad20a84)| ### Tablet |Portrait|Landscape| |--|--| |![image](https://github.com/user-attachments/assets/078cdcc2-6811-494e-899a-fb49655ff1cd)|![image](https://github.com/user-attachments/assets/f13d711d-7df2-434f-b593-cce2251bea5f)| ||![image](https://github.com/user-attachments/assets/71e7b7ce-9a3b-4e47-855d-160657a43846)| |![image](https://github.com/user-attachments/assets/f01c4188-e699-4d4c-9097-7cf32cfe4ac9)|![image](https://github.com/user-attachments/assets/d2f5e43c-3650-49f2-b955-85017b68b2c3)| ||![image](https://github.com/user-attachments/assets/197a36f4-d2cc-4df9-b537-b1a006b8e9b9)| ## 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 <!-- 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)) - 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
- Loading branch information
Showing
18 changed files
with
211 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
app/src/main/java/org/oppia/android/app/classroom/classroomlist/AllClassroomsHeaderText.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package org.oppia.android.app.classroom.classroomlist | ||
|
||
import androidx.compose.foundation.layout.padding | ||
import androidx.compose.material.Text | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.platform.testTag | ||
import androidx.compose.ui.res.colorResource | ||
import androidx.compose.ui.res.dimensionResource | ||
import androidx.compose.ui.res.stringResource | ||
import androidx.compose.ui.text.font.FontFamily | ||
import androidx.compose.ui.text.font.FontWeight | ||
import androidx.compose.ui.unit.sp | ||
import org.oppia.android.R | ||
|
||
/** Test tag for the all classrooms section header. */ | ||
const val ALL_CLASSROOMS_HEADER_TEST_TAG = "TEST_TAG.all_classrooms_header" | ||
|
||
/** Displays the header text for the classroom list section. */ | ||
@Composable | ||
fun AllClassroomsHeaderText() { | ||
Text( | ||
text = stringResource(id = R.string.classrooms_list_activity_section_header), | ||
color = colorResource(id = R.color.component_color_classroom_shared_header_text_color), | ||
fontFamily = FontFamily.SansSerif, | ||
fontWeight = FontWeight.Normal, | ||
fontSize = dimensionResource(id = R.dimen.classrooms_list_header_text_size).value.sp, | ||
modifier = Modifier | ||
.testTag(ALL_CLASSROOMS_HEADER_TEST_TAG) | ||
.padding( | ||
start = dimensionResource(id = R.dimen.classrooms_text_margin_start), | ||
top = dimensionResource(id = R.dimen.classrooms_text_margin_top), | ||
end = dimensionResource(id = R.dimen.classrooms_text_margin_end), | ||
), | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
app/src/main/java/org/oppia/android/app/home/classroomlist/AllClassroomsViewModel.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package org.oppia.android.app.home.classroomlist | ||
|
||
import androidx.lifecycle.ViewModel | ||
import org.oppia.android.app.classroom.ClassroomListFragment | ||
import org.oppia.android.app.home.HomeItemViewModel | ||
|
||
/** [ViewModel] for displaying the classroom header in [ClassroomListFragment]. */ | ||
object AllClassroomsViewModel : HomeItemViewModel() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.