-
Notifications
You must be signed in to change notification settings - Fork 656
feat(docs): add --spacing-mode flag to docs format for paragraph spacing control #885
Copy link
Copy link
Closed
Labels
P3Low-risk cleanup, docs, polish, ergonomics, or speculative feature.Low-risk cleanup, docs, polish, ergonomics, or speculative feature.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.This issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Description
Metadata
Metadata
Assignees
Labels
P3Low-risk cleanup, docs, polish, ergonomics, or speculative feature.Low-risk cleanup, docs, polish, ergonomics, or speculative feature.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.This issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Type
Fields
Priority
None yet
What I'm trying to do
Control the
spacingModeproperty on paragraph styles after importing markdown viagog docs write --markdown. Specifically, setNEVER_COLLAPSEon bullet list paragraphs so thatspaceBelowis always honoured between consecutive list items — the defaultCOLLAPSE_LISTScauses Google Docs to collapse spacing, making multi-line bullet items feel cramped.Gap (confirmed in CLI, v0.31.0)
gog docs format --helpexposes--space-above,--space-below, and--line-spacingbut has no flag forspacingMode. There is no othergogcommand that sets this property. The only way to change it today is a rawupdateParagraphStyleAPI call outside ofgog.Why this is feasible (Docs API)
The Docs REST API
updateParagraphStylerequest supportsspacingModeas a field onParagraphStyle. Valid values areNEVER_COLLAPSEandCOLLAPSE_LISTS. Ref: https://developers.google.com/docs/api/reference/rest/v1/documents#SpacingModegog docs formatalready buildsupdateParagraphStylerequests for other paragraph properties (lineSpacing,spaceAbove,spaceBelow,alignment). AddingspacingModeis the same pattern — one additional field.Proposed surface
A
--spacing-modeflag ongog docs format:Accepted values:
NEVER_COLLAPSE,COLLAPSE_LISTS.Composes with existing flags:
Should also work with
--batchfor batched requests.Use case
Round-trip markdown-to-Docs workflows. After
gog docs write --markdown, bullet lists default toCOLLAPSE_LISTSwhich visually collapses spacing. SettingNEVER_COLLAPSErestores consistent readability without requiring raw API calls.Version
v0.31.0