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

Show gallery in proper orientation when an image is the first link #1423

Merged
merged 8 commits into from
Aug 28, 2024

Conversation

joshuatbrown
Copy link
Contributor

@joshuatbrown joshuatbrown commented Aug 23, 2024

Issues covered

#1171

Description

Shows gallery views in the proper orientation when an image is the first link in a post. If the first link is a portrait image, the entire gallery will display in portrait (3:4 aspect ratio). If the first link is a landscape or square image, the entire gallery will display in landscape (4:3 aspect ratio).

Doing this for video is more complicated; see #1425 for an explanation. We'll address landscape and portrait videos later; for now, Linda requested that we default to portrait for videos.

How to test

📣 Important! New media display is off by default and can only be toggled on in Settings for now. Follow the instructions below to turn it on.

  1. Navigate to Settings
  2. Toggle "Enable new media display" to on
  3. Go back to the feed, or a profile, or a thread and observe or create posts with multiple links.
  4. Verify that the gallery appears in the proper orientation
  5. Find or create a post with a single portrait image
  6. Verify that it's displayed in 3:4 aspect ratio
  7. Find or create a post with a single landscape image
  8. Verify that it's displayed in 4:3 aspect ratio

Screenshots/Video

Simulator.Screen.Recording.-.iPhone.15.Pro.-.2024-08-27.at.14.09.39.mp4

@joshuatbrown joshuatbrown marked this pull request as ready for review August 27, 2024 18:10
@joshuatbrown joshuatbrown changed the title Vertical media Show gallery in proper orientation when an image is the first link Aug 27, 2024
CHANGELOG.md Outdated
@@ -8,17 +8,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### External
Copy link
Contributor Author

@joshuatbrown joshuatbrown Aug 28, 2024

Choose a reason for hiding this comment

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

@mplorentz @martindsq @bryanmontz thoughts on this change to the CHANGELOG? Before I explain what it is, do these new headings make sense to you?

Copy link
Member

Choose a reason for hiding this comment

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

At first I thought they were external vs internal contributors. But after looking more closely I think maybe external is things that users will notice and internal is not? So I guess I found the names a little confusing. Maybe "UX changes" and "Dev UX" changes or something like that would be more clear?

We have to do this kind of sorting before publishing the release notes anyway, so I guess it wouldn't hurt to do it here. Although I think it would be best to update the stamp_release fastlane lane to auto-generate these headers for consistency.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, so the idea here is that "External" means things that we'll publish in our release notes on TestFlight. Since we don't want our users to see things like "Replaced hard-coded color values.", those notes would go under "Internal". I wonder if "Public" and "Internal" would work?

I'm all for updating stamp_release if/when we decide on a new approach, and I'd be happy to do that.

Copy link
Contributor Author

@joshuatbrown joshuatbrown Aug 28, 2024

Choose a reason for hiding this comment

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

Oh, I guess we could instead have a section called "Release Notes" and one called... I dunno, I keep coming up with "Internal". "Non Release Notes"? "Dev Notes"? "For the devs"? "Internal Notes"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm reverting the changes in this PR and will create a new PR with just CHANGELOG format changes. I'd still love to hear thoughts here or in the future PR.

Copy link
Member

@martindsq martindsq left a comment

Choose a reason for hiding this comment

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

All the comments in the code were really appreciated. This looks fantastic!

@joshuatbrown joshuatbrown added this pull request to the merge queue Aug 28, 2024
Merged via the queue into main with commit a73465b Aug 28, 2024
4 checks passed
@joshuatbrown joshuatbrown deleted the vertical-media branch August 28, 2024 20:10
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.

3 participants