Improve Diff visualization for amendments
Is your feature request related to a problem? Please describe.
The current visualization of amendments uses a page that shows class diff tool that only works well for text (code like) comparisons. Comparisons between HTML texts are pretty much useless and very confusing. Also the tools for this job is very buggy (it is a customization in the Decidim code that does not work very well).
Describe the solution you'd like
As proposals are now using HTML, and there are not really good tools to compare differences in HTML (I challenge anyone to find them) I propose to modify this feature by giving the user 3 types of views to compare:
- Text diff view: This strips all the HTML from the original proposal and the amendment and places automatic line endings (\n char) after 80/100 chars (similar and, in fact using, as mailers do when creating a text version of a message). This creates a good input for the diff tools and provides useful marks on the relevant differences in the text, without other decorations.
- Source diff view: For the advanced user, this compares the source code (usually HTML but also without creating artificial new lines), similar as what currently exists. Still improved a little bit because now the differences are marked in stronger colors.
- Preview: This view shows the amendment as if it was a proposal, so the user can see how it looks. Currently there's no way to see an amendment as if it was accepted.
The 3 views will be clearly available as tabs, with big buttons. unified and side-by-side views will be applicable as well as a submenu.
For an example of the implementation take a look at:
Describe alternatives you've considered
I've tried first to improve the HTML diff tools that is customized in Decidim. but it is really complicated to do it properly as HTMl can be very unpredictable. It is a much bigger work and i've been unable to find any opensource library capable of doing it.
Does this issue could impact on users private data?
Ex. issues related with user's sign up/sign in process, verifications, invitations, sensitive data like email, IP addresses, etc.
Platoniq & The Green Party of Canda
This proposal is being evaluated
List of Endorsements
Report inappropriate content
Is this content inappropriate?