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

Add feature flag and unit test for new media display #1214

Merged
merged 8 commits into from
Jun 6, 2024

Conversation

joshuatbrown
Copy link
Contributor

@joshuatbrown joshuatbrown commented Jun 3, 2024

Issues covered

#1176

Description

Adds a feature flag for enabling the new media display which is not yet implemented. Establishes a pattern for using feature flags in the app. Adds a test to demonstrate how feature flags can be used and configured differently for testing and production.

How to test

  1. Create a post with media, or just find one
  2. Ensure the post shows the media the same way it always did
  3. Navigate to settings
  4. Under Debug, enable the switch for "Enable new media display"
  5. Find a post with media
  6. Ensure it displays no gallery since there's no new media display yet

Additionally, run the unit tests to make sure the new one passes.

Video

Here's how you can toggle the flag on and off. Only available in DEBUG builds.

Simulator.Screen.Recording.-.iPhone.15.Pro.-.2024-06-04.at.15.00.12.mp4

Copy link
Member

@mplorentz mplorentz left a comment

Choose a reason for hiding this comment

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

v cool 😎 I will let Martin approve but this looks good to me.

NosTests/Views/CompactNoteViewTests.swift Show resolved Hide resolved
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.

Good work, Josh! It looks great.

@joshuatbrown joshuatbrown added this pull request to the merge queue Jun 6, 2024
Merged via the queue into main with commit 9a91990 Jun 6, 2024
5 checks passed
@joshuatbrown joshuatbrown deleted the feature/new-media-flag branch June 6, 2024 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants