Report infringing content within app #1425

Closed
miikkatu wants to merge 1 commit from report-infringing-content-within-app into master
miikkatu commented 2018-05-02 17:30:40 +02:00 (Migrated from github.com)

This is a suggested implementation for #909.

This is work-in-progress, as there is a CORS issue when posting the report, as discussed with @maximest-pierre.

This is a suggested implementation for #909. This is work-in-progress, as there is a CORS issue when posting the report, as discussed with @maximest-pierre.
lbry-bot commented 2018-05-02 17:36:59 +02:00 (Migrated from github.com)
Warnings
⚠️

📄 Changelog Entry Missing - Please add a changelog entry for your changes.

Generated by 🚫 dangerJS

<!-- 0 failure: 1 warning: :page_facing_up: ... DangerID: danger-id-default; --> <table> <thead> <tr> <th width="50"></th> <th width="100%" data-danger-table="true">Warnings</th> </tr> </thead> <tbody><tr> <td>:warning:</td> <td> :page_facing_up: Changelog Entry Missing - <i>Please add a changelog entry for your changes.</i> </td> </tr> </tbody> </table> <p align="right"> Generated by :no_entry_sign: <a href="http://github.com/danger/danger-js/">dangerJS</a> </p>
neb-b commented 2018-05-04 20:47:49 +02:00 (Migrated from github.com)

This is looking good, a couple comments.

Most of this should live in redux. We shouldn't be making api calls in in the component to keep things simple. You should also avoid mixing props and internal state like you are doing in this line:
identifier: this.props.params.uri !== undefined ? this.props.params.uri : '',

I propose creating a report reducer. Which will handle fetch errors, and loading while the api call is being made. The form values don't need to be stored in it, so Formik would be a good solution for this, similar to how we do it with the shapeshift component.

This is looking good, a couple comments. Most of this should live in redux. We shouldn't be making api calls in in the component to keep things simple. You should also avoid mixing props and internal state like you are doing in this line: `identifier: this.props.params.uri !== undefined ? this.props.params.uri : '',` I propose creating a `report` reducer. Which will handle fetch errors, and loading while the api call is being made. The form values don't need to be stored in it, so `Formik` would be a good solution for this, similar to how we do it with the shapeshift component.
miikkatu commented 2018-05-06 06:19:16 +02:00 (Migrated from github.com)

identifier: this.props.params.uri !== undefined ? this.props.params.uri : '',

I think in this case setting the state from props is ok, because it's like seed data. The form is generic so that the identifier can be uri but also something else as the UI info text says (Name, claim ID, or another way for us to identify the infringing content.).

This reporting function should eventually be generic, so that it could also be opened from sidebar. And when it's opened from there, the uri param will not be in the props, and the form will set the field as empty.

> identifier: this.props.params.uri !== undefined ? this.props.params.uri : '', I think in this case setting the state from props is ok, because it's like seed data. The form is generic so that the identifier can be uri but also something else as the UI info text says (Name, claim ID, or another way for us to identify the infringing content.). This reporting function should eventually be generic, so that it could also be opened from sidebar. And when it's opened from there, the uri param will not be in the props, and the form will set the field as empty.
miikkatu commented 2018-05-06 06:42:15 +02:00 (Migrated from github.com)

I propose creating a report reducer. Which will handle fetch errors, and loading while the api call is being made. The form values don't need to be stored in it, so Formik would be a good solution for this, similar to how we do it with the shapeshift component.

Looks like this would require more time than I currently have, unfortunately. Hopefully someone else can continue from here.

> I propose creating a report reducer. Which will handle fetch errors, and loading while the api call is being made. The form values don't need to be stored in it, so Formik would be a good solution for this, similar to how we do it with the shapeshift component. Looks like this would require more time than I currently have, unfortunately. Hopefully someone else can continue from here.
tzarebczan commented 2018-05-08 15:21:48 +02:00 (Migrated from github.com)

@miikkatu thanks for your work so far, we've sent you a tip!

@btzr-io do you think this is something you could pick up? It's not urgent, but let me know if you are interested.

@miikkatu thanks for your work so far, we've sent you a tip! @btzr-io do you think this is something you could pick up? It's not urgent, but let me know if you are interested.
alyssaoc commented 2018-10-01 21:39:28 +02:00 (Migrated from github.com)

closing, looking at a new direction/solution

closing, looking at a new direction/solution
neb-b commented 2018-10-01 21:41:28 +02:00 (Migrated from github.com)

@miikkatu We may come back to this. I will re-open if we decide to go with this solution.

@miikkatu We may come back to this. I will re-open if we decide to go with this solution.

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: LBRYCommunity/lbry-desktop#1425
No description provided.