Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Composer image resize - Community#729 #2440

Merged

Conversation

glenn2223
Copy link
Contributor

Add image resizing to the composer - closes Community#729


  • You can now resize images within the composer
    • by default, it will retain the original ratio (holding Shift = freeform)
  • Adjusted the margins and positions of the image in the composer so it matches the email viewer
    before it was padded and top-aligned then, in the viewer, it would have no padding and be base-aligned - meaning what you see is not what they get 😉

TODO: check how to undo AND see if title/alt attribute implementation is possible (maybe a pop-up with fields for these AND width and height 🤷‍♂️)
The composer is adding styles to inline images, this means a draft can look completely different to the received mail. Removed the `vertical-align` and reset the `margin` to match the email view
- Added image ratio retention (<kbd>shift</kbd> = freeform)
- Fixed resizing being stopped when reducing the image size reduces the height of the email
- Had to stop the container from reducing (whilst resizing) as reducing the image inside a reducing element was VERY janky 🤮
@foundry376-bot
Copy link

This pull request has been mentioned on Mailspring Community. There might be relevant details there:

https://community.getmailspring.com/t/resizing-image-in-composer/729/6

Copy link
Collaborator

@bengotow bengotow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow this looks great, nice work @glenn2223! Going to merge this and we'll ship an update :-)

@bengotow bengotow merged commit 9305bc8 into Foundry376:master Dec 29, 2022
@glenn2223 glenn2223 deleted the composer-image-resize-community#729 branch January 5, 2023 12:23
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.

None yet

3 participants