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

[ENHANCEMENT] Comment section improvements #34

Closed
6 of 15 tasks
SethCram opened this issue Mar 17, 2023 · 0 comments
Closed
6 of 15 tasks

[ENHANCEMENT] Comment section improvements #34

SethCram opened this issue Mar 17, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@SethCram
Copy link
Owner

SethCram commented Mar 17, 2023

Is your feature request related to a problem? Please describe.

  • yes, the comment section isn't well polished and the code not well consolidated

Describe the solution you'd like

  • various comment section improvements

Describe alternatives you've considered

  • leaving it as-is

Additional context

Development

  • allow query posts by user by their comment username

    • easy to use a link and query by username
  • replace comment update text with post edit button

    • easy change to text to icon and color to css
  • if user not logged in, redirect them to login page if try to reply to comment

    • used window.location.replace
      • didnt allow easy back-nav since went to src of website first
    • used window.location.assign() for easy back nav
  • consolidate the 2 instances of voting icons into 1 comp

  • allow comment deletion

  • change red badge from -1 to -3

    • more difficult to lower other people's score
    • ensure user's score only decreases by -5 and not -8
      • should be only -5 since catch all badges given for a negative score and set scoreChange to -5
    • should verify thru:
      • setting env to DEV to get 15m access token timeout
      • login with admin account client side
      • create a comment on one of their own posts client side
      • create a -2 vote for comment from admin via postman
      • login to another act client side
      • downvote comment to get -3
      • should dynamically give red badge and persist (check)
      • should lower post author's score by -5 dynamically and persist
        • didn't do so dynamically when a reply or root comment's badge was changed
        • i believe this was why sidebar was taking context user instead of sidebarUser w/ sidebar user was null
          • bc sidebar user wasn't updated dynamically, but context user was
        • but if that's the case, if comment reached new badge and wasn't the context user, it prolly wouldn't have been dynamically updated
          • and it wasn't, as seen w/ the red badge was achieved thru a final vote cast by not the author of the post or comment
          • so can't go back to how i was doing it
          • need to update sidebar user rep score and badgeName dynamically
    • changed structuring of sidebar component to be more sensical
      • needa make sure everytime retrieve axios headers, if context user updated must propagate the new refresh tokens
      • can't have two context dispatches in same method or else earlier one overwritten?? not sure
    • if alota votes or comments posted, also had to ensure local rep change propogated from Vote or Comment all the way up to sidebar
      • check at root before passing into sidebar that the author changed is actually the sidebar user
  • compress root comment replies until link with number of replies expanded via btn

  • don't allow editing of multiple comments at once

  • align the RHS of the comments to a particular spot

    • should always be in the same spot regardless of comment length/size
  • drag user's screen down to where comment placed once created

    • particularly useful if alota comments
  • display comment author's reputation or mini badge beside their comment

  • don't let authors of comments vote on them

  • determine how to display + get author profile pics

  • delete all post comments and votes when post deleted?

  • dont delete all user comments and votes when user deleted (unrelated)

  • Change score requirement for a comment badge to half that of post and user

@SethCram SethCram added the enhancement New feature or request label Mar 17, 2023
@SethCram SethCram self-assigned this Mar 17, 2023
@SethCram SethCram added the help wanted Extra attention is needed label Mar 28, 2023
@SethCram SethCram closed this as completed Apr 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
Status: 👀 In review
Development

No branches or pull requests

1 participant