-
Notifications
You must be signed in to change notification settings - Fork 39
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
Fix typography for submission diff #3673
Conversation
- The numbers don't break - make the heading consistent, everything gets a h4 - Update the color and style for added/deleted text closes #3671
I've able to get another version of compare view working with rich text display. See some of the screenshots below. If there is enough interest, after we merge this, I'll polish this up a bit and send a pull request. It uses html-diff==0.4.1 The styling is borrowed from the Github's markdown diff preview. |
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.
Looks/works great! Especially the Proposal Infomation (Old)/(New)
is a super useful addition.
Two small things after more testing not mentioned in the original issue:
In the following screenshots the The application w/ Rich Text & Markdown: ![]() The compare view: ![]() |
@wes-otf Good point on the links, we should add some code to handle them. The submission contains large amount of HTML due to the RichTextEditor and that many people paste in text straight from Microsoft Word etc. To diff the HTML directly is not workable. What Hypha instead does is to strip all the HTML and compare that instead. Then the code tries to reassemble the text to show it in some resemblance to the original. This works but is far from optimal. We just discussed today that it might be worth testing to convert the text to markdown instead and compare that. |
After the call, I spent some more time with it. See my experiment with diffing the html itself and displaying it to user here #3673 (comment) If the rich text support is needed, this might be the best way to go. |
I think that would make a lot of sense. Would definitely be interested in your HTML diff @theskumar. Maybe we could do a beta for something like that similarly to the submission view to gauge interest. |
- The numbers don't break - make the heading consistent, everything gets a h4 - Update the color and style for added/deleted text closes #3671
- The numbers don't break - make the heading consistent, everything gets a h4 - Update the color and style for added/deleted text closes #3671
closes #3671