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

Tweak share-image dimensions #31

Merged
merged 2 commits into from
Feb 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions src/components/Containers/Containers.style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,16 +86,4 @@ export const ScreenshotWrapper = styled(Box)`
width: 1200px;
height: 630px;
Copy link
Contributor

Choose a reason for hiding this comment

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

Not a huge deal, but I think 1200x630 was supposed to be the "ideal" size for Facebook/twitter/etc. to avoid extra scaling, etc. So ideally I think we'd keep the size at 1200x630 and adjust the content to fill the space. Is that doable? Probably not worth putting much time into if it's not straightforward though.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah, that makes sense--my initial hope was to not change the screenshot image component, but I think it makes most sense to update that content. I've made those changes in 33ee289

overflow: hidden;
background-color: white;
`;

/**
* Container used to create correctly format map previews.
* Wrap the map in this container.
*/
export const MapShareWrapper = styled(Box)`
margin: auto;
width: 515px;
transform: scale(2);
transform-origin: top center;
`;
5 changes: 2 additions & 3 deletions src/components/ShareImages/ShareImage.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ import { Box } from "@mui/material";

import { styled } from "../../styles";

export const ratio = 16 / 9;
export const width = 900;
export const height = width / ratio;
export const width = 1200;
export const height = 630;

export const ShareImageContainer = styled(Box)`
padding: ${({ theme }) => theme.spacing(4, 5)};
Expand Down
2 changes: 1 addition & 1 deletion src/components/ShareImages/ShareImageHomepage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const ShareImageHomepage = () => (
</Typography>
<Box
sx={{
width: 700,
width: 1000,
backgroundColor: (theme) => theme.palette.common.white,
borderRadius: 2,
}}
Expand Down
70 changes: 0 additions & 70 deletions src/pages/internal/share-image/example-share-page.tsx

This file was deleted.