GCompris: Progress Blog
In the last edition, I was talking about adding an appropriate dataset to the Comparator Activity. This blog majorly consists of its implementation and the new changes that we now have in the comparator.
Restructuring the whole activity
It was initially planned to add the dataset to the comparator in the following manner:
4-5 years: Numbers from 1-9 5-6 years: Numbers from 1-19 6-7 years: Numbers from 1 - 100 7-8 years: Numbers from 1 - 1 000 8-9 years: Numbers from 1 - 1 000 000 9-10 years: Numbers from 1-1 000 000 000
While adding the dataset made for children aged 9–10 years, we realised that the right and left texts started to overlap for small screen sizes. This led me to restructure the whole activity so the new skeleton did not contain row elements but left and right texts were anchored to the centre to remain intact even for small screen sizes. This seemed to be the best possible solution for this predicament.
The final solution to text overlapping
The above-mentioned restructuring did solve 90% of the issue, but the last level numbers had over 9 digits and they were still overlapping. Another approach to fitting text into a rectangle element was thought of, but it did not seem to deliver the best results.
Finally, this issue was sorted after setting the custom font size to tiny, which would automatically adjust according to the screen size.
Other issues investigated included making the layout responsive for different screen sizes, handling errors in the log, fixing the logic to avoid multiple wins, adding consistency in variable declarations and their datatypes, adding canvas to the entire exercise view zone, and some issues that arose as a result of the activity’s restructuring, such as selection on tapping the rows and default selection of the first row when the activity opens.
Apart from this, dividing the repeated code snippets into a separate component file and keyboard binding for the activity have also been implemented this time.
As suggested by mentors, in order to make the activity more organised, we have proposed a new mock-up for the comparator activity, which can be found here.
After the GSoC mid-evaluation, I have updated the project timeline.
We are planning to implement a feature to highlight the wrong answers and revamp the comparator as proposed. So, stay tuned for it!