-
Notifications
You must be signed in to change notification settings - Fork 160
Improve timetable talkback feedback #609
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
Changes from all commits
69b8fea
44a5ead
b9b5591
5e8b631
89cc255
50ec935
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,3 +21,9 @@ kotlin { | |
| } | ||
| } | ||
| } | ||
|
|
||
| compose { | ||
| resources { | ||
| publicResClass = true | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,8 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <resources> | ||
| <string name="bookmarked">ブックマーク済み</string> | ||
| <string name="not_bookmarked">ブックマークされていません</string> | ||
| <string name="connection_failed">接続に失敗しました、ネットワーク設定を確認してください。</string> | ||
| <string name="error_occurred">エラー...</string> | ||
| <string name="retry">再試行</string> | ||
| <string name="add_to_bookmark">ブックマークに登録</string> | ||
| <string name="remove_from_bookmark">ブックマークを削除</string> | ||
| </resources> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,8 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <resources> | ||
| <string name="bookmarked">Bookmarked</string> | ||
| <string name="not_bookmarked">Not Bookmarked</string> | ||
| <string name="connection_failed">Connection failed, Check your network settings.</string> | ||
| <string name="error_occurred">Error...</string> | ||
| <string name="retry">Retry</string> | ||
| <string name="add_to_bookmark">Add to Bookmarks</string> | ||
| <string name="remove_from_bookmark">Remove from Bookmarks</string> | ||
| </resources> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -35,7 +35,10 @@ import androidx.compose.ui.graphics.Color | |
| import androidx.compose.ui.hapticfeedback.HapticFeedbackType | ||
| import androidx.compose.ui.platform.LocalHapticFeedback | ||
| import androidx.compose.ui.platform.testTag | ||
| import androidx.compose.ui.semantics.CustomAccessibilityAction | ||
| import androidx.compose.ui.semantics.SemanticsPropertyKey | ||
| import androidx.compose.ui.semantics.clearAndSetSemantics | ||
| import androidx.compose.ui.semantics.customActions | ||
| import androidx.compose.ui.semantics.semantics | ||
| import androidx.compose.ui.text.SpanStyle | ||
| import androidx.compose.ui.text.buildAnnotatedString | ||
|
|
@@ -48,12 +51,12 @@ import io.github.droidkaigi.confsched.designsystem.theme.ProvideRoomTheme | |
| import io.github.droidkaigi.confsched.droidkaigiui.DroidkaigiuiRes | ||
| import io.github.droidkaigi.confsched.droidkaigiui.KaigiPreviewContainer | ||
| import io.github.droidkaigi.confsched.droidkaigiui.SubcomposeAsyncImage | ||
| import io.github.droidkaigi.confsched.droidkaigiui.bookmarked | ||
| import io.github.droidkaigi.confsched.droidkaigiui.add_to_bookmark | ||
| import io.github.droidkaigi.confsched.droidkaigiui.component.OutlinedToolTip | ||
| import io.github.droidkaigi.confsched.droidkaigiui.component.RoomToolTip | ||
| import io.github.droidkaigi.confsched.droidkaigiui.extension.icon | ||
| import io.github.droidkaigi.confsched.droidkaigiui.extension.roomTheme | ||
| import io.github.droidkaigi.confsched.droidkaigiui.not_bookmarked | ||
| import io.github.droidkaigi.confsched.droidkaigiui.remove_from_bookmark | ||
|
Comment on lines
+54
to
+59
|
||
| import io.github.droidkaigi.confsched.model.sessions.TimetableItem | ||
| import io.github.droidkaigi.confsched.model.sessions.TimetableSpeaker | ||
| import io.github.droidkaigi.confsched.model.sessions.fake | ||
|
|
@@ -78,10 +81,26 @@ fun TimetableItemCard( | |
| val haptic = LocalHapticFeedback.current | ||
|
|
||
| ProvideRoomTheme(timetableItem.room.roomTheme) { | ||
| val bookmarkActionLabel = stringResource( | ||
| if (isBookmarked) { | ||
| DroidkaigiuiRes.string.remove_from_bookmark | ||
| } else { | ||
| DroidkaigiuiRes.string.add_to_bookmark | ||
| }, | ||
| ) | ||
| Row( | ||
| verticalAlignment = Alignment.Top, | ||
| modifier = modifier | ||
| .semantics { | ||
| customActions = listOf( | ||
| CustomAccessibilityAction( | ||
| label = bookmarkActionLabel, | ||
| action = { | ||
| onBookmarkClick() | ||
| true | ||
| }, | ||
| ), | ||
| ) | ||
| this[TimetableItemCardSemanticsKey] = timetableItem | ||
| } | ||
| .clip(RoundedCornerShape(16.dp)) | ||
|
|
@@ -161,7 +180,9 @@ fun TimetableItemCard( | |
| } | ||
| onBookmarkClick() | ||
| }, | ||
| modifier = Modifier.padding(end = 12.dp), | ||
| modifier = Modifier | ||
| .clearAndSetSemantics {} | ||
| .padding(end = 12.dp), | ||
| ) | ||
| } | ||
| } | ||
|
|
@@ -248,16 +269,15 @@ private fun FavoriteButton( | |
| ), | ||
| modifier = modifier.testTag(TimetableItemCardBookmarkButtonTestTag), | ||
| ) { | ||
| // TODO: Fix contentDescription | ||
| if (isBookmarked) { | ||
| Icon( | ||
| Icons.Filled.Favorite, | ||
| contentDescription = stringResource(DroidkaigiuiRes.string.bookmarked), | ||
| contentDescription = stringResource(DroidkaigiuiRes.string.remove_from_bookmark), | ||
| ) | ||
| } else { | ||
| Icon( | ||
| Icons.Outlined.FavoriteBorder, | ||
| contentDescription = stringResource(DroidkaigiuiRes.string.not_bookmarked), | ||
| contentDescription = stringResource(DroidkaigiuiRes.string.add_to_bookmark), | ||
| ) | ||
| } | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,6 +7,7 @@ import androidx.compose.ui.test.hasTestTag | |
| import androidx.compose.ui.test.onFirst | ||
| import androidx.compose.ui.test.onNodeWithTag | ||
| import androidx.compose.ui.test.performClick | ||
| import androidx.compose.ui.test.performCustomAccessibilityActionWithLabel | ||
| import androidx.compose.ui.test.performTouchInput | ||
| import androidx.compose.ui.test.swipeUp | ||
| import dev.zacsweers.metro.Inject | ||
|
|
@@ -78,9 +79,9 @@ class FavoritesScreenRobot( | |
|
|
||
| context(composeUiTest: ComposeUiTest) | ||
| fun clickFirstSessionBookmark() { | ||
| composeUiTest.onAllNodes(hasTestTag(TimetableItemCardBookmarkButtonTestTag)) | ||
| composeUiTest.onAllNodes(hasTestTag(TimetableItemCardTestTag)) | ||
| .onFirst() | ||
| .performClick() | ||
| .performCustomAccessibilityActionWithLabel("Remove from Bookmarks") | ||
|
||
| waitUntilIdle() | ||
| } | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same wording is found here, Would it be better to make it
publicResClass = falseand make it common?conference-app-2025/feature/sessions/src/commonMain/composeResources/values-ja/strings.xml
Lines 40 to 41 in 3aace3d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that sounds like a good idea. Could you please make it common?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to implemented at 50ec935 .
Could you please check this? 🙏