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

[MBL-1441] Remove 'Report This Project' Feature Flag #2063

Merged
merged 3 commits into from
May 21, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ internal final class ProjectPageViewControllerTests: TestCase {
fetchProjectRewardsResult: .success([reward])
)

combos(Language.allLanguages, [Device.phone4inch, Device.pad]).forEach { language, device in
orthogonalCombos(Language.allLanguages, [Device.phone4inch, Device.pad]).forEach { language, device in
Copy link
Contributor

Choose a reason for hiding this comment

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

I noticed no screenshots were deleted - there should be some that are now unused/defunct, correct?

withEnvironment(
apiService: mockService,
config: config, currentUser: .template, language: language
Expand Down Expand Up @@ -155,7 +155,7 @@ internal final class ProjectPageViewControllerTests: TestCase {
fetchProjectRewardsResult: .success([reward])
)

combos(Language.allLanguages, [Device.phone4inch, Device.pad]).forEach { language, device in
orthogonalCombos(Language.allLanguages, [Device.phone4inch, Device.pad]).forEach { language, device in
withEnvironment(
apiService: mockService,
config: config,
Expand Down Expand Up @@ -206,7 +206,7 @@ internal final class ProjectPageViewControllerTests: TestCase {
fetchProjectRewardsResult: .success([reward])
)

combos(Language.allLanguages, [Device.phone4inch, Device.pad]).forEach { language, device in
orthogonalCombos(Language.allLanguages, [Device.phone4inch, Device.pad]).forEach { language, device in
withEnvironment(
apiService: mockService,
config: config, currentUser: .template, language: language
Expand Down Expand Up @@ -252,7 +252,7 @@ internal final class ProjectPageViewControllerTests: TestCase {
fetchProjectRewardsResult: .success(Project.cosmicSurgery.rewardData.rewards)
)

combos(Language.allLanguages, [Device.phone4inch, Device.pad]).forEach { language, device in
orthogonalCombos(Language.allLanguages, [Device.phone4inch, Device.pad]).forEach { language, device in
withEnvironment(
apiService: mockService,
config: config, currentUser: currentUser, language: language
Expand Down Expand Up @@ -296,7 +296,7 @@ internal final class ProjectPageViewControllerTests: TestCase {
fetchProjectRewardsResult: .success(Project.cosmicSurgery.rewardData.rewards)
)

combos(Language.allLanguages, [Device.phone4inch, Device.pad]).forEach { language, device in
orthogonalCombos(Language.allLanguages, [Device.phone4inch, Device.pad]).forEach { language, device in
withEnvironment(
apiService: mockService,
config: config, currentUser: .template, language: language
Expand Down Expand Up @@ -342,7 +342,7 @@ internal final class ProjectPageViewControllerTests: TestCase {
fetchProjectRewardsResult: .success(Project.cosmicSurgery.rewardData.rewards)
)

combos(Language.allLanguages, [Device.phone4inch, Device.pad]).forEach { language, device in
orthogonalCombos(Language.allLanguages, [Device.phone4inch, Device.pad]).forEach { language, device in
withEnvironment(
apiService: mockService,
config: config, currentUser: currentUser, language: language
Expand Down Expand Up @@ -383,7 +383,7 @@ internal final class ProjectPageViewControllerTests: TestCase {
fetchProjectRewardsResult: .success(Project.cosmicSurgery.rewards)
)

combos(Language.allLanguages, [Device.phone4inch, Device.pad]).forEach { language, device in
orthogonalCombos(Language.allLanguages, [Device.phone4inch, Device.pad]).forEach { language, device in
withEnvironment(
apiService: mockService,
config: config, currentUser: .template, language: language
Expand Down Expand Up @@ -425,7 +425,7 @@ internal final class ProjectPageViewControllerTests: TestCase {
fetchProjectRewardsResult: .success(Project.cosmicSurgery.rewards)
)

combos(Language.allLanguages, [Device.phone4inch, Device.pad]).forEach { language, device in
orthogonalCombos(Language.allLanguages, [Device.phone4inch, Device.pad]).forEach { language, device in
withEnvironment(
apiService: mockService,
config: config, currentUser: .template, language: language
Expand Down Expand Up @@ -478,7 +478,7 @@ internal final class ProjectPageViewControllerTests: TestCase {
fetchProjectRewardsResult: .success([reward])
)

combos(Language.allLanguages, [Device.phone5_8inch, Device.pad]).forEach { language, device in
orthogonalCombos(Language.allLanguages, [Device.phone5_8inch, Device.pad]).forEach { language, device in
withEnvironment(
apiService: mockService,
config: config, currentUser: .template, language: language
Expand Down Expand Up @@ -531,7 +531,7 @@ internal final class ProjectPageViewControllerTests: TestCase {
fetchProjectRewardsResult: .success([reward])
)

combos(Language.allLanguages, [Device.phone5_8inch, Device.pad]).forEach { language, device in
orthogonalCombos(Language.allLanguages, [Device.phone5_8inch, Device.pad]).forEach { language, device in
withEnvironment(
apiService: mockService,
config: config, currentUser: .template, language: language
Expand Down Expand Up @@ -584,7 +584,7 @@ internal final class ProjectPageViewControllerTests: TestCase {
fetchProjectRewardsResult: .success([reward])
)

combos(Language.allLanguages, [Device.phone5_8inch, Device.pad]).forEach { language, device in
orthogonalCombos(Language.allLanguages, [Device.phone5_8inch, Device.pad]).forEach { language, device in
withEnvironment(
apiService: mockService,
config: config, currentUser: .template, language: language
Expand Down Expand Up @@ -637,7 +637,7 @@ internal final class ProjectPageViewControllerTests: TestCase {
fetchProjectRewardsResult: .success([reward])
)

combos(Language.allLanguages, [Device.phone5_8inch, Device.pad]).forEach { language, device in
orthogonalCombos(Language.allLanguages, [Device.phone5_8inch, Device.pad]).forEach { language, device in
withEnvironment(
apiService: mockService,
config: config, currentUser: .template, language: language
Expand Down Expand Up @@ -680,7 +680,7 @@ internal final class ProjectPageViewControllerTests: TestCase {
fetchProjectPamphletResult: .success(projectPamphletData)
)

combos(Language.allLanguages, [Device.phone4inch, Device.pad]).forEach { language, device in
orthogonalCombos(Language.allLanguages, [Device.phone4inch, Device.pad]).forEach { language, device in
withEnvironment(
apiService: mockService,
config: config, currentUser: .template, language: language
Expand Down Expand Up @@ -723,7 +723,7 @@ internal final class ProjectPageViewControllerTests: TestCase {
fetchProjectPamphletResult: .success(projectPamphletData)
)

combos(Language.allLanguages, [Device.phone4inch, Device.pad]).forEach { language, device in
orthogonalCombos(Language.allLanguages, [Device.phone4inch, Device.pad]).forEach { language, device in
withEnvironment(
apiService: mockService,
config: config, currentUser: .template, language: language
Expand Down Expand Up @@ -766,7 +766,7 @@ internal final class ProjectPageViewControllerTests: TestCase {
fetchProjectRewardsResult: .success(self.project.rewards)
)

combos(Language.allLanguages, [Device.phone4inch, Device.pad]).forEach { language, device in
orthogonalCombos(Language.allLanguages, [Device.phone4inch, Device.pad]).forEach { language, device in
withEnvironment(
apiService: mockService,
config: config, currentUser: nil, language: language
Expand Down Expand Up @@ -805,7 +805,7 @@ internal final class ProjectPageViewControllerTests: TestCase {
fetchProjectRewardsResult: .success(self.project.rewards)
)

combos(Language.allLanguages, [Device.phone4inch, Device.pad]).forEach { language, device in
orthogonalCombos(Language.allLanguages, [Device.phone4inch, Device.pad]).forEach { language, device in
withEnvironment(
apiService: mockService,
config: config, currentUser: nil, language: language
Expand Down Expand Up @@ -845,7 +845,7 @@ internal final class ProjectPageViewControllerTests: TestCase {
fetchProjectRewardsResult: .success(Project.cosmicSurgery.rewards)
)

combos(Language.allLanguages, [Device.phone4inch, Device.pad]).forEach { language, device in
orthogonalCombos(Language.allLanguages, [Device.phone4inch, Device.pad]).forEach { language, device in
withEnvironment(
apiService: mockService,
config: config, currentUser: nil, language: language
Expand Down Expand Up @@ -883,7 +883,7 @@ internal final class ProjectPageViewControllerTests: TestCase {
|> Project.lens.photo.full .~ ""
|> (Project.lens.creator.avatar .. User.Avatar.lens.small) .~ ""

combos(Language.allLanguages, [Device.phone4inch, Device.pad]).forEach { language, device in
orthogonalCombos(Language.allLanguages, [Device.phone4inch, Device.pad]).forEach { language, device in
withEnvironment(
apiService: mockService,
config: config,
Expand Down Expand Up @@ -923,7 +923,7 @@ internal final class ProjectPageViewControllerTests: TestCase {
|> Project.lens.rewardData.rewards .~ []
|> \.extendedProjectProperties .~ self.extendedProjectProperties

combos(Language.allLanguages, [Device.phone4inch, Device.pad]).forEach { language, device in
orthogonalCombos(Language.allLanguages, [Device.phone4inch, Device.pad]).forEach { language, device in
withEnvironment(
config: config,
language: language
Expand Down Expand Up @@ -961,7 +961,7 @@ internal final class ProjectPageViewControllerTests: TestCase {
|> Project.lens.rewardData.rewards .~ []
|> \.extendedProjectProperties .~ self.extendedProjectProperties

combos(Language.allLanguages, [Device.phone4inch, Device.pad]).forEach { language, device in
orthogonalCombos(Language.allLanguages, [Device.phone4inch, Device.pad]).forEach { language, device in
withEnvironment(
config: config,
language: language
Expand Down Expand Up @@ -999,7 +999,7 @@ internal final class ProjectPageViewControllerTests: TestCase {
|> Project.lens.rewardData.rewards .~ []
|> \.extendedProjectProperties .~ self.extendedProjectProperties

combos(Language.allLanguages, [Device.phone4inch, Device.pad]).forEach { language, device in
orthogonalCombos(Language.allLanguages, [Device.phone4inch, Device.pad]).forEach { language, device in
withEnvironment(
config: config,
currentUser: .template,
Expand Down Expand Up @@ -1125,7 +1125,7 @@ internal final class ProjectPageViewControllerTests: TestCase {
let mockRemoteConfigClient = MockRemoteConfigClient()
|> \.features .~ ["use_of_ai": true]

combos(Language.allLanguages, [Device.phone4inch, Device.pad]).forEach { language, device in
orthogonalCombos(Language.allLanguages, [Device.phone4inch, Device.pad]).forEach { language, device in
withEnvironment(
config: config,
language: language,
Expand Down Expand Up @@ -1164,7 +1164,7 @@ internal final class ProjectPageViewControllerTests: TestCase {
|> Project.lens.rewardData.rewards .~ []
|> \.extendedProjectProperties .~ self.extendedProjectProperties

combos(Language.allLanguages, [Device.phone4inch, Device.pad]).forEach { language, device in
orthogonalCombos(Language.allLanguages, [Device.phone4inch, Device.pad]).forEach { language, device in
withEnvironment(
config: config,
language: language
Expand Down
Binary file not shown.
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.
Binary file not shown.
Binary file not shown.
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.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
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.
Binary file not shown.
Binary file not shown.
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.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
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.
Binary file not shown.
Binary file not shown.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ internal final class ProjectPageViewControllerDataSource: ValueCellDataSource {
inSection: Section.overviewSubpages.rawValue
)

if featureReportThisProjectEnabled(), AppEnvironment.current.currentUser != nil {
if AppEnvironment.current.currentUser != nil {
self.set(
values: [project.flagging ?? false],
cellClass: ReportProjectCell.self,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,7 @@ final class ProjectPageViewControllerDataSourceTests: XCTestCase {
refTag: nil,
isExpandedStates: nil
)
XCTAssertEqual(3, self.dataSource.numberOfSections(in: self.tableView))
XCTAssertEqual(4, self.dataSource.numberOfSections(in: self.tableView))
Copy link
Contributor

Choose a reason for hiding this comment

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

I assume the extra section is the report section?


// overviewCreatorHeader
XCTAssertEqual(
Expand Down
4 changes: 0 additions & 4 deletions Library/RemoteConfig/RemoteConfigFeature+Helpers.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@ public func featurePostCampaignPledgeEnabled() -> Bool {
featureEnabled(feature: .postCampaignPledgeEnabled)
}

public func featureReportThisProjectEnabled() -> Bool {
featureEnabled(feature: .reportThisProjectEnabled)
}

public func featureLoginWithOAuthEnabled() -> Bool {
featureEnabled(feature: .loginWithOAuthEnabled, defaultValue: true)
}
Expand Down
16 changes: 0 additions & 16 deletions Library/RemoteConfig/RemoteConfigFeature+HelpersTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -91,22 +91,6 @@ final class RemoteConfigFeatureHelpersTests: TestCase {
)
}

func testReportThisProject_RemoteConfig_FeatureFlag_True() {
self
.assert(
featureFlagIsTrue: featureReportThisProjectEnabled,
whenRemoteConfigFeatureIsTrue: .reportThisProjectEnabled
)
}

func testReportThisProject_RemoteConfig_FeatureFlag_False() {
self
.assert(
featureFlagIsFalse: featureReportThisProjectEnabled,
whenRemoteConfigFeatureIsFalse: .reportThisProjectEnabled
)
}

func testLoginWithOAuth_RemoteConfig_FeatureFlag_True() {
self
.assert(
Expand Down
2 changes: 0 additions & 2 deletions Library/RemoteConfig/RemoteConfigFeature.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ public enum RemoteConfigFeature: String, CaseIterable {
case darkModeEnabled = "dark_mode"
case facebookLoginInterstitialEnabled = "facebook_interstitial"
case postCampaignPledgeEnabled = "post_campaign_pledge"
case reportThisProjectEnabled = "report_this_project"
case loginWithOAuthEnabled = "ios_oauth"
case useKeychainForOAuthToken = "use_keychain_for_oauth_token"
}
Expand All @@ -17,7 +16,6 @@ extension RemoteConfigFeature: CustomStringConvertible {
case .darkModeEnabled: return "Dark Mode"
case .facebookLoginInterstitialEnabled: return "Facebook Login Interstitial"
case .postCampaignPledgeEnabled: return "Post Campaign Pledging"
case .reportThisProjectEnabled: return "Report This Project"
case .loginWithOAuthEnabled: return "Login with OAuth"
case .useKeychainForOAuthToken: return "Use Keychain for OAuth token"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,6 @@ private func isFeatureEnabled(_ feature: RemoteConfigFeature) -> Bool {
return featureFacebookLoginInterstitialEnabled()
case .postCampaignPledgeEnabled:
return featurePostCampaignPledgeEnabled()
case .reportThisProjectEnabled:
return featureReportThisProjectEnabled()
case .loginWithOAuthEnabled:
return featureLoginWithOAuthEnabled()
case .useKeychainForOAuthToken:
Expand Down