Skip to content

Fix header section offset when a note has properties#11

Open
luwaiwong wants to merge 10 commits into
uthvah:mainfrom
luwaiwong:main
Open

Fix header section offset when a note has properties#11
luwaiwong wants to merge 10 commits into
uthvah:mainfrom
luwaiwong:main

Conversation

@luwaiwong
Copy link
Copy Markdown

Changes

  • Added gitignore and esbuild config so anyone new downloading the project should find it easier to get running
  • Add settings toggle for showing the properties toggle button
  • Add settings toggle for showing headers, when embedding a note under a header
  • Embed now takes properties into account when shifting focus when embedding under header

I also made some changes on the styling and padding, padding is a little too thick for my taste. Might be good to add a toggle in the settings for that

@parkeraddison
Copy link
Copy Markdown
Contributor

Thank you for adding the esbuild and package.json -- this was super useful for developing my PR too.!

Maybe consider separating esbuild+package.json into it's own PR, in order to separate the concerns and keep each PR atomic?

@uthvah
Copy link
Copy Markdown
Owner

uthvah commented Feb 20, 2026

Thank you for the PR! The build tool additions (esbuild/package.json) are a huge improvement and I definitely want to merge those.

However, I'd like to hold off on the logic changes for now:

Regarding the properties/offset fix:
The plugin currently adds a manual toggle button for properties. I’ve noticed that native Obsidian already allows clicking the 'Properties' heading to toggle visibility, so maintaining a custom manual toggle button feels redundant. Additionally, the styling changes in PR #24 (callout-style rendering) will make the properties UI much more intuitive natively.
As a result, I plan to deprecate the manual toggle entirely, so I won't be merging the proposed offset logic that supports it.

Regarding "Load all embeds instantly":
This is a great idea for fixing Ctrl+F and PDF exports! However, I'm concerned that loading them all simultaneously via requestAnimationFrame will freeze the UI on heavy dashboards. I believe a staggered loading system would be safer.

It would conceptually look something like this:

const processQueue = async (embeds) => {
    for (const embed of embeds) {
        await this.loadEmbed(embed);
        await new Promise(r => setTimeout(r, 50)); // Tiny breather for the main thread
    }
};

Next Steps:
To keep things clean, would you be open to updating this PR to ONLY include the build tools (package.json, esbuild.config.mjs, .gitignore)?

I’d love to merge the build system modernization immediately. We can then tackle the staggered loading feature in a separate PR. Let me know!

@luwaiwong
Copy link
Copy Markdown
Author

Hey, sorry for the late reply, I noticed you already made some changes for the esbuild and package.json, do you still need these changes in these PR? I can remove some of my changes that are conflicting with the new esbuild and package.json,

Regarding the properties/offset fix, I noticed the same thing too recently, I can remove those changes from this PR.

Regarding the Load all embeds instantly, using staggered loading definitely makes sense to me, I can add that as a change. I added that as a feature for my own use case, because when I was running the plugin on mobile, I would run into issues with laggy behavior when I would scroll through a note quickly. Using staggered loading should still fix those issues and help with performance at the same time.

@uthvah
Copy link
Copy Markdown
Owner

uthvah commented Feb 26, 2026

No worries at all, and thanks for checking in.

Yeah, that sounds good to me. Let’s just move forward with the staggered loading for this PR. I agree it feels like the right balance. It should help with the mobile lag, I noticed this too, and it looks like you’ve already got it working nicely.

Appreciate you taking the time to adjust things.

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.

3 participants