-
Notifications
You must be signed in to change notification settings - Fork 393
fix: fix typos in the docs #1239
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
@dabisrat is attempting to deploy a commit to the Ping Labs Team on Vercel. A member of the Team first needs to authorize it. |
WalkthroughDocumentation updates across multiple pages correcting typos, grammar, and terminology. The Expo API reference removes the onInsufficientPermissions option from OpenImagePickerOptions. The error-handling docs correct a type from “unkown” to “unknown.” No code or runtime behavior changes included. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested labels
Suggested reviewers
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal). Please share your feedback with us on this Discord post. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
docs/src/app/(docs)/api-reference/expo/page.mdx (1)
152-165
: Fix mismatched names in the Document picker section.
- The “Returns” property is named
openImagePicker
but should beopenDocumentPicker
.- The snippet types the options as
OpenImagePickerOptions
; this should be a document‑specific options type (or reference the same generic shape, but the name should not mention “Image”).- The example passes
onInsufficientPermissions
and references “Photos,” which doesn’t match document picking.Apply this diff:
@@ - openDocumentPicker({ - input, // Matches the input schema from the FileRouter endpoint - onInsufficientPermissions: () => { - Alert.alert( - "No Permissions", - "You need to grant permission to your Photos to use this", - [ - { text: "Dismiss" }, - { text: "Open Settings", onPress: openSettings }, - ], - ); - }, - }); + openDocumentPicker({ + input, // Matches the input schema from the FileRouter endpoint + }); @@ - <Property - name="openImagePicker" - type="(opts: OpenImagePickerOptions) => Promise<void>" - > + <Property + name="openDocumentPicker" + type="(opts: OpenDocumentPickerOptions) => Promise<void>" + > @@ - type OpenImagePickerOptions = { + type OpenDocumentPickerOptions = { input: TInput // Matches the input schema from the FileRouter endpoint /** * Callback to run if the user cancels the picker. */ onCancel?: () => void }Also applies to: 191-206
🧹 Nitpick comments (8)
docs/src/app/(docs)/api-reference/react/page.mdx (4)
326-329
: Grammar: “lets” (no apostrophe).Use “lets” instead of “let’s”.
Apply this diff:
- A `react-dropzone` powered dropzone that let's you drag and drop files to + A `react-dropzone` powered dropzone that lets you drag and drop files to
375-376
: Duplicate words: “upload to upload to”.Remove the duplicate phrase.
- The name/slug of the [route](/file-routes) you want to upload to upload to + The name/slug of the [route](/file-routes) you want to upload to
246-260
: Consistency: “server‑side” vs “serverside”.Hyphenate for consistency with other pages.
- Callback function that runs **after** the serverside + Callback function that runs **after** the server-side
185-208
: API docs consistency: onUploadBegin param shape.Example uses a string argument (
name
), while props specify({ file: string })
. Align either the example or the type.Also applies to: 285-288
docs/src/app/(docs)/api-reference/client/page.mdx (1)
12-13
: Minor grammar: “working with files”.Add “with”.
-The UploadThing Client module provides utilities for working files in your +The UploadThing Client module provides utilities for working with files in yourdocs/src/app/(docs)/uploading-files/page.mdx (2)
18-26
: Consistency: “Client‑side uploads” capitalization/hyphenation.Standardize heading and occurrences to “Client‑side uploads”.
-## Client Side Uploads +## Client-side uploads
122-129
: Code sample correctness:let
vsconst
.
h
is mutated; uselet
to avoid confusion.-function djb2(s: string) { - const h = 5381; +function djb2(s: string) { + let h = 5381;docs/src/app/(docs)/api-reference/expo/page.mdx (1)
156-158
: Copy: refer to “Files” for document picker.“Photos” is misleading for the document picker flow.
Apply this diff:
- "You need to grant permission to your Photos to use this", + "You need to grant permission to your Files to use this",
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (9)
docs/src/app/(docs)/api-reference/client/page.mdx
(1 hunks)docs/src/app/(docs)/api-reference/expo/page.mdx
(1 hunks)docs/src/app/(docs)/api-reference/react/page.mdx
(3 hunks)docs/src/app/(docs)/api-reference/ut-api/page.mdx
(1 hunks)docs/src/app/(docs)/concepts/auth-security/page.mdx
(1 hunks)docs/src/app/(docs)/concepts/error-handling/page.mdx
(1 hunks)docs/src/app/(docs)/concepts/regions-acl/page.mdx
(1 hunks)docs/src/app/(docs)/file-routes/page.mdx
(6 hunks)docs/src/app/(docs)/uploading-files/page.mdx
(2 hunks)
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2024-10-08T16:10:15.532Z
Learnt from: markflorkowski
PR: pingdotgg/uploadthing#978
File: examples/minimal-appdir/src/server/uploadthing.ts:62-62
Timestamp: 2024-10-08T16:10:15.532Z
Learning: In the `onUploadComplete` handler in `examples/minimal-appdir/src/server/uploadthing.ts`, the return value `{ foo: "bar" }` is intentionally a placeholder for user-defined logic and may represent database returns or other computed values.
Applied to files:
docs/src/app/(docs)/file-routes/page.mdx
docs/src/app/(docs)/uploading-files/page.mdx
📚 Learning: 2024-10-08T16:10:15.532Z
Learnt from: markflorkowski
PR: pingdotgg/uploadthing#978
File: examples/minimal-appdir/src/server/uploadthing.ts:41-43
Timestamp: 2024-10-08T16:10:15.532Z
Learning: In the `examples/minimal-appdir/src/server/uploadthing.ts` and other example files, the commented-out header validation code is intentional and serves as an example for users.
Applied to files:
docs/src/app/(docs)/file-routes/page.mdx
🔇 Additional comments (18)
docs/src/app/(docs)/api-reference/react/page.mdx (3)
226-229
: Typo fix LGTM: “Go to Definition”.Good catch; improves editor UX clarity.
385-388
: Typo fix LGTM: “Go to Definition”.Consistent with client docs.
517-520
: Typo fix LGTM: “Go to Definition”.Consistent wording across sections.
docs/src/app/(docs)/concepts/regions-acl/page.mdx (1)
32-32
: Spelling fix LGTM: “San Francisco”.Accurate region name.
docs/src/app/(docs)/api-reference/client/page.mdx (1)
51-54
: Typo fix LGTM: “Go to Definition”.Matches React and hook docs.
docs/src/app/(docs)/concepts/auth-security/page.mdx (1)
19-20
: Spelling fix LGTM: “publicly”.Clearer, correct adverb.
docs/src/app/(docs)/api-reference/ut-api/page.mdx (1)
27-28
: Spelling fix LGTM: “initialization”.Improves professionalism.
docs/src/app/(docs)/uploading-files/page.mdx (2)
38-43
: Grammar fix LGTM.Reads smoothly now.
524-525
: Spelling fix LGTM: “registering”.Accurate phrasing.
docs/src/app/(docs)/concepts/error-handling/page.mdx (1)
102-104
: Type fix LGTM:cause?: unknown
.Correct TS type; avoids misspelling.
docs/src/app/(docs)/file-routes/page.mdx (6)
71-74
: Grammar fix LGTM: “allows”.Improves readability.
176-177
: Clarity fix LGTM.Error flow phrasing is clearer.
201-202
: Consistency fix LGTM: “UploadThing server won’t”.Terminology and hyphenation aligned.
241-242
: Typo fix LGTM: “identifier”.Corrects spelling.
258-259
: Comment clarity LGTM.UTFiles symbol behavior described correctly.
288-289
: Grammar fix LGTM: “be passed”.Accurate tense/voice.
docs/src/app/(docs)/api-reference/expo/page.mdx (2)
174-174
: Typo fix looks good."Parameters" header correction is correct.
61-75
: Align docs with actual OpenImagePickerOptions — remove or make permissions callback optional.Docs show onInsufficientPermissions as required in both the example and the OpenImagePickerOptions type. Confirm whether the public API in @uploadthing/expo still requires this callback; if it does not, remove it from the example and the type; if it does, mark it optional (onInsufficientPermissions?: () => void) to avoid breaking consumers.
Location: docs/src/app/(docs)/api-reference/expo/page.mdx — example (lines 61–75) and type (lines 108–120).
Summary by CodeRabbit