-
Notifications
You must be signed in to change notification settings - Fork 5.5k
[FEATURE] Create styled google docs documents from markdown #18991
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: master
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
WalkthroughAdds Markdown support for creating Google Docs: new markdown parser module and app method, a Create Document action Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant CreateDoc as Create Document Action
participant App as GoogleDocs App
participant Parser as Markdown Parser
participant GoogleDocs as Google Docs API
User->>CreateDoc: create(documentId, text, useMarkdown=true)
CreateDoc->>App: insertMarkdownText(documentId, text)
App->>Parser: parseMarkdown(text)
Parser-->>App: { text, formattingRequests, totalLength }
App->>Parser: convertToGoogleDocsRequests(parseResult)
Parser-->>App: [batchUpdate requests]
App->>GoogleDocs: batchUpdate(requests)
GoogleDocs-->>App: response
App-->>CreateDoc: result
CreateDoc-->>User: completed
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes
Suggested reviewers
Pre-merge checks and finishing touches❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: ASSERTIVE Plan: Pro ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (17)
🧰 Additional context used🧬 Code graph analysis (3)components/google_docs/google_docs.app.mjs (1)
components/google_docs/common/markdown-parser.mjs (1)
components/google_docs/actions/create-document/create-document.mjs (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
🔇 Additional comments (13)
Comment |
7763a6a to
7e81281
Compare
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: 9
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (17)
components/google_docs/actions/append-image/append-image.mjs(1 hunks)components/google_docs/actions/append-text/append-text.mjs(1 hunks)components/google_docs/actions/create-document-from-template/create-document-from-template.mjs(1 hunks)components/google_docs/actions/create-document/create-document.mjs(3 hunks)components/google_docs/actions/find-document/find-document.mjs(1 hunks)components/google_docs/actions/get-document/get-document.mjs(1 hunks)components/google_docs/actions/get-tab-content/get-tab-content.mjs(1 hunks)components/google_docs/actions/insert-page-break/insert-page-break.mjs(1 hunks)components/google_docs/actions/insert-table/insert-table.mjs(1 hunks)components/google_docs/actions/insert-text/insert-text.mjs(1 hunks)components/google_docs/actions/replace-image/replace-image.mjs(1 hunks)components/google_docs/actions/replace-text/replace-text.mjs(1 hunks)components/google_docs/common/markdown-parser.mjs(1 hunks)components/google_docs/google_docs.app.mjs(2 hunks)components/google_docs/package.json(2 hunks)components/google_docs/sources/new-document-created/new-document-created.mjs(1 hunks)components/google_docs/sources/new-or-updated-document/new-or-updated-document.mjs(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (2)
components/google_docs/common/markdown-parser.mjs (2)
components/google_docs/actions/insert-text/insert-text.mjs (1)
text(46-52)components/google_docs/google_docs.app.mjs (2)
parseResult(184-184)batchRequests(185-185)
components/google_docs/google_docs.app.mjs (1)
components/google_docs/common/markdown-parser.mjs (2)
parseResult(232-235)batchRequests(236-236)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: Publish TypeScript components
- GitHub Check: Verify TypeScript components
- GitHub Check: Lint Code Base
🔇 Additional comments (16)
components/google_docs/actions/get-tab-content/get-tab-content.mjs (1)
7-7: Version bump is intentional and consistent—no action needed.The script output reveals a systematic, package-wide version maintenance strategy:
- Four read-only utility actions at v0.0.2 were bumped together to v0.0.3:
insert-table,insert-text,insert-page-break, andget-tab-content- Five actions at v0.0.9 were bumped to v0.0.10
- Two actions at v0.1.8 were bumped to v0.1.9
create-documentreceived a major bump to v0.2.0 due to new Markdown functionalityThis is not an accidental inclusion. The version bump for
get-tab-contentfollows the same pattern as other actions at the same version tier, indicating deliberate, coordinated release maintenance across the package.components/google_docs/actions/create-document-from-template/create-document-from-template.mjs (1)
16-16: LGTM: Version bump aligns with PR release.The patch version increment is appropriate for this coordinated release.
components/google_docs/actions/append-image/append-image.mjs (1)
7-7: LGTM: Version bump aligns with PR release.The patch version increment is appropriate for this coordinated release.
components/google_docs/actions/find-document/find-document.mjs (1)
17-17: LGTM: Version bump aligns with PR release.The patch version increment is appropriate for this coordinated release.
components/google_docs/actions/append-text/append-text.mjs (1)
7-7: LGTM: Version bump aligns with PR release.The patch version increment is appropriate for this coordinated release.
components/google_docs/actions/insert-table/insert-table.mjs (1)
7-7: LGTM: Version bump aligns with PR release.The patch version increment is appropriate for this coordinated release.
components/google_docs/actions/get-document/get-document.mjs (1)
8-8: LGTM: Version bump aligns with PR release.The patch version increment is appropriate for this coordinated release.
components/google_docs/actions/insert-text/insert-text.mjs (1)
7-7: LGTM: Version bump aligns with PR release.The patch version increment is appropriate for this coordinated release.
components/google_docs/actions/insert-page-break/insert-page-break.mjs (1)
7-7: LGTM: Version bump aligns with PR release.The patch version increment is appropriate for this coordinated release.
components/google_docs/actions/replace-image/replace-image.mjs (1)
7-7: Version bump looks good.This is a metadata-only update consistent with the PR-wide versioning changes.
components/google_docs/sources/new-or-updated-document/new-or-updated-document.mjs (1)
12-12: Version bump is appropriate.Metadata update aligns with the broader package release.
components/google_docs/sources/new-document-created/new-document-created.mjs (1)
8-8: Version update is consistent.The version bump aligns with the package-wide version update.
components/google_docs/actions/replace-text/replace-text.mjs (1)
7-7: LGTM: metadata update only.Version bump is consistent with the release.
components/google_docs/actions/create-document/create-document.mjs (1)
28-33: Good approach: optional feature flag for backward compatibility.The
useMarkdownflag allows users to opt into the new functionality while maintaining backward compatibility with existing workflows.components/google_docs/common/markdown-parser.mjs (1)
12-18: LGTM: Secure markdown-it configuration.The parser correctly disables HTML (
html: false) to prevent injection attacks, enables line breaks, and disables auto-linking. This configuration is appropriate for converting to Google Docs formatting.components/google_docs/package.json (1)
18-18: No issues found—markdown-it version is current and secure.Version 14.1.0 is the latest stable release. The two known security vulnerabilities for markdown-it affect versions < 3.0.0 and < 12.3.2, both of which are significantly older and already patched. The specified version ^14.1.0 is unaffected by these advisories.
7e81281 to
7d9ba5f
Compare
WHY
Resolves #18924
Summary by CodeRabbit
New Features
Chores