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

Alt Text: Add placeholder for alt text input field #530

Merged
merged 1 commit into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,14 @@ internal fun AltTextPage(
Box(
modifier = Modifier.weight(1f),
) {
if (altTextState.altText.isEmpty()) {
Text(
text = stringResource(
R.string.gravatar_qe_avatar_alt_text_section_placeholder,
),
color = MaterialTheme.colorScheme.onSurfaceVariant,
)
}
innerTextField()
}
Text(
Expand Down
2 changes: 1 addition & 1 deletion gravatar-quickeditor/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,6 @@
<string name="gravatar_qe_avatar_picker_alt_text_update_error">Oops, something didn\'t quite work out while trying to update the alt text.</string>
<string name="gravatar_qe_avatar_alt_text_section_title">Alt Text</string>
<string name="gravatar_qe_avatar_alt_text_section_what_is">What is alt text?</string>
<string name="gravatar_qe_avatar_alt_text_section_placeholder" tools:ignore="UnusedResources">Write alt text</string>
<string name="gravatar_qe_avatar_alt_text_section_placeholder">Write alt text</string>
<string name="gravatar_qe_avatar_alt_text_save_button">Save</string>
</resources>