-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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-971] Submit Report Project View #1859
Conversation
* UITableView cell will be added to the Project Page Table View * Used to display a new swiftui view for the report this project label and already reported label
ReportProjectLabelView (SwiftUI View) re-renders when its text labels contain hyperlinks. Since we're rendering hyperlinks with the helper in Text+HTML.swift, this seems to cause a `precondition failure: cyclic graph` crash. This check prevents that by making sure the cell is only configured once on dequeue.
we don't need to hide it now that there is a new section below it.
* UITableView cell will be added to the Project Page Table View * Used to display a new swiftui view for the report this project label and already reported label
…he projectUrl, to form view
no viewmodel or service functionality yet.
We might be changing this approach with Combine as we solidify standards later. For now, I'm following existing patterns
* this won't work just yet. still need to pass the projectID to this view * submits a report using createFlagging mutation * shows a message banner on successful/unsuccessful response * updates save button/loading button as needed
clientMutationId is optional so we can just pass nil here
* this is to keep users from reporting a project more than once
…adyReported Label
need to re-record snapshots since the label is now behind the feature flag
Codecov Report
@@ Coverage Diff @@
## main #1859 +/- ##
==========================================
- Coverage 83.95% 83.83% -0.13%
==========================================
Files 1289 1292 +3
Lines 117118 117304 +186
Branches 31158 31223 +65
==========================================
+ Hits 98327 98338 +11
- Misses 17702 17874 +172
- Partials 1089 1092 +3
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to discuss this more after the cut; I don't think we have time to go into what we want our standards to be right now (I think this should be using Combine instead of reactive swift, for example).
I wasn't able to test this fully (I still don't have an admin password so I can't check if report got sent) but the in-app part looks good. I do think that the "Save" button needs to be called "Send" or "Submit" instead, but I guess that will also need to be a fast follow instead.
So with the caveat that I don't think we have time to explore the best way to do SwiftUI or combine right now, this is good, but I'd love to revisit the decisions made here asap. (I'm not saying the SwiftUI part of it is bad; I am saying it's not following conventions that I'm used to, and I'd need time to dig into why it's structured the way it is to figure out if I agree with it or not. Either way, it's good enough for now.)
📲 What
New SwiftUI View that displays a form allowing users to report a project.
🤔 Why
Our iOS app currently violates the User Generated Content Policy in the App Store. Specifically, we need (at the project screen level):
This form should appease Apple
🛠 How
👀 See
✅ Acceptance criteria
Happy Path
Sad Path