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

Report infringing content within app #1425

Closed
wants to merge 1 commit into from
Closed

Report infringing content within app #1425

wants to merge 1 commit into from

Conversation

miikkatu
Copy link
Contributor

@miikkatu miikkatu commented May 2, 2018

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
Copy link

lbry-bot commented May 2, 2018

Warnings
⚠️

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

Generated by 🚫 dangerJS

@neb-b
Copy link

neb-b commented May 4, 2018

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
Copy link
Contributor Author

miikkatu commented May 6, 2018

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
Copy link
Contributor Author

miikkatu commented May 6, 2018

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
Copy link
Contributor

tzarebczan commented May 8, 2018

@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
Copy link
Contributor

alyssaoc commented Oct 1, 2018

closing, looking at a new direction/solution

@alyssaoc alyssaoc closed this Oct 1, 2018
@neb-b
Copy link

neb-b commented Oct 1, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
on hold Temporarily paused
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants