oppia-android icon indicating copy to clipboard operation
oppia-android copied to clipboard

Drag & drop drag state resets after an incorrect answer

Open BenHenning opened this issue 4 years ago • 8 comments

Describe the bug When using the drag & drop interaction, an incorrect answer results in the same drag state being shown.

To Reproduce Steps to reproduce the behavior:

  1. Start the Prototype Exploration on a dev build of the app
  2. Play through it until the first drag & drop state
  3. Drag the items to produce an incorrect answer
  4. Submit the answer
  5. Observe that the drag & drop order resets back to the original state

Expected behavior The drag & drop order should stay the same after the incorrect answer.

Screenshot oppia_drag_drop_not_retaining_state

Device

  • Device: Pixel XL
  • SDK: 29

BenHenning avatar Jul 13 '20 20:07 BenHenning

As discussed, since this needs to apply to all interactions we're not blocking M2 on this work item.

BenHenning avatar Jul 21 '20 18:07 BenHenning

This probably also happens during configuration changes.

BenHenning avatar Aug 05 '20 16:08 BenHenning

@aggarwalpulkit596 still working on this?

anandwana001 avatar May 05 '21 06:05 anandwana001

This was something a bit out of scope with the current implementation of interactions and viewmodels. It won't be possible unless we move to hilt or something better.

aggarwalpulkit596 avatar May 10 '21 05:05 aggarwalpulkit596

I think we're solving this for the other interactions using a singleton that retrieves state from the assembler. See #2514 for specifics. @FareesHussain do you think that approach could work here?

BenHenning avatar May 10 '21 21:05 BenHenning

Deassigning you @aggarwalpulkit596 since it seems that you're not actively working on this.

BenHenning avatar May 10 '21 21:05 BenHenning

I think we're solving this for the other interactions using a singleton that retrieves state from the assembler. See #2514 for specifics. @FareesHussain do you think that approach could work here?

I'm not sure here, so far my implementation didn't give any desired result. I've completely forgotten my singleton pr. I will try once again using the setState similar to https://github.com/oppia/oppia-android/pull/2557

FareesHussain avatar May 10 '21 21:05 FareesHussain

@FareesHussain let me know if i can be of any help.

aggarwalpulkit596 avatar May 10 '21 22:05 aggarwalpulkit596