feat(slides): add structured introspection#836
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 64aacdd1bd
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if err != nil { | ||
| return err | ||
| } | ||
| presentation, err := svc.Presentations.Get(file.Id).Context(ctx).Do() |
There was a problem hiding this comment.
Add a field mask to the slides info fetch
For large presentations this unqualified Presentations.Get downloads every slide's full page elements, notes, image URLs, and other content even though buildSlidesPresentationInfo only uses title, locale, revision ID, page size, slide count, masters, and layouts. That makes a metadata-only gog slides info unexpectedly slow and quota-heavy on large decks; request just those fields with Fields(...) before Do().
Useful? React with 👍 / 👎.
|
Landed as 5ff811dc. Maintainer verification:
Thanks @sebsnyk. |
Summary
slides locate/find-elementfor read-only shape and table-cell text lookup with exact UTF-16 rangesslides read-slidewith table-cell text and image source URLs;--detailadds flattened element types, parent links, normalized PT bounds, runs/styles/links/colors, paragraphs, bullets, and table structureslides infowith slide count, PT page size, locale, masters/theme colors, and layouts while retaining Drive metadataslides rawas the lossless API escape hatchCloses #822.
Compatibility
Existing
read-slideJSON fields remain.textElementsandimagesare additive; table-cell entries,sourceUrl, andtablesare new. Detailed high-volume structure is opt-in with--detail.Verification
make cisourceUrl; bold/italic/font/size/color/link runs; table-cell content; literal locator ranges for ordinary text, table text, and an emoji surrogate pairDocs
docs/slides-introspection.mdThanks @sebsnyk for the report.