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

Added logic to use content_url for thread/comment bodies if present #9461

Merged
merged 14 commits into from
Oct 22, 2024

Conversation

mzparacha
Copy link
Contributor

@mzparacha mzparacha commented Oct 7, 2024

Link to Issue

Closes: #8670

Description of Changes

  • Added logic to use content_url for thread/comment bodies (if present)
  • Version histories now also use content_url to fetch thread/comment bodies (if present)

"How We Fixed It"

N/A

Test Plan

  1. Create a thread/comment with 2k+ characters
  2. On the thread details page, update the thread, keep the 2k chars, and add some more
  3. Verify you see the updated thread body after saving
  4. Update the thread again similar to 2, and verify it works correctly.
  5. Reload the page
  6. Update the thread and trim the body to <2k chars, verify it works
  7. Repeat step 6
  8. Repeat step 2
  9. Repeat step 6 - the latest thread version should now have <2k chars
  10. Reload page.
  11. Now select different version histories and verify they all show the correct thread body.
  12. Now select a thread version that has >2k chars, and update the thread title (or anything that doesn't update the thread body), verify that the thread body doesn't get changed to the latest version which has <2k chars.
  13. Repeat step 2 - the latest thread version should now have >2k chars
  14. Repeat step 13 but with opposite flow. i.e. where you selected >2k chars versions, select a version that has <2k chars, and verify that the thread body doesn't get changed to the latest version which has >2k chars.
  15. Verify that whenever you update thread, the edit body matches the selected thread version body.

Deployment Plan

N/A

Other Considerations

N/A

@github-actions github-actions bot marked this pull request as draft October 7, 2024 11:23
@mzparacha mzparacha changed the title Added logic to get thread content from url if present Added logic to use content_url for thread/comment bodies if present Oct 8, 2024
@mzparacha mzparacha marked this pull request as ready for review October 8, 2024 12:18
@mzparacha mzparacha self-assigned this Oct 8, 2024
Copy link
Collaborator

@timolegros timolegros left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems to be loading thread content URLs correctly but version history doesn't work.

If I edit a thread I need to refresh to see the update and once I do I can no longer switch back to earlier versions of the thread (the UI doesn't update). In other words I could not follow your test plan.

@mzparacha
Copy link
Contributor Author

It seems to be loading thread content URLs correctly but version history doesn't work.
If I edit a thread I need to refresh to see the update and once I do I can no longer switch back to earlier versions of the thread (the UI doesn't update). In other words, I could not follow your test plan.

So there were a lot of complex component states involved (switch from 2k+ chars version to <2k chars and its different combinations), and it crashed with certain use cases. I trimmed it all down, and it should work correctly now. Please see the updated test plan to test out all the possible issues.

@masvelio
Copy link
Contributor

followed test plan, everything worked fine

Copy link
Contributor

@masvelio masvelio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@timolegros timolegros merged commit bc12a25 into master Oct 22, 2024
10 checks passed
@timolegros timolegros deleted the malik.8670.thread-comment-content-url-migration branch October 22, 2024 12:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migration to Blob Storage (part 3/4)
3 participants