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

[WEB-983] Prelaunch Page Existing Project Page UI #1797

Merged
merged 28 commits into from
Mar 22, 2023

Conversation

msadoon
Copy link
Contributor

@msadoon msadoon commented Feb 27, 2023

πŸ“² What

We want to enabled prelaunch projects to show a different UI to what is there now (looks broken.)

πŸ€” Why

Deeplinks are used in marketing campaigns to display projects to the user in-app. Those in-app projects are sometimes prelaunch, so they have no backer/pledge/comments/updates info.

As of now prelaunch project deeplinks open (sometimes) in the app. We want to make them always open in-app and fix-up the UI to display the project page as intended design.

πŸ›  How

Few pieces here, mainly related to the project's displayPrelaunch boolean. Previously AppDelegate was routing to Safari when that flag was true. It should now route in-app.

Needed Project watchesCount GQL property to be included in project fragment.

Update of Strings.

The main way we save the project is to reuse the WatchProjectViewModel in the ProjectNavigationSelectorView. We have the PledgeCTAContainerView pass the new prelaunch PledgeCTAType to that view via delegation - if the button click is from the pledge cta. If not we listen for a notification from the navigation selector when project saves there.

That's the cool part, we reuse a lot of existing code and keep the two views nicely in sync.

A minor bug was fixed within the project page, which on orientation change was showing cached images that were directly updated in the table before sections changed from Overview to another tab. So if you loaded a project and immediately changed the orientation, the overview tab shows images that should only be shown in the campaign tab. So nice quick fix there.

πŸ‘€ See

Before πŸ› After πŸ¦‹
below
Simulator.Screen.Recording.-.iPhone.8.-.2023-03-20.at.10.05.06.mp4

βœ… Acceptance criteria

  • Open a prelaunch project page in-app and see that it displays based on designs above.
  • Ensure saving works accurately on prelaunch projects and is reflect
  • Ensure existing non-prelaunch projects open with correct cta banner state (ie. pledge, manage, fix, retry, view rewards, view your rewards.)

⏰ TODO

  • Project page design update based on displayPrelaunch flag

@msadoon msadoon self-assigned this Feb 27, 2023
@msadoon msadoon added the WIP label Feb 27, 2023
@msadoon msadoon added this to the release-5.7.0 milestone Feb 27, 2023
@codecov
Copy link

codecov bot commented Mar 10, 2023

Codecov Report

Merging #1797 (a723049) into main (f78b71c) will decrease coverage by 0.01%.
The diff coverage is 86.52%.

@@            Coverage Diff             @@
##             main    #1797      +/-   ##
==========================================
- Coverage   85.36%   85.35%   -0.01%     
==========================================
  Files        1286     1286              
  Lines      117624   117942     +318     
  Branches    31142    31232      +90     
==========================================
+ Hits       100411   100673     +262     
- Misses      16129    16183      +54     
- Partials     1084     1086       +2     
Impacted Files Coverage Ξ”
...ojectPage/Views/ProjectPageNavigationBarView.swift 83.73% <0.00%> (-1.03%) ⬇️
Library/ViewModels/SetYourPasswordViewModel.swift 95.94% <0.00%> (-0.06%) ⬇️
...ary/ViewModels/SetYourPasswordViewModelTests.swift 98.98% <0.00%> (ΓΈ)
KsApi/models/lenses/ProjectLenses.swift 16.38% <12.76%> (-0.46%) ⬇️
...ectPage/Controller/ProjectPageViewController.swift 50.40% <50.00%> (-0.01%) ⬇️
Library/PledgeStateCTAType.swift 87.03% <83.33%> (+1.03%) ⬆️
...arter-iOS/SharedViews/PledgeCTAContainerView.swift 95.04% <92.95%> (-1.16%) ⬇️
...y/ViewModels/PledgeCTAContainerViewViewModel.swift 94.02% <93.33%> (+0.15%) ⬆️
Library/ViewModels/ProjectPageViewModel.swift 93.71% <96.29%> (+0.15%) ⬆️
Kickstarter-iOS/AppDelegateViewModel.swift 92.43% <100.00%> (-0.03%) ⬇️
... and 17 more

πŸ“£ We’re building smart automated test selection to slash your CI/CD build times. Learn more

@nativeksr
Copy link
Collaborator

nativeksr commented Mar 13, 2023

1 Warning
⚠️ Big PR

Generated by 🚫 Danger

@msadoon msadoon added needs review and removed WIP labels Mar 20, 2023
@msadoon msadoon requested a review from scottkicks March 20, 2023 14:16
@msadoon msadoon marked this pull request as ready for review March 20, 2023 14:16
Copy link
Contributor

@scottkicks scottkicks left a comment

Choose a reason for hiding this comment

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

Nice work! Noticed a bug when going to profile to view the saved prelaunch project.

  • The number of saved projects doesn't update
  • The list of saved projects is not updating until forcing a pull-to-refresh (maybe that's a known one)
    Simulator Screen Recording - iPhone 13 Pro - 2023-03-22 at 09 24 38

Also, I'm still reviewing the string translation updates. It might be easier to put changes like that in a separate PR in the future to keep these smaller.

@msadoon
Copy link
Contributor Author

msadoon commented Mar 22, 2023

Nice work! Noticed a bug when going to profile to view the saved prelaunch project.

* The number of saved projects doesn't update

* The list of saved projects is not updating until forcing a pull-to-refresh (maybe that's a known one)
  ![Simulator Screen Recording - iPhone 13 Pro - 2023-03-22 at 09 24 38](https://user-images.githubusercontent.com/110618242/226953748-404c2f96-5572-4190-82cb-caf9e94b211f.gif)
        
          [
            
          
              ![Simulator Screen Recording - iPhone 13 Pro - 2023-03-22 at 09 24 38](https://user-images.githubusercontent.com/110618242/226953748-404c2f96-5572-4190-82cb-caf9e94b211f.gif)
            ](https://user-images.githubusercontent.com/110618242/226953748-404c2f96-5572-4190-82cb-caf9e94b211f.gif)
          
          
            
              
                
              
              
                
                
              
            
            [
              
                
              
            ](https://user-images.githubusercontent.com/110618242/226953748-404c2f96-5572-4190-82cb-caf9e94b211f.gif)

Also, I'm still reviewing the string translation updates. It might be easier to put changes like that in a separate PR in the future to keep these smaller.

Ok, yea good point, just given the timelines wanted this quickly merged with Strings. Plus the Strings are related to the context here.

Also regarding the saved projects not updating until refreshed -- it's an upcoming ticket here.

@msadoon msadoon requested a review from scottkicks March 22, 2023 15:59
Copy link
Contributor

@scottkicks scottkicks left a comment

Choose a reason for hiding this comment

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

πŸ‘

@msadoon msadoon merged commit 284ef75 into main Mar 22, 2023
@msadoon msadoon deleted the web-983/prelaunch-pages-ios-ui-existing-project-page branch March 22, 2023 16:45
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