Skip to content

Display image alt text#1497

Merged
hjiangsu merged 3 commits intothunder-app:developfrom
micahmo:feature/display-alt-text
Aug 24, 2024
Merged

Display image alt text#1497
hjiangsu merged 3 commits intothunder-app:developfrom
micahmo:feature/display-alt-text

Conversation

@micahmo
Copy link
Copy Markdown
Member

@micahmo micahmo commented Jul 15, 2024

Pull Request Description

This PR adds support for showing alt text in the image viewer.

Notes:

  • This change supports image posts, as well as images in comments which use the markdown alt text feature.
  • Long text is handled with an expander, similar to taglines.
  • The alt text will be hidden when long-pressing the image, which hides all other content on the screen besides the image.
  • This PR does not add the ability to set the alt text creating an image post. That will require a database change (to save it with drafts), so it should come after Support custom thumbnails in posts #1495.
  • I verified that the white text still looks good against a solid white picture due to the shadow.

Issue Being Fixed

Issue Number: #1447 and #1461

Screenshots / Recordings

qemu-system-x86_64_gOcyq5564F.mp4

Checklist

  • If a new package was added, did you ensure it uses an appropriate license and is actively maintained?
  • Did you use localized strings (and added appropriate descriptions) where applicable?
  • Did you add semanticLabels where applicable for accessibility?

@micahmo micahmo mentioned this pull request Jul 15, 2024
7 tasks
Copy link
Copy Markdown
Member

@hjiangsu hjiangsu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a small minor comment, otherwise LGTM!

Comment thread lib/shared/image_viewer.dart Outdated
ExpandableButton(
theme: const ExpandableThemeData(useInkWell: false),
child: Text(
AppLocalizations.of(context)!.showLess,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick: use l10n conventions here!

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

@hjiangsu hjiangsu added this to the 0.6.0 milestone Aug 22, 2024
@hjiangsu hjiangsu merged commit 13464e1 into thunder-app:develop Aug 24, 2024
@micahmo micahmo deleted the feature/display-alt-text branch August 26, 2024 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants