Skip to content

Add additional settings to show/hide elements when viewing .note files - #25

Closed
james-xli wants to merge 7 commits into
philips:mainfrom
james-xli:feature/note-view-settings
Closed

Add additional settings to show/hide elements when viewing .note files#25
james-xli wants to merge 7 commits into
philips:mainfrom
james-xli:feature/note-view-settings

Conversation

@james-xli

Copy link
Copy Markdown
Contributor

This PR proposes adding a few simple on/off settings for viewing .note files. 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:

image

My test note looks like this:

image

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:

image

image

Hiding export buttons

Switching "Show export buttons" OFF hides the buttons:

image

image

Collapsing recognized text

Finally, switching "Collapse recognized text" ON tucks the recognized text under an HTML details element:

image

image

Clicking on that element expands it to show the text:

image


Thanks for considering these unsolicited changes!

james-xli added 7 commits May 12, 2024 18:00
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.
@philips

philips commented May 22, 2024

Copy link
Copy Markdown
Owner

squashed, fixed, and merged to main

@philips

philips commented May 22, 2024

Copy link
Copy Markdown
Owner

Thank you for the contributions.

@philips philips closed this May 22, 2024
@james-xli
james-xli deleted the feature/note-view-settings branch June 9, 2024 00:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants