Adds the ability for users to update & delete comments #3453
No reviewers
Labels
No labels
accessibility
app-parity
area: creator
area: daemon
area: design
area: devops
area: discovery
area: docs
area: installer
area: internal
area: livestream
area: performance
area: proposal
area: reposts
area: rewards
area: search
area: security
area: subscriptions
area: sync
area: ux
area: viewer
area: wallet
BEAMER
channel
comments
community PR
consider soon
core team
css
dependencies
electron
Epic
feature request
first-timers-only
good first issue
hacktoberfest
help wanted
hub-dependent
icebox
Invalid
level: 0
level: 1
level: 2
level: 3
level: 4
merge when green
needs: exploration
needs: grooming
needs: priority
needs: repro
needs: tech design
notifications
odysee
on hold
playlists
priority: blocker
priority: high
priority: low
priority: medium
protocol dependent
recsys
redesign
regression
resilience
sdk dependent
Tom's Wishlist
trending
type: bug
type: discussion
type: improvement
type: new feature
type: refactor
type: task
type: testing
unplanned
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: LBRYCommunity/lbry-desktop#3453
Loading…
Reference in a new issue
No description provided.
Delete branch "comment-options"
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 the ability for users to update & delete their comments.
Changes:
Comment
componentThis PR depends on #259 for redux to work properly.
mostly small stuff, this is pretty close.
I also saw an error when I tried to edit a comment. The snackbar was displayed and it said:
This should not be removed
@ -28,46 +38,144 @@ function Comment(props: Props) {
timePosted,
message,
You are already wrapping this in
commentIsMine
so these aren't neededset a classname based on if it's hovering, then we can use css variables. Currently in dark mode, the dots get darker when you hover.
The space in between
{
andcommentIsMine
is because you disabled the precommit hook which formats the code.these ^ comments aren't needed
@ -69,0 +148,4 @@
</MenuItem>
<MenuItem className="comment__menu-option" onSelect={handleDeleteComment}>
{__('Delete')}
</MenuItem>
This can just delete the comment, we don't need a modal for it.
@ -13,0 +15,4 @@
// todo: implement comment_list --mine in SDK so redux can grab with selectCommentIsMine
const isMyComment = (channelId: string) => {
if (myChannels != null && channelId != null) {
This was causing an error when I refreshed on a page with comments
@ -81,6 +81,7 @@ export const SIGN_IN = 'SignIn';
export const TRENDING = 'Trending';
remove this one since we aren't using it
lets get rid of this modal
That must've snuck into the commit somehow, will revert.
@ -13,0 +15,4 @@
// todo: implement comment_list --mine in SDK so redux can grab with selectCommentIsMine
const isMyComment = (channelId: string) => {
if (myChannels != null && channelId != null) {
Was using
myChannels !== null
instead ofmyChannels != null
@ -28,46 +38,144 @@ function Comment(props: Props) {
timePosted,
message,
done
@osilkin98 I still see "error hiding comment" when I edit a comment. It looks like the edit works correctly, but I see the error message every time.
@seanyesmunt Was this in the web version or the desktop?
@seanyesmunt In regards to the toast message, PR #265 should display the correct message in the snackbar.
In regards to displaying the comments as being updated but getting an error, the #265 also fixes that.
Everything works perfectly fine now, should be safe to merge.
@osilkin98 Please squash your commits and rebase, then it's good to merge.