Adding undo/redo functionality in mobile

Hello, I am looking for support in what am working on. I am working to fix an issue https://github.com/laurent22/joplin/issues/2595

Now, I submitted 3 PR for this

  1. First PR => I actually mad a hack to do implement the undo/redo functionality in mobile and I didn’t think for most of the cases in which it would have not worked. So, it was closed by Laurent

  2. Second PR => I took a look at the code of most of the undo-redo js library and based on it I created the file UndoRedoService in which I wrote the logic to do the undo-redo operation. As per me this was good and worked in most of the cases but the code quality was bad.

Then only I thought of creating the fresh PR

  1. Third PR => In this PR I improved the code quality, added comments in code everything was good according to me but it Travis build failed. Then I got to remember about the contributing guide new file inside lib should be unit tested.
    https://github.com/laurent22/joplin/pull/2849
    Now I have created a file UndoRedoService.ts which does the undo-redo operation for mobile.

I just want to know if am doing the right way or if this way I was not supposed to do and am just pushing myself for no reason. I know most people will definitely be angry about this but I really want to contribute to Joplin development

Please help

Hello, I saw your code, according to me that’s a great attempt and for why are you getting errors, first of all you don’t need to convert your code to typescript ( ts file ), if you do, then also it won’t harm, but js file will also work. And regarding travis buil, that’s a thing happening with most of the user’s and all PR’s are getting that error for now. You can look at this topic, any solutions will be posted here by the admins. Travis is broken? .If you need any more help, feel free to ask me and for now, I will say to just submit your PR and wait till travis problem get resolved by the admins. You can work on other issues till then.

Thanks for your quick reply and also for doing code review

1 Like

@amitsin6h I just tested travis is working fine, you just need to merge latest commits to your branch. Make sure after making a new branch you always run command

git fetch --all && git reset --hard upstream/master

This way you won't get any error.

1 Like

I am getting Travis error again for my UndoRedoService.ts file can anyone tell me how to fix this.

@tessus could you please review my PR for UndoRedoService.ts https://github.com/laurent22/joplin/pull/2849/commits/aa6fa8fe6ee4866e3651453073a0aec0930e7f76

I’m sorry, I don’t know what the problem is.

Finally Travis build succed after I updated my UndoRedoService.ts file
Thanks