Skip to content

feat(docs format): paragraph list + indentation/spacing controls (createParagraphBullets / deleteParagraphBullets / updateParagraphStyle gaps) #852

Description

@sebsnyk

I have been using gog docs format for surgical paragraph styling and hit a wall: it covers --named-style, --alignment, --line-spacing, and run-level text styling, but cannot turn an existing paragraph into a list, demote a list back to plain text, or adjust indentation/spacing. Today the only way to get a bullet or change an indent is to re-render the surrounding region via the markdown writer (write/find-replace --format markdown), which rewrites the whole paragraph and is the single most common reason a surgical edit becomes a region rewrite.

The Docs API has the primitives already; they are just not surfaced:

  • createParagraphBullets (with a bulletPreset, e.g. BULLET_DISC_CIRCLE_SQUARE or NUMBERED_DECIMAL_ALPHA_ROMAN) — make a paragraph range a bulleted/numbered list.
  • deleteParagraphBullets — demote a list range back to plain paragraphs.
  • updateParagraphStyle fields not currently exposed: indentStart, indentFirstLine, indentEnd, spaceAbove, spaceBelow, keepWithNext, keepLinesTogether.

The format command already builds an UpdateParagraphStyleRequest, so the spacing/indent fields are a small extension to the existing fieldmask. The bullets case needs two new request builders.

Proposed flags on docs format:

--bullets[=PRESET]      # createParagraphBullets; default BULLET_DISC_CIRCLE_SQUARE
--ordered[=PRESET]      # createParagraphBullets with a NUMBERED_* preset
--no-bullets            # deleteParagraphBullets
--indent-start=PT --indent-first-line=PT --indent-end=PT
--space-above=PT --space-below=PT
--keep-with-next / --no-keep-with-next

These would compose with the existing --match / --match-all anchoring the same way the text-style flags do. This closes the largest remaining whole-region-rewrite trigger for paragraph editing.

Ref: documents.batchUpdate Request reference (createParagraphBullets, deleteParagraphBullets, updateParagraphStyle).

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low-risk cleanup, docs, polish, ergonomics, or speculative feature.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:otherThis 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.no-staleExempts this issue from stale automation.

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions