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

feat(imageType): set image types to change object fit #862

Merged
merged 6 commits into from
Mar 17, 2021
Merged

Conversation

KatvonRivia
Copy link
Member

closes #856

@@ -118,7 +122,14 @@ const StoryMedia: FunctionComponent<Props> = ({
key={index}
style={{width: `${imageWidth}%`}}>
<div className={styles.imageContainer}>
<img className={styles.photo} src={imageUrl} />
<img
Copy link
Contributor

Choose a reason for hiding this comment

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

The story gallery component is getting really big. Could you clean it up by pulling out a StoryGalleryImage component with captions for example

Copy link
Member Author

Choose a reason for hiding this comment

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

aye 👌 will do

@@ -0,0 +1,4 @@
export enum ImageType {
Photo = 'photo',
Chart = 'chart'
Copy link
Contributor

Choose a reason for hiding this comment

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

Chart is probably not the best type here. It could be any other image which should be contained. Why not call it what it is like 'contain' and 'cover'?

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure, i can change it. I just thought contain and cover would be a bit confusing in the story mapper.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes good point, but I guess labeling a photograph as "chart" just to display it as contained is more confusing. At least for me 😄

}}>
{images.map((image, index) => {
const imageCaption = imageCaptions?.find((_, i) => i === index);
const imageType = imageFits?.find((_, i) => i === index);
Copy link
Contributor

Choose a reason for hiding this comment

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

const imageFit

@KatvonRivia KatvonRivia merged commit 37e91eb into develop Mar 17, 2021
@KatvonRivia KatvonRivia deleted the imageType branch March 17, 2021 13:50
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.

add support for two image display modi:
2 participants