Add additional settings to show/hide elements when viewing .note files - #25
Closed
james-xli wants to merge 7 commits into
Closed
Add additional settings to show/hide elements when viewing .note files#25james-xli wants to merge 7 commits into
james-xli wants to merge 7 commits into
Conversation
Default behavior is on (same appearance as before this commit); allows toggling the TOC and page headings off for users who want a cleaner, more condensed view
My intended use for this plugin is mainly just to view .note files, not export them, so I would prefer not to have these buttons take up space in every file. I think a better implementation might be to have these functions available on hover or right-click, but this works for now to get that screen real estate back. Default behavior is to show the buttons, same as before this commit.
This applies to viewing .note files only, and not to generated markdown. When viewing notes, the recognized text is sometimes useful, but oftentimes it has many errors, so I'd prefer to hide it and focus on the image of the note instead. Putting it underneath an HTML `details` element tucks it away while keeping it available if needed.
Shorten "Recognized Text" to just "Text"
When the TOC toggle was off, there wasn't any margin between the "Save image to vault" button of one page and the recognized text for the next page. This fixes that. Also added mention of the page number headings in the TOC toggle description.
Owner
|
squashed, fixed, and merged to main |
Owner
|
Thank you for the contributions. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR proposes adding a few simple on/off settings for viewing
.notefiles. I find these nice to have for a cleaner viewing experience, especially if I just want to look through many pages and am not planning to do much exporting.All three of these settings look and work fine when used independently of each other in different combinations.
I haven't actually tested in combination with #24, but I expect these changes to work fine together.
Defaults/current behavior
The default settings shown below preserve the current behavior of the plugin:
My test note looks like this:
Hiding the table of contents and page number headings
Switching "Show table of contents" OFF removes the table of contents and the page number headings:
Hiding export buttons
Switching "Show export buttons" OFF hides the buttons:
Collapsing recognized text
Finally, switching "Collapse recognized text" ON tucks the recognized text under an HTML
detailselement:Clicking on that element expands it to show the text:
Thanks for considering these unsolicited changes!