Remove blocked and filtered reducers/selectors/actions. #7682

Open
Ruk33 wants to merge 9 commits from 7681-remove-block-list-apis into master
Ruk33 commented 2022-08-30 22:39:36 +02:00 (Migrated from github.com)

Fixes

Issue Number: https://github.com/lbryio/lbry-desktop/issues/7681

What is the current behavior?

What is the new behavior?

blocked & filtered actions/selector/reducers were removed.
Also, if there is a censor reason, we will display it.

image

If no message is present, the default one will be used
("Your hub has blocked this content because it subscribes to the following blocking channel:")

Other information

PR Checklist

Toggle...

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting)
  • Refactoring (no functional changes)
  • Documentation changes
  • Other - Please describe:

Please check all that apply to this PR using "x":

  • I have checked that this PR is not a duplicate of an existing PR (open, closed or merged)
  • I added a line describing my change to CHANGELOG.md
  • I have checked that this PR does not introduce a breaking change
  • This PR introduces breaking changes and I have provided a detailed explanation below
## Fixes Issue Number: https://github.com/lbryio/lbry-desktop/issues/7681 <!-- Tip: - Add keywords to directly close the Issue when the PR is merged. - Skip the keyword if the Issue contains multiple items. - https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword --> ## What is the current behavior? ## What is the new behavior? blocked & filtered actions/selector/reducers were removed. Also, if there is a censor reason, we will display it. ![image](https://user-images.githubusercontent.com/1719111/187539573-658fb8dd-08e7-4abc-9ed1-e2f28423b789.png) If no message is present, the default one will be used ("Your hub has blocked this content because it subscribes to the following blocking channel:") ## Other information <!-- If this PR contains a breaking change, please describe the impact and solution strategy for existing applications below. --> ## PR Checklist <!-- For the checkbox formatting to work properly, make sure there are no spaces on either side of the "x" --> <details><summary>Toggle...</summary> What kind of change does this PR introduce? - [ ] Bugfix - [ ] Feature - [ ] Code style update (formatting) - [x] Refactoring (no functional changes) - [ ] Documentation changes - [ ] Other - Please describe: Please check all that apply to this PR using "x": - [x] I have checked that this PR is not a duplicate of an existing PR (open, closed or merged) - [ ] I added a line describing my change to CHANGELOG.md - [x] I have checked that this PR does not introduce a breaking change - [ ] This PR introduces breaking changes and I have provided a detailed explanation below </details>
jessopb (Migrated from github.com) requested changes 2022-08-31 22:24:32 +02:00
jessopb (Migrated from github.com) left a comment

Nice. I don't think there's any reason to leave those empty arrays in. Removing them can only simplify the related components. Yes?

Nice. I don't think there's any reason to leave those empty arrays in. Removing them can only simplify the related components. Yes?
@ -167,6 +167,7 @@ declare type ClaimErrorCensor = {
take_over_height: number,
},
name: string,
text: string,
jessopb (Migrated from github.com) commented 2022-08-31 22:21:28 +02:00

+1

+1
jessopb (Migrated from github.com) commented 2022-08-31 22:21:07 +02:00

These are unneccessary.

These are unneccessary.
jessopb (Migrated from github.com) commented 2022-08-31 22:20:50 +02:00

This should be gone too.

This should be gone too.
jessopb (Migrated from github.com) requested changes 2022-09-05 23:00:22 +02:00
jessopb (Migrated from github.com) left a comment

Just the linter complaining:

Error --------------------------------------------------------------------------------- ui/redux/actions/claims.js:93:22

Cannot get `uriResolveInfo.error.censor` because property `censor` is missing in mixed [1].

   ui/redux/actions/claims.js:93:22
   93|                   ...uriResolveInfo.error.censor,
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^

References:
   /tmp/flow/flowlib_61141ec/core.js:48:51
   48|     static entries(object: mixed): Array<[string, mixed]>;
                                                         ^^^^^ [1]


Error --------------------------------------------------------------------------------- ui/redux/actions/claims.js:94:25

Cannot get `uriResolveInfo.error.text` because property `text` is missing in mixed [1].

   ui/redux/actions/claims.js:94:25
   94|                   text: uriResolveInfo.error.text,
                               ^^^^^^^^^^^^^^^^^^^^^^^^^

References:
   /tmp/flow/flowlib_61141ec/core.js:48:51
   48|     static entries(object: mixed): Array<[string, mixed]>;
                                                         ^^^^^ [1]
                                                         ```
Just the linter complaining: ``` Error --------------------------------------------------------------------------------- ui/redux/actions/claims.js:93:22 Cannot get `uriResolveInfo.error.censor` because property `censor` is missing in mixed [1]. ui/redux/actions/claims.js:93:22 93| ...uriResolveInfo.error.censor, ^^^^^^^^^^^^^^^^^^^^^^^^^^^ References: /tmp/flow/flowlib_61141ec/core.js:48:51 48| static entries(object: mixed): Array<[string, mixed]>; ^^^^^ [1] Error --------------------------------------------------------------------------------- ui/redux/actions/claims.js:94:25 Cannot get `uriResolveInfo.error.text` because property `text` is missing in mixed [1]. ui/redux/actions/claims.js:94:25 94| text: uriResolveInfo.error.text, ^^^^^^^^^^^^^^^^^^^^^^^^^ References: /tmp/flow/flowlib_61141ec/core.js:48:51 48| static entries(object: mixed): Array<[string, mixed]>; ^^^^^ [1] ```
Ruk33 commented 2022-09-13 00:21:20 +02:00 (Migrated from github.com)

Thank you @jessopb, sadly I couldn't fix it without using // $FlowFixMe. Not ideal but it gets rid of the warning.

I tried typecasting but it kept complaining about not being compatible with mixed

Thank you @jessopb, sadly I couldn't fix it without using `// $FlowFixMe`. Not ideal but it gets rid of the warning. I tried typecasting but it kept complaining about not being compatible with `mixed`
jessopb commented 2022-09-19 15:17:53 +02:00 (Migrated from github.com)

This will be merged when infrastructure is ready.

This will be merged when infrastructure is ready.
jessopb (Migrated from github.com) approved these changes 2022-09-19 15:18:07 +02:00
This pull request has changes conflicting with the target branch.
  • static/app-strings.json

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 7681-remove-block-list-apis:7681-remove-block-list-apis
git checkout 7681-remove-block-list-apis

Merge

Merge the changes and update on Forgejo.
git checkout master
git merge --no-ff 7681-remove-block-list-apis
git checkout master
git merge --ff-only 7681-remove-block-list-apis
git checkout 7681-remove-block-list-apis
git rebase master
git checkout master
git merge --no-ff 7681-remove-block-list-apis
git checkout master
git merge --squash 7681-remove-block-list-apis
git checkout master
git merge --ff-only 7681-remove-block-list-apis
git checkout master
git merge 7681-remove-block-list-apis
git push origin master
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#7682
No description provided.