Skip to content

docs: cut filler from README and docs site - #786

Draft
thebuilder wants to merge 3 commits into
mainfrom
feat/documentation-cleanup-7907fc
Draft

docs: cut filler from README and docs site#786
thebuilder wants to merge 3 commits into
mainfrom
feat/documentation-cleanup-7907fc

Conversation

@thebuilder

@thebuilder thebuilder commented Aug 22, 2026

Copy link
Copy Markdown
Owner

Pass over every prose file in the repo to remove AI-writing tells and say what the library does rather than how it feels.

What changed

README.md got the most work:

  • Feature list: dropped the emoji and the puffery. "🪝 Hooks or Component API - With useInView and useOnInView it's easier than ever to monitor elements" is now "Hooks or component API - useInView for React state, useOnInView for callbacks, <InView> for render props and wrapper elements."
  • Options table: the root row was 45 words of MDN boilerplate. Now one sentence. Same treatment for skip, initialInView, fallbackInView, children, and the test-utils method table.
  • Cut "In order to", "utilize", "makes it easy", "allows you to", "This is still a very new addition", "Browser support is excellent", "just a simple but powerful tool".
  • Headings to sentence case, one em dash removed, the 🧪 markers replaced with the word "Experimental".

Docs site:

  • overview.mdx: "Built for production React" was four bullets of marketing ("Native and efficient", "Testable at the right layer"). Rewritten as "What you get" with actual mechanisms and numbers. Em dashes in the next-steps list gone.
  • ssr.mdx: had real redundancy. "initialInView controls the pre-observer render; it does not create an observer" appeared three separate times, plus an orphan paragraph restating fallbackInView vs defaultFallbackInView without backticks. One statement each now, 20 lines shorter.
  • configuration.mdx: unpacked the colon-and-semicolon pileup in "Choose where to observe", dropped a duplicated "root must be an ancestor" sentence.
  • core-apis.mdx: removed "React surface" (used twice).
  • intersection-observer-v2.mdx: dropped a duplicated closing line about the mock and occlusion.
  • Testing guides: three em dashes removed, dense sentences split.

CONTRIBUTING.md / SECURITY.md: "I'm thrilled that you're interested in contributing" is gone, headings to sentence case, "Please ensure that your changes are formatted" became "Format your changes".

Fixes found along the way

  • Broken indentation in the README render-props code sample.
  • Typos: explictly, intersecing, "in test files were you actively import", "Ref's from useRef needs to have".
  • British specialised in an otherwise US-spelled doc set (behavior, behaviour inconsistency).

Reviewer notes

  • One anchor changed. Renaming ## Stop, pause, or choose a callback API to ## Stop or pause observation changed its slug, so the referring link in core-apis.mdx is updated to match. I grepped for the other renamed headings (Hydration considerations, Choose a test boundary, Start simple) and nothing links to them.
  • Content, not just style. The README option descriptions were rewritten rather than trimmed, so they're worth reading for accuracy. Same for the overview.mdx "What you get" bullets, which now make specific claims (shared observer instances, ~1.15kB gzipped) that should match reality.
  • pnpm --filter docs build passes, 112 pages.

Rewrite the prose across the README, docs site, CONTRIBUTING, and SECURITY to
say what the library does instead of how it feels.

- README: drop the emoji and puffery from the feature list, replace the
  MDN-boilerplate option descriptions with one-sentence versions, and rewrite
  the testing and polyfill sections in plain language.
- overview.mdx: replace the "Built for production React" marketing bullets with
  concrete mechanisms and numbers.
- ssr.mdx: remove three copies of the same initialInView caveat and an orphan
  paragraph restating fallbackInView vs defaultFallbackInView.
- configuration.mdx, core-apis.mdx, testing guides: split dense sentences,
  remove em dashes, drop "React surface" and other jargon.
- CONTRIBUTING, SECURITY: sentence-case headings, trim the filler.

Also fixes issues found along the way: broken indentation in the render-props
sample, the typos "explictly", "intersecing" and "test files were you actively
import", and the British "specialised" in an otherwise US-spelled doc set.

Renaming the "Stop, pause, or choose a callback API" heading changed its anchor,
so the link in core-apis.mdx is updated to match. Docs site builds clean.
@bolt-new-by-stackblitz

Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@vercel

vercel Bot commented Aug 22, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
react-intersection-observer Ready Ready Preview Aug 22, 2026 3:40pm
react-intersection-observer-storybook Ready Ready Preview Aug 22, 2026 3:40pm

@pkg-pr-new

pkg-pr-new Bot commented Aug 22, 2026

Copy link
Copy Markdown
npm i https://pkg.pr.new/react-intersection-observer@786

commit: 8a725aa

The landing page was in better shape than the markdown, so this is a smaller
pass over the copy that was still doing marketing instead of explaining.

- The demo feed teasers were the worst of it: "Design systems that travel",
  "A quiet note on shipping", "A scroll worth observing". Nine labels of
  evocative filler that would read identically in any other project. They are
  scroll filler, so number them. That also makes scroll position legible in a
  demo whose whole point is scrolling.
- "Ideal for analytics, prefetching, or logging" becomes "Use it for".
- The closing headline "Add a kilobyte. Ship the viewport." had a second half
  that does not mean anything. Now "Add a kilobyte. Know what is on screen.",
  which echoes the hero.
- Page title dropped a duplicate "for React"; the product name already says it.
- Site description traded "lightweight" for what the library actually does.
- Em dashes out of the section-divider comments and CSS, per house style.

Left the hero, feature grid, and section headings alone. They already make
specific claims and have a voice.
The page gave impressions a full interactive section but never showed lazy
loading, which is one of the main reasons people reach for this library. It
appeared once, as a hyphenated word in the hero lead.

Adds a section between the API scrollspy and the impression strip:

- Six tiles that reserve their space, then mount their <img> only once the
  observer reports them within 200px of the viewport. No image element exists
  in the DOM before that, so the deferral is real rather than a CSS trick.
- A counter showing how many have been requested, plus the useInView call that
  drives it.
- A note pointing plain images at loading="lazy" instead, so the section does
  not oversell the observer for cases the platform already handles.

The artwork is inline SVG data URIs. A tile that has not been reached costs
nothing and the page pulls no extra files.

Also leads with the use cases now that they have somewhere to point:

- Hero lead opens with "Reveal on scroll, lazy-load images, track impressions,
  build infinite lists" before the technical framing.
- README intro names scroll animations, lazy loading, impressions, and
  infinite scroll.
- Site description swaps "lightweight" for those same use cases, which is also
  closer to what people search for.

The index badge overlays the frame, so it needs to read against the empty
placeholder and the loaded artwork both. It uses the theme foreground when
deferred and white once loaded; a single colour only worked for one of them.

Verified in the browser at 375, 768, and 1280, in both themes: deferred state
holds 0/6 with no img elements, loading flips all six, the code panel does not
overflow its column, and the page never scrolls horizontally.
@thebuilder thebuilder changed the title docs: cut AI-generated filler from README and docs site docs: cut filler from README and docs site Aug 22, 2026
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.

1 participant