NickyMeuleman / nicky-blog

https://nickymeuleman.netlify.app/
14 stars 6 forks source link

Hi, thanks for your blog post! #159

Closed tenkirin closed 5 days ago

tenkirin commented 2 years ago

This post really helped me and I want to say thanks to you. Didn't found any other places to leave a message or send you an email so I have to open an issue for this purpose, hope you don't mind it(if so, I am sorry for this and maybe you could delete this issue).

I leart a lot from the article, and am going to read more on your blog.

And there are a few points I'd like to mention:

  1. About updating reading position using the Intersection Observer API, it's still sort of imperfect.

    Consider this situation: first, user scrolled the page up and a certain title(called 'A') passed/intersected the line set by rootMargin thus got active, then user scrolls the page down to read previous contents ahead of this title A. At this time, if the title A moves below the line again, it means that current content that user is reading belongs to the previous title(called B), i.e. the previous title B ought to be active. But actually it won't as the previous title B didn't intersect the line at all.

    For instance, just in this post, there is a long gap between Example and Using the data. In the reading order, Example got active then Using the data. If you scroll the page down to review the contents of Example and stop at 'The resulting tableOfContents object would look like:', at this point, the contents you are focusing on is about Exmaple but the active one is Using the data as Example have no chance to interset the line yet.

    image

  2. Maybe you could consider integrating a GitHub based comments system into your blog so that readers like me are able to communicate with you more conveniently. I recommend this one as it utilizes the GitHub Discussions feature thus won't pollute the issue.

NickyMeuleman commented 5 days ago

Hey, glad you found it useful! Good point, I noticed that too, but other than playing around with the trigger margins, I have no good solution.

Good point about the contacting too. I'm going to start a complete rewrite of this site (which I wny I only saw this message now, I never looked here, sorry!) and I'll make sure my e-mail/social media links are features more prominently!