-
Notifications
You must be signed in to change notification settings - Fork 32
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
Add diff-view for source translation in sbs-editor #1621
Conversation
Code Climate has analyzed commit d085d41 and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 77.7% (50% is the threshold). This pull request will bring the total coverage in the repository to 74.1% (0.0% change). View more on Code Climate. |
e717437
to
53b72cc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot! 👍
This nearly works as expected, I would just adapt the look of the source translation to the target translation to make it easier to compare both sides (so a fixed size even for very short or very long pages would be good and add a bit of margin so they are horizontally aligned). If possible, the disabled tinymce area would solve this because it already looks like the right side without any adaptions, but if this doesn't work well with the html diff, we could try to at least make it somehow similar.
d86ea61
to
1a4901c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing, really cool that the styling works in the tinymce area! 👍
Now I just have a small idea for the button's appearance.
1a4901c
to
7fbda1a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, thanks a lot for your changes! 👍
Almost looks perfect, but sorry, another thought just crossed my mind: When the diff is viewed in the source editor, and then the source content is copied into the target editor, the complete diff including the red/green formatting is copied, which is probably not what was intended. Do you think we could always copy the new source content, no matter whether the diff is currently shown or not?
3043e48
to
f49cbec
Compare
Oh, somehow missed that... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot! 🙏
I'm sorry about my iterative review loop, but I have just found another problem 😿
Could you inject the old_translation_content
template context in both the GET and POST view? At the moment, the diff only works correctly when requesting the form with GET, but after e.g. a submission without changes, the diff does not work correctly...
6c2510f
to
7327fc3
Compare
7327fc3
to
d085d41
Compare
I have update the pr and the issues with minor edits should be resolved now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! 👍 💯
Short description
This pr adds functionality to render the diff of the source translation since the last update of the target translation in the side-by-side page editor.
Proposed changes
Resolved issues
Fixes: #1449, Fixes: #1573