Repository navigation
Share previews the workout image, with a transparent background and Copy - #166
Open
daniel-bernardino747 wants to merge 2 commits into
Open
daniel-bernardino747 wants to merge 2 commits into
daniel-bernardino747 wants to merge 2 commits into
Conversation
Share on the Workout Complete sheet sent the image straight to the share sheet (or downloaded it), with no look at it first. It now opens a preview in the same sheet, with Cancel and Share, and shares the exact image shown. The image keeps its 1080 x 1350. The preview adds a Solid / Transparent choice: Transparent renders the card with no background, with lighter greys, see-through tiles and a soft shadow, to put it over a photo in a story. Copy puts the image shown on the clipboard; it is offered only where the browser can write an image there (HTTPS or localhost).
scripts/exercise-media-urls.test.js reads any src={...previewUrl...} as
exercise media that must go through resolveAssetUrl. The share preview's
image is a blob: URL made in the page, not media from the server, so it
gets a name that says so.
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.
Closes #162
Summary
Share on the Workout Complete sheet now opens a preview of the image before sending it. The preview has a Solid / Transparent background choice and a Copy button. The image itself keeps its 1080 x 1350.
Changes
src/components/diary/WorkoutSummary.svelte: Share swaps the sheet's content for a preview (image, Solid / Transparent, Cancel / Copy / Share). The image shown is the one shared or copied.src/lib/workoutCard.js:renderWorkoutCardtakes{ transparent }: no background, lighter greys, see-through tiles and a soft shadowshareWorkoutCardcan take an already rendered imagecanCopyImage/copyWorkoutCardsrc/i18n/en.json: new keys underworkout_summary(English only)CHANGELOG.md: entry under UnreleasedNo new dependencies, no server changes. Styles reuse the existing buttons and tokens; the only new CSS is the preview box and its checkerboard.
Screenshots
Rendered images (solid and transparent):
How to test
Notes
This is only a suggestion. Feel free to use all of it, part of it or none of it.
I used AI (Claude Code) to help write these changes; I reviewed and tested them myself.