Nextcloud-notes: Formatting does not continue

Created on 12 Jan 2021  ยท  13Comments  ยท  Source: stefan-niedermann/nextcloud-notes


Please use GitHub reactions ๐Ÿ‘ to show that you are affected by the same issue. Please don't comment if you have no relevant information to add!

Describe the bug
When editing a note with formatting; for example, a To Do list with check boxes, the formatting does not automatically continue.

To Reproduce
Steps to reproduce the behavior:

  1. Create a note on Nextcloud Notes.
  2. Add a To Do list to the note.
  3. Open the note in the app on your phone.
  4. Press enter past the last item on the list.
  5. Formatting does not continue.

Expected behavior
Formatting should continue.

Smartphone (please complete the following information):

  • Nextcloud Notes-Version (android app): 3.1.0
  • F-Droid or Play Store: Play Store
  • Android-Version: Android 11, Jan. 5 2021 Security Update
  • Device: Pixel 3 XL

Server

  • Nextcloud version: 20.0.4 (Docker Image)
  • Nextcloud Notes version (server app): 4.0.2

Stacktrace

Bug

All 13 comments

This is how it is supposed to be:

- โ†’ space โ†’ i โ†’ i โ†’ i โ†’ enter โ†’ in the next line a - and a space should automatically appear (in case of a checkbox also new [ ]).

Can you confirm that you tried it this way and that this is also what you expect to happen?

If you expected something different, please tell more detailed what you expect. In case this is what you expect but it does not happen, please make a video, so i have a more detailed insight about what is happening on your device.

ezgif-3-18c01c6988ff

That is what I expected to happen. However that is not happening. When I press enter I get a new blank line. No automatic characters at all.

https://user-images.githubusercontent.com/57846170/104381899-36550c80-54fb-11eb-9c45-9870dc6ee6d6.mp4

As you might have already guessed while watching my video: I am not able to reproduce the issue. ๐Ÿ˜“

I therefore created a :beetle: Debug-Version so we can get more insight about what's happening on your device. You can download it from here and safely install it parallel to your current version.

Please create in this debug app a new Note with a minimal sample - just one list item and then press enter. You can then click no the title / "New note" in the top and should see a message Copied to clipboard - please post the copied message here then.

Okay. I did a single - and pressed enter on the note.

````
Markdown Editor logs:

Jan 14, 2021, 10:57:21 PM โ†’ MarkwonMarkdownEditor [constructor] attempt to add CombinedTextWatcher
Jan 14, 2021, 10:57:21 PM โ†’ CombinedTextWatcher [constructor]
Jan 14, 2021, 10:57:21 PM โ†’ Initialize AutoContinuationTextWatcher
Jan 14, 2021, 10:57:21 PM โ†’ MarkwonMarkdownEditor [constructor] added CombinedTextWatcher
Jan 14, 2021, 10:57:21 PM โ†’ AutoContinuationTextWatcher [onTextChanged] with |0|0|0
Jan 14, 2021, 10:57:21 PM โ†’ AutoContinuationTextWatcher [onTextChanged] passing to originalWatcher
Jan 14, 2021, 10:57:21 PM โ†’ AutoContinuationTextWatcher [afterTextChanged]
Jan 14, 2021, 10:57:21 PM โ†’ AutoContinuationTextWatcher [afterTextChanged]
Jan 14, 2021, 10:57:25 PM โ†’ AutoContinuationTextWatcher [onTextChanged] with -|0|0|1
Jan 14, 2021, 10:57:25 PM โ†’ AutoContinuationTextWatcher [onTextChanged] passing to originalWatcher
Jan 14, 2021, 10:57:25 PM โ†’ AutoContinuationTextWatcher [afterTextChanged]
Jan 14, 2021, 10:57:26 PM โ†’ AutoContinuationTextWatcher [onTextChanged] with - |1|0|1
Jan 14, 2021, 10:57:26 PM โ†’ AutoContinuationTextWatcher [onTextChanged] passing to originalWatcher
Jan 14, 2021, 10:57:26 PM โ†’ AutoContinuationTextWatcher [afterTextChanged]
Jan 14, 2021, 10:57:29 PM โ†’ AutoContinuationTextWatcher [onTextChanged] with -
|2|0|1
Jan 14, 2021, 10:57:29 PM โ†’ AutoContinuationTextWatcher [onTextChanged] count == 1 && s.charAt(start == \n
Jan 14, 2021, 10:57:29 PM โ†’ AutoContinuationTextWatcher [handleNewlineInserted] with 2|1
Jan 14, 2021, 10:57:29 PM โ†’ AutoContinuationTextWatcher [handleNewlineInserted] emptyListString = -
Jan 14, 2021, 10:57:29 PM โ†’ AutoContinuationTextWatcher [onTextChanged] passing to originalWatcher
Jan 14, 2021, 10:57:29 PM โ†’ AutoContinuationTextWatcher [afterTextChanged]
Jan 14, 2021, 10:57:29 PM โ†’ AutoContinuationTextWatcher [afterTextChanged] - NOT isInsert
Jan 14, 2021, 10:57:29 PM โ†’ AutoContinuationTextWatcher [deleteCustomText] with customText = -
Jan 14, 2021, 10:57:29 PM โ†’ AutoContinuationTextWatcher [onTextChanged] with
|0|3|1
Jan 14, 2021, 10:57:29 PM โ†’ AutoContinuationTextWatcher [onTextChanged] count == 1 && s.charAt(start == \n
Jan 14, 2021, 10:57:29 PM โ†’ AutoContinuationTextWatcher [handleNewlineInserted] with 0|1
Jan 14, 2021, 10:57:29 PM โ†’ AutoContinuationTextWatcher [handleNewlineInserted] emptyListString = null
Jan 14, 2021, 10:57:29 PM โ†’ AutoContinuationTextWatcher [onTextChanged] passing to originalWatcher
Jan 14, 2021, 10:57:29 PM โ†’ AutoContinuationTextWatcher [afterTextChanged]
````

cc @desperateCoder the log entries are on the branch 1040-debug-autocontinuation of the Notes app.

Hi @Mossy93,

can you confirm, that if you add a blank at the end of the line and then press enter, the continuation works fine?

edit: please try "- asdf " then enter, the space at the end and something after the "- " are important here.

Yes, works as expected with a space at the end of the line. However if the space is not there, it creates a blank line

Thanks @Mossy93, that helps a lot. I was able to reproduce it, let's see how we can fix that.

@Mossy93 How about this one: https://github.com/stefan-niedermann/nextcloud-notes/suites/1871929685/artifacts/36473096

Not only I think I fixed the auto-continuation, but also clipboard-paste-handling (lets say you paste "my bulletpoint-text [NEWLINE]"). Should hopefully work fine on your device now.

Some feedback on this would be appreciated! โค๏ธ

That seems to be working for me as expected. Thank you.

Always glad to help! Thanks for reporting!

@stefan-niedermann just get rid of the logging stuff and you're fine! Happy releasing! ๐Ÿ˜˜

Thanks buddy! :) Will try to make a release at the weekend (@Mossy93 it will take some time though until the new release will arrive you because Google delays update due to corona and we are making staged rollouts - just be a little more patient please ๐Ÿ™‚ )

Fix will be in v3.1.1

Was this page helpful?
0 / 5 - 0 ratings

Related issues

frederiiiic picture frederiiiic  ยท  8Comments

danicotillas picture danicotillas  ยท  7Comments

stefan-niedermann picture stefan-niedermann  ยท  5Comments

kamni picture kamni  ยท  6Comments

mfechner picture mfechner  ยท  8Comments