Skip to content

DOCS: Trim non-essential detail from the developer docs - #4

Open
dhrupo wants to merge 1 commit into
mainfrom
docs/trim-non-essential-detail
Open

dhrupo wants to merge 1 commit into
mainfrom
docs/trim-non-essential-detail

Conversation

@dhrupo

@dhrupo dhrupo commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

What does this PR do and why?

The developer docs had accumulated a lot of content about how the docs were built rather than how to extend the plugin — extractor and grep-discovery sections, self-referential verification claims ("verified against 1.3.0", "source-verified"), and roughly 550 secondary file:line citations threaded through prose and callouts. The reference sites we're aligning with, dev.fluentcart.com and dev.fluentcommunity.co, are concise and task-focused.

This trims to that shape. No design, structure, or navigation change — same pages, same sidebar, same theme.

Published prose: 55,472 → 47,612 words (−14%), plus devdocs.md (7,245 words) deleted.

Paired free/pro PR: N/A — documentation repo only, no plugin code touched.

Key changes

  • devdocs.md — deleted. An internal docs-audit artifact (927 lines) that was already excluded from the built site; its srcExclude entry is removed from .vitepress/config.mjs.
  • changelog.md — rewritten. It recorded corrections to the documentation itself ("the hook extractor under-reported the action surface by two"); it is now a plugin developer-surface changelog keyed by plugin version (1.3.0, 1.0.9, 1.0.7).
  • js-api/index.md — removed the "Everything else on window" section, a 12-row inventory of things the page itself said were not API, including Vite React-refresh stubs ($RefreshReg$, __vite_plugin_react_preamble_installed__) that only exist in dev builds, and window._, an Underscore shim belonging to wp.media. −27% on that page.
  • reference/data-model.md — removed instructions to recover a dropped table's schema via git show <sha>^:... against a private repo history, plus the migrator's internal call order.
  • reference/blocks.md — removed the page-builder editor shim internals (internal block registration mechanics, not an extension point), keeping only the consequence: getBlockType() returns the shim's schema inside a builder canvas.
  • hooks/reference.md, rest-api/index.md, getting-started/architecture.md — removed the "Regenerating" sections, npm run extract instructions, and the "grep returns 12 actions and 72 filters — by design" explanation.
  • Across all pages — secondary citations reduced so each hook and route keeps one Source: anchor; callout density lowered where a warning only restated adjacent prose.

Deliberately kept: the traps that change what a reader writes — inverted filter defaults (media_discoverable, media_page_noindex, behavior_can_report), the nested $payload['verdict']['complete'] flag, posterSrc vs poster, the global zero-id pass on media_locked_message, "don't discard $html — the unlock form is inside it", and the PHP 7.4 floor.

How to test

Documentation-only change. No plugin code path is affected.

  1. npm install && npm run build — passes. VitePress fails the build on dead internal links, so this confirms every cross-reference and heading anchor still resolves after the cuts.
  2. npm run dev and spot-check the trimmed pages: /js-api/, /reference/data-model, /reference/blocks, /hooks/reference, /changelog.
  3. Sidebar, nav, theme, and the home hero are unchanged — .vitepress/config.mjs differs only by the removed devdocs.md srcExclude entry.

Merge checklist

  • N/A — PHPCS: no PHP changed
  • N/A — PHPStan: no PHP changed
  • N/A — tests: documentation repo has no test suite; npm run build is the gate and it passes
  • No debug code — no shipped code paths in this repo
  • No secrets committed — diff is Markdown plus one srcExclude line
  • Backward compatibility preserved — no page was renamed, moved, or deleted from the built site; devdocs.md was already excluded from it, so no published URL changes
  • N/A — i18n: no customer-facing strings
  • Changelog entry — changelog.md rewritten as part of this change
  • Dev docs updated — this PR is the dev docs
  • Reproduction steps filled in "How to test"; no UI change, so no screenshots

Changes & review routing

  • N/A — PHP
  • N/A — JS/Vue
  • N/A — Tests
  • Build/config — one line removed from .vitepress/config.mjs srcExclude
  • Docs
  • N/A — Security-touching
  • N/A — Database schema change
  • N/A — Public API add/signature change — documentation of the API changed, the API did not
  • N/A — Architecture decision
  • N/A — Cross-product / cross-repo dependency
  • None of the ⚠ categories — peer review is sufficient
  • N/A — React/Gutenberg block
  • N/A — Player runtime

Anything the reviewer should know?

Two judgement calls worth a second opinion:

  1. Citation depth. Each hook and route keeps its single Source: file:line anchor; the secondary refs sprinkled through prose and callouts are gone. The reference sites carry no citations at all — I stopped short of that so a reader can still verify a signature against their installed version.

  2. The three extending guides are still dense. extending/behavior-handler.md spends significant space on the BehaviorState six-key whitelist and the shared state row. I read those closely and kept them: getting either wrong means your handler silently re-fires on every ping, or wipes another handler's progress. That is the same depth FluentCart's custom-payment-gateway tutorial runs at. Happy to thin them further if you disagree.

Base branch note: the fluentplayer-create-pr skill's table specifies dev as the base for fluent-player-dev and fluent-player-pro. This docs repo differs — origin/HEAD points at main, and PRs #1 and #3 both merged to main. Targeting main accordingly.

The site had accumulated content about how the docs were built rather
than how to extend the plugin: extractor and grep-discovery sections,
self-referential verification claims, and roughly 550 secondary
file:line citations threaded through prose and callouts.

Reference sites dev.fluentcart.com and dev.fluentcommunity.co are
concise and task-focused; this brings the same shape here without
changing the design, structure, or navigation.

Removed:
- devdocs.md, an internal docs-audit artifact, and its srcExclude entry
- Regenerating / extractor sections and npm run extract instructions
- The window inventory on the JS API page, which catalogued non-API
  internals including Vite React-refresh stubs that only exist in dev
  builds, and an Underscore shim belonging to wp.media
- Page-builder editor shim internals, which are not extension points
- Git-commit archaeology for recovering a dropped table schema from a
  private repo history
- Duplicated Pro-detection archaeology and lockfile-vs-manifest trivia

Reduced:
- Secondary citations, so each hook and route keeps one Source anchor
- Callout density where a warning only restated adjacent prose
- AnalyticsTracker flush mechanics down to the two facts that matter

Rewritten:
- changelog.md, which recorded corrections to the documentation itself,
  is now a plugin developer-surface changelog keyed by plugin version

Traps that change what a reader writes are kept: inverted filter
defaults, the nested verdict completion flag, posterSrc vs poster, the
global zero-id pass on media_locked_message, and the PHP 7.4 floor.

Published prose drops from 55,472 to 47,612 words. VitePress build
passes, so every internal link and anchor still resolves.

@autharif autharif left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary

The change looks ready to merge with no blocker-level findings.

Key changes:

  • reference/data-model.md accurately preserves the distinction between current persistence and legacy storage, including the migrated presets option and dropped play-resume tables.
  • reference/data-model.md documents _fp_migration_original_blocks with its write, rollback, and cleanup lifecycle.

Confidence Score: 4/5

  • Merge stance: APPROVE with no confirmed Critical or Important issues.
  • The documentation changes retain the important persistence shapes, migration lifecycle, and shared-state integrity constraints while trimming secondary citations.

Last reviewed commit: DOCS: Trim non-essential detail from the developer docs

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