Skip to content

Show the first page of OpenDocument files in the file browser - #256

Merged
andiwand merged 3 commits into
mainfrom
thumbnail-extension
Dec 5, 2026
Merged

andiwand merged 3 commits into
mainfrom
thumbnail-extension

Conversation

@andiwand

@andiwand andiwand commented Dec 5, 2026 •

Copy link
Copy Markdown
Member

🤖 Generated with Claude Code

The prototype the shared design asks for (headquarters designs/2026-12-03_whats-new-edit-tools-home.html, H1 and the table under it), and the answer to its open point: iOS does use a thumbnail extension for types the app only imports.

  • Office files, PDFs and CSV already show their first page; only OpenDocument files had icons.
  • One extension target per app (at.tomtasche.reader.thumbnail, at.tomtasche.reader.lite1.thumbnail), one source. It reads Thumbnails/thumbnail.png from the file with a small zip reader and leaves the icon where there is none. No core, so memory is not a question.
  • ThumbnailExtensionTests asks QuickLook for a file with a picture (gets the thumbnail) and one without (keeps the icon). Taking .odt out of the extension's list makes the first test fail, so the picture is ours.
  • Checked in the simulator's Files app: .odt, .ods, .odp show their page. Files had cached the .odt icons from before; they changed after Files restarted.
  • The xcodeproj gem re-sorted some existing entries of the project file; nothing in them changed.

Switched off for now. The extension needs App IDs of its own, which are not registered yet. Until then the apps neither build nor embed it, and ThumbnailExtensionTests skip. The release lane already fetches a profile per signed bundle, and each target names its own (ODR_APP_PROFILE, ODR_THUMBNAIL_PROFILE).

To switch it on:

  • Register both App IDs, no capabilities needed.
  • Add the extension back to each app's dependencies and an Embed Foundation Extensions phase.
  • In the release lane, add "#{app_identifier}.thumbnail" to the profiles and pass ODR_THUMBNAIL_PROFILE.

Files our own core and the screenshot samples write carry no picture, so they keep the icon. LibreOffice writes one; whether Google Docs and Collabora do is not checked.

A thumbnail extension for each app reads the picture an OpenDocument file
carries. Office files and PDFs already get one from the system.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FW6WZZDW37iW7ZvG3LGiFw
@andiwand
andiwand marked this pull request as ready for review December 5, 2026 19:41
andiwand and others added 2 commits December 5, 2026 20:43
The release lane fetched one profile, for the app, and gave it to every
target. It now fetches one for the extension too, and each target names
its own.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FW6WZY3bi24dPrTHTHa26m
The extension needs App IDs of its own, which are not registered yet.
The apps neither build nor embed it, the release lane signs the app
alone, and the extension's tests skip while it is not in the app.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FW6WZY3bi24dPrTHTHa26m
@andiwand
andiwand merged commit a312c43 into main Dec 5, 2026
3 of 4 checks passed
@andiwand
andiwand deleted the thumbnail-extension branch December 5, 2026 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant