Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[NT-876] Add Pledge CTA to ProjectDescriptionViewController #1072

Conversation

justinswart
Copy link
Contributor

@justinswart justinswart commented Feb 19, 2020

📲 What

Displays the pledge button on our campaign details page when the user is part of that experiment group.

Note: In order to reduce the size of this PR I have added some TODOs that will be in separate PRs.

🤔 Why

This work is part of our experimentation to test whether we can increase conversion from the campaign details page.

🛠 How

  • Added PledgeCTAContainerView to ProjectDescriptionViewController.
  • Added presentation of RewardsViewController from ProjectDescriptionViewController.
  • Passed RefTag through to ProjectDescriptionViewController.

👀 See

Before 🐛 After 🦋
image image

✅ Acceptance criteria

On the Project view tap on Read more about the campaign:

  • If the user has not backed the campaign, the Pledge CTA button should be displayed.
  • If the user has backed the campaign, the Pledge CTA button should not be displayed.

⏰ TODO

  • Complete in-line TODOs which will add tests once the experimentation code is merged.
  • Add the behaviour to pop the navigation stack to root once the project is backed. This is so that the user is shown the project view again once the thanks view is closed.

@justinswart justinswart changed the base branch from master to NT-872-feature-project-page-experiment February 19, 2020 17:32
self.pledgeCTAButtonTappedProperty.value = state
}

fileprivate let projectProperty = MutableProperty<(Project, RefTag?)?>(nil)
Copy link
Contributor

Choose a reason for hiding this comment

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

Can this be renamed to projectAndReftagProperty?

self?.pledgeCTAContainerView.configureWith(value: value)
}

self.pledgeCTAContainerView.rac.hidden = self.viewModel.outputs.pledgeCTAContainerViewIsHidden
Copy link
Contributor

Choose a reason for hiding this comment

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

can we put this at the very top of bindViewModel(), after super.bindViewModel(). Same with line 92.

@@ -36,7 +38,7 @@ internal final class ProjectPamphletContentDataSource: ValueCellDataSource {
)
}

self.set(values: [project], cellClass: ProjectPamphletMainCell.self, inSection: Section.main.rawValue)
self.set(values: [projectAndRefTag], cellClass: ProjectPamphletMainCell.self, inSection: Section.main.rawValue)
Copy link
Collaborator

Choose a reason for hiding this comment

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

🚫 Line should be 110 characters or less: currently 115 characters
line_length ProjectPamphletContentDataSource.swift:41

.filter { _, subpage, _ in subpage == .comments }
.map { project, _, vcs in vcs + [CommentsViewController.configuredWith(project: project, update: nil)] }
.filter { _, subpage, _, _ in subpage == .comments }
.map { project, _, vcs, _ in vcs + [CommentsViewController.configuredWith(project: project, update: nil)] }
Copy link
Collaborator

Choose a reason for hiding this comment

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

🚫 Line should be 110 characters or less: currently 113 characters
line_length AppDelegateViewModel.swift:457

@nativeksr
Copy link
Collaborator

1 Warning
⚠️ Big PR

Generated by 🚫 Danger

* Pop project pamphlet to root VC after project is backed

* Alphabetize
…k-project-campaign-details

# Conflicts:
#	Library/ViewModels/ProjectPamphletMainCellViewModelTests.swift
@justinswart justinswart merged commit 5a6b951 into NT-872-feature-project-page-experiment Feb 21, 2020
@justinswart justinswart deleted the NT-876-back-project-campaign-details branch February 21, 2020 02:29
justinswart added a commit that referenced this pull request Mar 4, 2020
* [NT-878, NT-873] Add Experiment and Read More is a full-width button (#1073)

* read more button experiment

* testing experiment outputs

* swift format

* naming changes

* new snapshots

* feedback

* swift format

* corrected typo

* [NT-876] Add Pledge CTA to ProjectDescriptionViewController (#1072)

* Add pledge CTA to project description

* Update tests

* Add goToRewards to ProjectDescriptionViewController

* Tidy up

* Tidy up

* Fix line lengths

* [NT-876] Pop ProjectPamphlet to root after project is backed (#1075)

* Pop project pamphlet to root VC after project is backed

* Alphabetize

* [NT-876] Add Project Campaign Experiment Tests (#1076)

* Add tests

* Fix tests

* Remove duplicate

* Hide the back this project button to creators of their own projects (#1078)

* [NT-877] Project page Optimizely Events (#1079)

* optimizely tracking events

* swiftlint fix

* swift format

* Add loader to read more button in second variant (#1077)

Co-authored-by: Christella <cdolm92@gmail.com>
ifbarrera pushed a commit that referenced this pull request Mar 18, 2020
* [NT-878, NT-873] Add Experiment and Read More is a full-width button (#1073)

* [NT-876] Add Pledge CTA to ProjectDescriptionViewController (#1072)

* [NT-876] Pop ProjectPamphlet to root after project is backed (#1075)

* [NT-876] Add Project Campaign Experiment Tests (#1076)

* Hide the back this project button to creators of their own projects (#1078)

* [NT-877] Project page Optimizely Events (#1079)

* Add loader to read more button in second variant (#1077)

* [NT-930] Add Project Creator Details Query and VM outputs (#1086)

* [NT-940] Activate Creator Details Experiment (#1088)

* [NT-931] Add creator byline view (#1089)

Co-authored-by: Justin Swart <justinswart@users.noreply.github.com>

* [NT- 956] CreatorByline View Model and Tests (#1095)

* [NT-937] Creator Details Shimmer Loading View (#1097)

* [NT- 939] Creator details tracking events (#1098)

* translated copy (#1111)

Co-authored-by: Christella <cdolm92@gmail.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants