Skip to content

docs(webviewer): add Initial Props page#278

Open
eluce2 wants to merge 1 commit into
mainfrom
docs/webviewer-initial-props
Open

docs(webviewer): add Initial Props page#278
eluce2 wants to merge 1 commit into
mainfrom
docs/webviewer-initial-props

Conversation

@eluce2
Copy link
Copy Markdown
Collaborator

@eluce2 eluce2 commented May 20, 2026

Summary

  • New docs page at /docs/webviewer/initial-props covering the pull-not-push pattern for bootstrap data.
  • Emphasizes that the web viewer should call fmFetch to ask for props once loaded, rather than FileMaker pushing them in via HTML substitution or FileMaker.PerformJavaScriptInWebViewer (both race the bundle load).
  • Notes that in the ProofKit template the fetch runs before the router mounts, so the first render can already depend on FileMaker state.
  • Two examples: initial route (TanStack hash router) and current user (zod-validated identity object).
  • Sidebar entry added to meta.json under Concepts, between commands and platform-notes.

Test plan

  • pnpm run ci passes
  • Page renders in local docs dev server with correct TOC, sidebar placement, callouts, and code blocks

Summary by CodeRabbit

  • Documentation
    • Added new documentation page on initial props bootstrap pattern for Web Viewer configuration, including practical examples and best practices.

Review Change Stack

Document the pull-not-push pattern for bootstrap data: web viewer
fetches initial props via fmFetch once mounted, rather than FileMaker
pushing via HTML substitution or PerformJavaScriptInWebViewer (which
races the bundle load). Includes initial-route and current-user
examples.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 20, 2026

⚠️ No Changeset found

Latest commit: 5cb5d3a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link
Copy Markdown

vercel Bot commented May 20, 2026

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

Project Deployment Actions Updated (UTC)
proofkit-docs Ready Ready Preview, Comment May 20, 2026 10:27pm

Request Review

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 20, 2026

Open in StackBlitz

@proofkit/better-auth

pnpm add https://pkg.pr.new/proofsh/proofkit/@proofkit/better-auth@278

@proofkit/cli

pnpm add https://pkg.pr.new/proofsh/proofkit/@proofkit/cli@278

create-proofkit

pnpm add https://pkg.pr.new/proofsh/proofkit/create-proofkit@278

@proofkit/fmdapi

pnpm add https://pkg.pr.new/proofsh/proofkit/@proofkit/fmdapi@278

@proofkit/fmodata

pnpm add https://pkg.pr.new/proofsh/proofkit/@proofkit/fmodata@278

@proofkit/typegen

pnpm add https://pkg.pr.new/proofsh/proofkit/@proofkit/typegen@278

@proofkit/webviewer

pnpm add https://pkg.pr.new/proofsh/proofkit/@proofkit/webviewer@278

commit: 5cb5d3a

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 20, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 9eddd9ba-abee-4040-95f3-0dc6d1b16606

📥 Commits

Reviewing files that changed from the base of the PR and between ff85065 and 5cb5d3a.

📒 Files selected for processing (2)
  • apps/docs/content/docs/webviewer/initial-props.mdx
  • apps/docs/content/docs/webviewer/meta.json

📝 Walkthrough

Walkthrough

This pull request adds documentation for the initial props bootstrap pattern used in the Web Viewer. It explains how to implement a pull-based startup flow where the web app fetches and validates FileMaker data via fmFetch to initialize routing and user state without UI flashes.

Changes

Initial Props Documentation

Layer / File(s) Summary
Concept and foundation
apps/docs/content/docs/webviewer/initial-props.mdx, apps/docs/content/docs/webviewer/meta.json
Introduces initial props as a pull-based startup pattern requiring fmFetch calls and zod schema validation, defines the basic implementation shape, and registers the new documentation page in the navigation menu.
Usage examples
apps/docs/content/docs/webviewer/initial-props.mdx
Documents two practical examples: configuring an initial route based on FileMaker context with client-side routing setup, and fetching current user identity data with corresponding FileMaker script implementation.
React integration and fallbacks
apps/docs/content/docs/webviewer/initial-props.mdx
Shows React startup gating using a props promise with React.use, Suspense boundary, and loading fallback; also documents when not to use initial props and recommends alternative patterns like user-driven refreshes or FileMaker-initiated callbacks.

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: adding a new documentation page for the Initial Props concept in the WebViewer documentation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/webviewer-initial-props

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint skipped: no ESLint configuration detected in root package.json. To enable, add eslint to devDependencies.


Comment @coderabbitai help to get the list of available commands and usage tips.

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