Updates comment-related redux code to support sdk version 0.53.0 #259
No reviewers
Labels
No labels
area: devops
area: discovery
area: docs
area: livestream
area: proposal
consider soon
dependencies
Epic
good first issue
hacktoberfest
help wanted
icebox
Invalid
level: 1
level: 2
level: 3
level: 4
needs: exploration
needs: grooming
needs: priority
needs: repro
needs: tech design
on hold
priority: blocker
priority: high
priority: low
priority: medium
resilience
Tom's Wishlist
type: bug
type: discussion
type: improvement
type: new feature
type: refactor
type: task
type: testing
unplanned
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: LBRYCommunity/lbry-redux#259
Loading…
Reference in a new issue
No description provided.
Delete branch "sdk-update"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Adds support for LBRY SDK Version
0.53.0
.Adds
Three new functions are added to
Lbry.js
to communicate directly with the SDK:comment_hide
comment_abandon
comment_update
Similarly, three new functions are added to
src/redux/actions/comments.js
:doCommentHide(comment_id: String)
doCommentAbandon(comment_id: string)
doCommentUpdate(comment_id: string, comment: string)
Changes:
state.comments.byId
now maps aclaim_id
to acomment_id
liststate.comments.commentById
is added to map acomment_id
to aComment
objectstate.comments.commentsByUri
maps auri
to aclaim_id
type Comment
is modified to be reflective of how the API retrieves commentsSome comments and questions
Users don't care about comment_id's. Maybe something like this:
"There was an error hiding this comment. Please try again later."
Same here.
Same here
@ -85,0 +180,4 @@
message: 'There was an error hiding this comment. Please try again later.',
isError: true,
})
);
Nice. I like this pattern
I think this part can just be replaced with
No need to loop through it.
@ -11,0 +28,4 @@
return comments;
}
);
Why do we need this new selector? (Not saying we don't, I'm just trying to understand the logic)
Is it that in you first get a list of the children comment ids, then for each child, get the actual comment?
It also helps to explain why you are doing something in a comment instead of what the code is doing, since that can usually be figured out.
ex: "map a new array of comments by the claimId"
I can see that's what this code is doing, but I don't know why it's doing that.