markor
markor copied to clipboard
Jump to correct heading via id, other tweaks, bugfixes
In this PR:
- We have an improved jump to heading in view mode using line numbers as IDs @guanglinn please review
- 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)
- The todo txt filter now treats non-keyword strings as literal (case-insensitive) matches
- Rework and unify markdown link highlighting and parsing
- Fixed #2312
- Fixed #2313 - Hiding new folder icon in these dialogs
- If the typed in file name in the newfile dialog already exists, the dialog text colour will be red
- Fix how file formats are detected
- Save and restore file manager scroll state so that positions are maintained as one navigates
- Dialogs now have rounded corners
@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.
~~Marked WIP as I found a bug when you open a file from the share into dialog~~
All known issues fixed now
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.
@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.
@gsantner I added logic to use android's built in ripple rather than blinkView. Please test whether this makes the highlighting clearer.
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
https://github.com/gsantner/markor/assets/60415467/1347a7e2-d195-4c11-86b5-f79305ff872a/
Tried the blinking as read the question - yes much better then the last few tries. That looks OK to me.
Of the rounded dialogs, personally humbly said I like it better non rounded. But I'm not strong opposed.
Thank you other then those two I didn't find anything else. Thanks much for your contribution!
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.
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.
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.