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-982] Support Project Fragment's Flagging Property #1855

Merged
merged 4 commits into from Sep 20, 2023

Conversation

scottkicks
Copy link
Contributor

📲 What

Adds support for the GraphQL field:

  • flagging

Also adds an output signal to ProjectPageViewModel that we can use in the ProjectPageViewController when we're ready.

🤔 Why

This new property will help tell us if a user has already flagged a project. Allowing us to keep them from reporting again.

🛠 How

Added this property to the FetchProjectById & FetchProjectBySlug fragments.
Rather than add this to the base fetchproject query, we can add it only to these sub queries so that we only access this property as needed.

...
flagging {
   id
   kind
}
...

✅ Acceptance criteria

  • Project page and Dashboard loads and no missing data. User can pledge/back/edit pledge/view comments/view updates, etc. No new functionality added.

@scottkicks scottkicks self-assigned this Sep 19, 2023
@scottkicks scottkicks added this to the release-5.11.0 milestone Sep 19, 2023
@scottkicks scottkicks marked this pull request as ready for review September 19, 2023 22:00
Copy link
Contributor

@msadoon msadoon left a comment

Choose a reason for hiding this comment

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

Approved, but check there aren't tests we can write for this new property (noted below).

Library/ViewModels/ProjectPageViewModel.swift Outdated Show resolved Hide resolved
Library/ViewModels/ProjectPageViewModel.swift Show resolved Hide resolved
@nativeksr
Copy link
Collaborator

1 Warning
⚠️ Big PR

Generated by 🚫 Danger

@codecov
Copy link

codecov bot commented Sep 20, 2023

Codecov Report

Merging #1855 (1ddfd47) into main (a1701ad) will increase coverage by 0.00%.
The diff coverage is 71.08%.

@@           Coverage Diff           @@
##             main    #1855   +/-   ##
=======================================
  Coverage   84.06%   84.06%           
=======================================
  Files        1280     1280           
  Lines      116796   116823   +27     
  Branches    31035    31043    +8     
=======================================
+ Hits        98180    98207   +27     
+ Misses      17533    17532    -1     
- Partials     1083     1084    +1     
Files Changed Coverage Δ
KsApi/models/lenses/ProjectLenses.swift 16.34% <16.00%> (ø)
...aphql/adapters/Project+FetchProjectQueryData.swift 46.87% <50.00%> (+0.10%) ⬆️
Library/ViewModels/ProjectPageViewModel.swift 97.26% <50.00%> (-0.26%) ⬇️
...els/graphql/adapters/Project+ProjectFragment.swift 89.92% <96.96%> (+0.07%) ⬆️
...ectPage/Controller/ProjectPageViewController.swift 50.71% <100.00%> (+0.31%) ⬆️
KsApi/models/Project.swift 77.09% <100.00%> (+0.17%) ⬆️
.../adapters/Project+FetchProjectQueryDataTests.swift 95.50% <100.00%> (+0.03%) ⬆️
...raphql/adapters/Project+ProjectFragmentTests.swift 97.31% <100.00%> (+0.01%) ⬆️
Library/ViewModels/ProjectPageViewModelTests.swift 98.15% <100.00%> (+0.01%) ⬆️

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@scottkicks scottkicks merged commit e0657bf into main Sep 20, 2023
7 checks passed
@scottkicks scottkicks deleted the project-fragment-flagging branch September 20, 2023 19:25
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