Skip to content

Commit

Permalink
Add placeholder for alt text input field (#530)
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamGrzybkowski authored Jan 14, 2025
1 parent ddebd75 commit a8060db
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
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>

0 comments on commit a8060db

Please sign in to comment.