markor icon indicating copy to clipboard operation
markor copied to clipboard

Jump to correct heading via id, other tweaks, bugfixes

Open harshad1 opened this issue 1 year ago • 5 comments

In this PR:

  1. We have an improved jump to heading in view mode using line numbers as IDs @guanglinn please review
  2. We move the 'format link' checkbox in the share activity to the top bar (takes even less space and is easy to see and use)
  3. The todo txt filter now treats non-keyword strings as literal (case-insensitive) matches
  4. Rework and unify markdown link highlighting and parsing
  5. Fixed #2312
  6. Fixed #2313 - Hiding new folder icon in these dialogs
  7. If the typed in file name in the newfile dialog already exists, the dialog text colour will be red
  8. Fix how file formats are detected
  9. Save and restore file manager scroll state so that positions are maintained as one navigates
  10. Dialogs now have rounded corners

harshad1 avatar May 25 '24 22:05 harshad1

@guanglinn this PR improves how we jump to headings. We attach the heading line number as the html node id and then jump directly to it.

I think we can even use this method to sync edit and view positions in the future .

It's wip because I want to reorganize the code a little.

harshad1 avatar May 26 '24 01:05 harshad1

~~Marked WIP as I found a bug when you open a file from the share into dialog~~

All known issues fixed now

harshad1 avatar Jun 02 '24 21:06 harshad1

Hi, @harshad1 , there are some codes that I am not familiar with, and your code is good, so it may not be easy to find some problems for me.

guanglinn avatar Jun 03 '24 13:06 guanglinn

@harshad1

I think we can even use this method to sync edit and view positions in the future .

Yes, we can consider making a feature with simple position synchronization first.

guanglinn avatar Jun 03 '24 13:06 guanglinn

@gsantner I added logic to use android's built in ripple rather than blinkView. Please test whether this makes the highlighting clearer.

harshad1 avatar Jun 05 '24 06:06 harshad1

When I try to add a file by clicked the floating button, the app will crash and show the following exception:

2024-07-05 21:29:47.918 31695-31695 AndroidRuntime net.gsantner.markor_test E FATAL EXCEPTION: main
Process: net.gsantner.markor_test, PID: 31695
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
    at java.util.ArrayList.get(ArrayList.java:437)
    at net.gsantner.markor.frontend.NewFileDialog.makeDialog(NewFileDialog.java:345)
    at net.gsantner.markor.frontend.NewFileDialog.onCreateDialog(NewFileDialog.java:100)
    at androidx.fragment.app.DialogFragment.prepareDialog(DialogFragment.java:644)
    at androidx.fragment.app.DialogFragment.onGetLayoutInflater(DialogFragment.java:558)
    at androidx.fragment.app.Fragment.performGetLayoutInflater(Fragment.java:1654)
    at androidx.fragment.app.FragmentStateManager.createView(FragmentStateManager.java:493)
    at androidx.fragment.app.FragmentStateManager.moveToExpectedState(FragmentStateManager.java:282)
    at androidx.fragment.app.FragmentManager.executeOpsTogether(FragmentManager.java:2189)
    at androidx.fragment.app.FragmentManager.removeRedundantOperationsAndExecute(FragmentManager.java:2100)
    at androidx.fragment.app.FragmentManager.execPendingActions(FragmentManager.java:2002)
    at androidx.fragment.app.FragmentManager$5.run(FragmentManager.java:524)
    at android.os.Handler.handleCallback(Handler.java:966)
    at android.os.Handler.dispatchMessage(Handler.java:110)
    at android.os.Looper.loopOnce(Looper.java:205)
    at android.os.Looper.loop(Looper.java:293)
    at android.app.ActivityThread.loopProcess(ActivityThread.java:9934)
    at android.app.ActivityThread.main(ActivityThread.java:9923)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:586)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1240)
2024-07-05 21:29:47.943 31695-31695 Process net.gsantner.markor_test I Sending signal. PID: 31695 SIG: 9

markor-crashed-when-add-file-by-floating-button.png

https://github.com/gsantner/markor/assets/60415467/1347a7e2-d195-4c11-86b5-f79305ff872a/

guanglinn avatar Jul 05 '24 14:07 guanglinn

Tried the blinking as read the question - yes much better then the last few tries. That looks OK to me.

gsantner avatar Jul 16 '24 17:07 gsantner

Of the rounded dialogs, personally humbly said I like it better non rounded. But I'm not strong opposed.

gsantner avatar Jul 16 '24 18:07 gsantner

Thank you other then those two I didn't find anything else. Thanks much for your contribution!

gsantner avatar Jul 16 '24 18:07 gsantner

Tried the blinking as read the question - yes much better then the last few tries. That looks OK to me.

That's good. I can work on adding things to make it even more clear if needed.

Is there a specific reason to move this one down again? I placed it abvoe plaintext so i.e. .m3u gets taken to that converter for music/video playlist support, all in view mode.

No. This was an error which I missed. Thanks for catching this and fixing it.

harshad1 avatar Jul 17 '24 02:07 harshad1

Tried the blinking as read the question - yes much better then the last few tries. That looks OK to me.

That's good. I can work on adding things to make it even more clear if needed.

Is there a specific reason to move this one down again? I placed it abvoe plaintext so i.e. .m3u gets taken to that converter for music/video playlist support, all in view mode.

No. This was an error which I missed. Thanks for catching this and fixing it.

harshad1 avatar Jul 17 '24 03:07 harshad1

Of the rounded dialogs, personally humbly said I like it better non rounded. But I'm not strong opposed.

Google's design guides all want rounded now. If you feel that it isn't nice after some more testing we can reduce the radius to a smaller number. Feedback on this is always appreciated.

harshad1 avatar Jul 17 '24 03:07 harshad1