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

Fix margin for right-aligned images #398

Merged
merged 2 commits into from
Jan 18, 2018

Conversation

rickhanlonii
Copy link
Member

@rickhanlonii rickhanlonii commented Jan 13, 2018

Motivation

@cyan33 found this bug and submitted it to the Jest repo, I thought I'd put in a quick fix

Closes jestjs/jest#5299
Closes #397

Test Plan

Tested using the website/ within this project

Before:

After:

@rickhanlonii
Copy link
Member Author

rickhanlonii commented Jan 13, 2018

Sorry @cyan33, just saw #397, didn't mean to step on your toes 😔

@cyan33
Copy link

cyan33 commented Jan 14, 2018

@rickhanlonii It's alright! Happy to see this get fixed! 😄

@cyan33
Copy link

cyan33 commented Jan 14, 2018

On second thought tho, I think it's better to separate the imageAlignSide into imageAlignLeft and imageAlignRight. Because it seems that only adding an imageAlignRight makes the logic across those two components somewhat duplicated and not that intuitive.

@rickhanlonii
Copy link
Member Author

I had the same thought, I'll update

@rickhanlonii
Copy link
Member Author

Updated, that's much cleaner thanks @cyan33

@JoelMarcey
Copy link
Contributor

@rickhanlonii Thank you so much for taking the time to fix this. Looks good to me.

And thanks @cyan33 for raising the issue too.

@cyan33
Copy link

cyan33 commented Jan 18, 2018

@JoelMarcey No problem! 😄

Copy link
Contributor

@JoelMarcey JoelMarcey left a comment

Choose a reason for hiding this comment

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

Looks great.

At first I thought about whether imageAlignSide is actually necessary (not taking into consideration it would be a breaking change if we took it out). But I think it works like this.

@JoelMarcey JoelMarcey merged commit 4c2558e into facebook:master Jan 18, 2018
@rickhanlonii rickhanlonii deleted the rh-fix-image-margin branch January 18, 2018 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The imgAlignSide component only has a margin-right Website: Wrong Margin for the BlockImage
4 participants