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 part of #5344: Fix Localization Issues of Classroom List Screen #5479

Merged
merged 28 commits into from
Aug 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
936809d
Add collapsible functionality to classroom cards
theMr17 Jul 13, 2024
1b7ed1c
Rename shadowed variable
theMr17 Jul 13, 2024
7e5b1c2
Refactor card collapse logic
theMr17 Jul 13, 2024
f011cc8
Update dark mode colors
theMr17 Jul 13, 2024
235c551
Fix ktlint check
theMr17 Jul 13, 2024
8169c13
Separate classroom header from ClassroomList
theMr17 Jul 14, 2024
72256a3
Fix static checks
theMr17 Jul 14, 2024
871ff72
Add test to verify the card collapse behavior
theMr17 Jul 14, 2024
acf97c5
Merge branch 'develop' into multiple-classrooms-refactor-ui
theMr17 Jul 17, 2024
df600aa
Calculate ClassroomList index dynamically
theMr17 Jul 17, 2024
1ccadd3
Align all topics heading vertically
theMr17 Jul 21, 2024
a168b57
Dynamically compute classroom card width
theMr17 Jul 24, 2024
083ec70
Fix script checks
theMr17 Jul 24, 2024
33f61a4
Update header font style
theMr17 Jul 24, 2024
efdd85e
Merge branch 'develop' into multiple-classrooms-refactor-ui
theMr17 Jul 24, 2024
066dfe5
Update kdoc
theMr17 Jul 26, 2024
043628b
Update classroomListIndex for coming soon topics carousel
theMr17 Jul 26, 2024
f333672
Calculate the classroomListIndex dynamically
theMr17 Jul 31, 2024
f4edd47
Fix kdoc
theMr17 Jul 31, 2024
41cbb0b
Merge branch 'develop' into multiple-classrooms-refactor-ui
theMr17 Jul 31, 2024
3aaecc1
Update dark mode classroom card colours
theMr17 Aug 2, 2024
b247622
Merge branch 'develop' into multiple-classrooms-refactor-ui
theMr17 Aug 2, 2024
c7860ad
Merge branch 'develop' into multiple-classrooms-refactor-ui
theMr17 Aug 7, 2024
041b5e2
Fix classroom list direction in RTL
theMr17 Aug 7, 2024
e6ec765
Wrap promoted story list header with a Box
theMr17 Aug 7, 2024
09dc4a0
Fix ktlint checks
theMr17 Aug 7, 2024
3f4b504
Merge branch 'develop' into multiple-classrooms-accessibility
theMr17 Aug 8, 2024
6974db4
Merge branch 'develop' into multiple-classrooms-accessibility
adhiamboperes Aug 8, 2024
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 @@ -8,7 +8,6 @@ import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.width
Expand Down Expand Up @@ -52,8 +51,7 @@ fun ClassroomList(
.testTag(CLASSROOM_LIST_TEST_TAG)
.background(
color = colorResource(id = R.color.component_color_shared_screen_primary_background_color)
)
.fillMaxWidth(),
),
contentPadding = PaddingValues(
start = dimensionResource(id = R.dimen.classrooms_text_margin_start),
top = dimensionResource(id = R.dimen.classrooms_text_margin_bottom),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import androidx.compose.foundation.background
import androidx.compose.foundation.border
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.Row
Expand Down Expand Up @@ -52,40 +53,46 @@ fun PromotedStoryList(
promotedStoryListViewModel: PromotedStoryListViewModel,
machineLocale: OppiaLocale.MachineLocale,
) {
Row(
modifier = Modifier
.testTag(PROMOTED_STORY_LIST_HEADER_TEST_TAG)
.fillMaxWidth()
.padding(
start = dimensionResource(id = R.dimen.promoted_story_list_layout_margin_start),
top = dimensionResource(id = R.dimen.promoted_story_list_layout_margin_top),
end = dimensionResource(id = R.dimen.promoted_story_list_layout_margin_end),
),
horizontalArrangement = Arrangement.SpaceBetween,
verticalAlignment = Alignment.CenterVertically,
Box(
contentAlignment = Alignment.Center,
) {
Text(
text = promotedStoryListViewModel.getHeader(),
color = colorResource(id = R.color.component_color_classroom_shared_header_text_color),
fontFamily = FontFamily.SansSerif,
fontWeight = FontWeight.Normal,
fontSize = dimensionResource(id = R.dimen.promoted_story_list_header_text_size).value.sp,
Row(
modifier = Modifier
.weight(weight = 1f, fill = false),
)
if (promotedStoryListViewModel.getViewAllButtonVisibility() == View.VISIBLE) {
.testTag(PROMOTED_STORY_LIST_HEADER_TEST_TAG)
.fillMaxWidth()
.padding(
start = dimensionResource(id = R.dimen.promoted_story_list_layout_margin_start),
top = dimensionResource(id = R.dimen.promoted_story_list_layout_margin_top),
end = dimensionResource(id = R.dimen.promoted_story_list_layout_margin_end),
),
horizontalArrangement = Arrangement.SpaceBetween,
verticalAlignment = Alignment.CenterVertically,
) {
Text(
text = machineLocale.run { stringResource(id = R.string.view_all).toMachineUpperCase() },
color = colorResource(id = R.color.component_color_home_activity_view_all_text_color),
text = promotedStoryListViewModel.getHeader(),
color = colorResource(id = R.color.component_color_classroom_shared_header_text_color),
fontFamily = FontFamily.SansSerif,
fontWeight = FontWeight.Medium,
fontSize = dimensionResource(id = R.dimen.promoted_story_list_view_all_text_size).value.sp,
fontWeight = FontWeight.Normal,
fontSize = dimensionResource(id = R.dimen.promoted_story_list_header_text_size).value.sp,
modifier = Modifier
.padding(
start = dimensionResource(id = R.dimen.promoted_story_list_view_all_padding_start)
)
.clickable { promotedStoryListViewModel.clickOnViewAll() },
.weight(weight = 1f, fill = false),
)
if (promotedStoryListViewModel.getViewAllButtonVisibility() == View.VISIBLE) {
Text(
text = machineLocale.run { stringResource(id = R.string.view_all).toMachineUpperCase() },
color = colorResource(id = R.color.component_color_home_activity_view_all_text_color),
fontFamily = FontFamily.SansSerif,
fontWeight = FontWeight.Medium,
fontSize = dimensionResource(
id = R.dimen.promoted_story_list_view_all_text_size
).value.sp,
modifier = Modifier
.padding(
start = dimensionResource(id = R.dimen.promoted_story_list_view_all_padding_start)
)
.clickable { promotedStoryListViewModel.clickOnViewAll() },
)
}
}
}
LazyRow(
Expand Down
Loading