fix: Set conditional wrapping for big messages on PDF transcript's react template#32311
Merged
kodiakhq[bot] merged 19 commits intodevelopfrom May 9, 2024
Merged
fix: Set conditional wrapping for big messages on PDF transcript's react template#32311kodiakhq[bot] merged 19 commits intodevelopfrom
kodiakhq[bot] merged 19 commits intodevelopfrom
Conversation
🦋 Changeset detectedLatest commit: e0fcda7 The changes in this PR will be included in the next version bump. This PR includes changesets to release 32 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #32311 +/- ##
===========================================
+ Coverage 55.57% 55.60% +0.02%
===========================================
Files 2401 2405 +4
Lines 52858 52929 +71
Branches 10857 10872 +15
===========================================
+ Hits 29375 29430 +55
- Misses 20891 20899 +8
- Partials 2592 2600 +8
Flags with carried forward coverage won't be shown. Click here to find out more. |
Contributor
|
Looks like this PR is ready to merge! 🎉 |
MarcosSpessatto
suggested changes
Apr 29, 2024
ee/packages/pdf-worker/src/templates/ChatTranscript/components/MessageList.tsx
Show resolved
Hide resolved
MarcosSpessatto
suggested changes
Apr 30, 2024
MarcosSpessatto
suggested changes
May 2, 2024
MarcosSpessatto
approved these changes
May 9, 2024
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://rocketchat.atlassian.net/browse/CORE-75
Proposed changes (including videos or screenshots)
Issue(s)
Steps to test or reproduce
Further comments
Main problem was caused by a set of (the react-pdf equivalent of a div> for our purposes) elements that were not allowed to break down (wrap=false) since they were holding together the structure of a message. This was defined like this so when PDF was near end of page, we would move the whole "message" box to the next page.
However, when a message (in this case, a quoted one) was bigger than the available size in the page, the library knew it had to break, but since the whole view was unbreakable, it tried to move to the next page infinitely.
Template was updated to have a better shape and prevent this from happening, as well as unit tests with some other edge cases related to this specific issue.