number Sequence, move config to activity config
ClosedPublic

Authored by shubhammishra on Mar 31 2020, 6:53 AM.

Details

Reviewers
jjazeix
Group Reviewers
GCompris: Improvements
Summary
  • moved to activity config
  • fixed issue of skipping levels after clicking save button multiple times

Diff Detail

Repository
R2 GCompris
Branch
multiple_dataset
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 24516
Build 24534: arc lint + arc unit
shubhammishra created this revision.Mar 31 2020, 6:53 AM
Restricted Application added a project: KDE Edu. · View Herald TranscriptMar 31 2020, 6:53 AM
Restricted Application added a subscriber: kde-edu. · View Herald Transcript
shubhammishra requested review of this revision.Mar 31 2020, 6:53 AM
shubhammishra added a comment.EditedMar 31 2020, 7:27 AM

There is one more bug in the acitivity, changing setting resets the coordinates but does not erase line segments. can you please check and confirm it?

There is one more bug in the acitivity, changing setting resets the coordinates but does not erase line segments. can you please check and confirm it?

yes, you are right

shubhammishra retitled this revision from numbers move config to activity config to number Sequence, move config to activity config.Mar 31 2020, 7:51 AM
jjazeix added inline comments.Mar 31 2020, 8:13 AM
src/activities/number_sequence/number_sequence.js
152

instead of changing it twice in initLevel and in won, would it be better to always connect the signal in Bonus to an internal slot and in this slot, check if mode == 1. If yes, we call Activity.nextLevel?
This way, we don't play with connect/disconnect and the change is only on one place

  • requested changes done and added eraseSegments function

requested changes done and added eraseSegments function

requested changes done and added eraseSegments function

  • removed extra space
jjazeix added inline comments.Mar 31 2020, 9:38 AM
src/activities/number_sequence/NumberSequence.qml
278

a if() is way clearer, why using a ternary here?

  • replaced ternary operator with if()
jjazeix accepted this revision.Mar 31 2020, 5:34 PM
This comment was removed by jjazeix.
This revision is now accepted and ready to land.Mar 31 2020, 5:34 PM
jjazeix requested changes to this revision.Apr 1 2020, 7:08 PM

I just tested it again more closely.
This activity is inherited by:
clickanddraw/Clickanddraw.qml:27:NumberSequence {
drawletters/Drawletters.qml:26:NumberSequence {

We also need to add the configuration on both activities.

This revision now requires changes to proceed.Apr 1 2020, 7:08 PM
  • clickanddraw and drawletters, move config to activity config(multiple dataset style)
  • drawnumbers, move config to activity config (multiple_dataset style)
  • fixed typo
jjazeix added inline comments.Apr 4 2020, 8:41 AM
src/activities/number_sequence/number_sequence.js
85 ↗(On Diff #78966)

In which case are we not in one of these cases?

  • removed unnecessary if()
shubhammishra added inline comments.Apr 4 2020, 9:07 AM
src/activities/number_sequence/number_sequence.js
85 ↗(On Diff #78966)

for none :(

  • fixed errors

On a second look, I noticed there is no need to call initLevel() function from Activity config, so removed it.

On a second look, I noticed there is no need to call initLevel() function from Activity config, so removed it.

If you don't do it, it does not reinitialize the level when changing the configuration. Maybe, doing the same as gletters, with onStart: background.stop(), background.start() will be enough?

  • restarting background on startActivity
This revision is now accepted and ready to land.Apr 4 2020, 4:47 PM
jjazeix closed this revision.Apr 4 2020, 4:47 PM