Add share-as-image feature for notes#3236
Merged
Merged
Conversation
Add a "Share as Image" action to the note 3-dot menu. It renders the post into a framed card, captures it to a bitmap via a GraphicsLayer, uploads the PNG to one of the user's Blossom media servers, and hands the resulting URL to the Android share sheet. The on-screen preview is the capture source, so what the user sees is exactly what gets shared. A server spinner lets the user pick which Blossom server to upload to, defaulting to their configured default. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y5ipS9wu6ffCPk5rtB8k3x
Convert the share-as-image flow from a dialog into a proper navigation screen (Route.ShareNoteAsImage), reached from the note 3-dot menu. The note is rendered off-screen into a GraphicsLayer, captured to a bitmap, and the captured bitmap is shown as the preview via an Image composable — so the preview is exactly what gets uploaded and shared. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y5ipS9wu6ffCPk5rtB8k3x
- Re-layout the screen as a centered "hero" preview on a subtle gradient backdrop, with a soft drop shadow, instead of a top-aligned full-width bitmap above a settings row. - Move the primary action into a bottom bar: a clearer server picker plus a full-width "Share" button with an icon. Top bar is now a plain back bar. - Brand the captured card with a divider + Amethyst logo watermark and roomier padding. - Capture in two passes (quick first preview, then a refined snapshot after a short settle delay) so async media has time to load into the image instead of showing empty placeholders. - Show real upload progress (stage + percentage) via the shared UploadProgressIndicator instead of a bare spinner. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y5ipS9wu6ffCPk5rtB8k3x
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a new "Share as Image" feature that allows users to export a note as a framed, shareable PNG image. The flow renders the note into a styled card, captures it to a bitmap, uploads it to a Blossom media server, and opens the Android share sheet with the resulting URL.
Changes
New screen
ShareNoteAsImageScreen.kt: Full-screen UI for the share-as-image flowUploadOrchestratorand shares the resulting URLNavigation: Added
Route.ShareNoteAsImage(id)route and wired it intoAppNavigationMenu integration: Added "Share as Image" option to note dropdown menu in
DropDownMenu.ktStrings: Added UI text keys (
share_as_image,share_as_image_generating,share_as_image_watermark)Test plan
./gradlew spotlessApply— repo is formattedNotes:
Interop suites
License
https://claude.ai/code/session_01Y5ipS9wu6ffCPk5rtB8k3x