GSoC 2018: Score Comparison Tool — Week 10
Hello!
During this week the score comparison tool got a small redesign and an ability to show score chunks that are relevant to the displayed changes. The current look of the tool is shown below (or here in better resolution).
User can choose for comparison any scores that are opened in tabs at the moment. The choice can be done either using drop-down lists inside the tool area itself or just by opening the needed scores in two tabs — the selected item in the lists are synchronized with currently opened tabs.
To view some change inside a score one should click on the corresponding item in the displayed list of changes. After that the shown score (or scores if two of them are shown) will move to the relevant location and the relevant elements are selected. At this moment it looks like shown in the screenshot above but this may be changed in the future.
Score comparison engine got some improvements too during this week. First, mapping of diff items to the elements inside the score is now made during score saving operation instead of loading like it was done before. While this is an internal implementation detail, this made it finally possible to implement the feature with jumping to the change position and, as a side effect, made the comparison process somewhat faster.
Second, changes list items are now sorted according to their position in the score instead of their position in MSCX/MSCZ file. Such an order seems to be more natural in this context.
Finally, the routine was added to merge some equal items of the changes list. This was done mainly for not showing "Measure removed/inserted" items multiple times but should potentially prevent some other duplicating items too.
The changes made to the comparison engine concern mostly some implementation details but, as also changes in the tool user interface, are directed towards showing more useful information and improving a usability of the tool. This direction will be continued during the next week.
Thank you for attention!
Dmitri Ovodok
Current branch: link.
Comments
Great job, this looks amazing!
Versions
If possible, it would be good to add dropdowns to choose the score version as well as the score itself:
Score 1: [choose score] [choose version]
Score 2: [choose score] [choose version]
As discussed on IRC, you can offer 3 (or 4) versions of each score already:
(You could also offer the last autosaved version, but I wouldn't bother with this. It could create problems since a new autosave version is created every minute or so.)
I recommend that the default view when opening the diff tool is to compare the unsaved version of the current score with the session start for the current score, as this would show the work done during the session.
If the user picks a different score for comparison with the first then the default should always be to compare the unsaved version (so if I pick a new Score 2 then Score 2's version dropdown should reset to "unsaved").
Editing
Ideally, only the unsaved version should be editable, and there should be options to revert back to the last saved version or the session start version (i.e. drop the later versions). However, I'm happy for all versions to be editable for now (or not editable if that's easier).
Command line mode
I'd like to see a command line options to generate raw and intelligent diffs equivalent to the ones displayed by the diff tool (minus fancy formatting and colours). These would just be plain text files that use a consistent format so that (for example) MuseScore.com could show a simple list of changes when a user uploads a new version of a score.
This is shaping up very nicely! I'm excited to see the final product.