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

Remove newline to show FB and Twitter buttons on same line #4821 #4867

Conversation

matvs
Copy link
Contributor

@matvs matvs commented Feb 21, 2019

Fixes #4821

  • tests pass -- look for a green checkbox ✔️ a few minutes after opening your PR -- or run tests locally with rake test
  • code is in uniquely-named feature branch and has no merge conflicts 📁
  • PR is descriptively titled 📑
  • screenshots/GIFs are attached 📎 in case of UI updation
  • ask @publiclab/reviewers for help, in a comment below

Removing <br> tag was not simply enough, since facebook button root node is a div with display block.
I am not that happy with this solution, because it relies on how Facebook renders its button, which can change at any time.
Other solution I came up with was adding float:left and margin-right to twitter button, then it does not matter that Facebook button is block element, but still it relies on how twitter's script renders its button in iframe.
Last solution I came up, but could not make work was wrapping both of them in divs and then position them based on our containers div with no regard what is inside.

I have managed to implement this feature with wrapping both buttons in divs. Not it is independent from the way twitter or facebook renders its buttons.

remove newline to show fb and twitter buttons on same line 4821

remove newline to show fb and twitter buttons on same line 4821

…4821

Removing <br> tag was not simply enough, since facebook button root node is a div with display block.
I am not that happy with this solution, because it relies on how Facebook renders its button, which can change at any time.
Other solution I came up with was adding float:left and margin-right to twitter button, then it does not matter that Facebook button is block element, but still it relies on how twitter's script renders its button in iframe.
Last solution I came up, but could not make work was wrapping both of them in divs and then position them based on our containers div with no regard what is inside.
@matvs
Copy link
Contributor Author

matvs commented Feb 21, 2019

Hi @publiclab/reviewers
I kindly ask your for the review :)

@plotsbot
Copy link
Collaborator

plotsbot commented Feb 21, 2019

1 Message
📖 @swiatek7 Thank you for your pull request! I’m here to help with some tips and recommendations. Please take a look at the list provided and help us review and accept your contribution! And don’t be discouraged if you see errors – we’re here to help.

Generated by 🚫 Danger

@matvs
Copy link
Contributor Author

matvs commented Feb 21, 2019

  • @publiclab/reviewers I have pushed new code.

Copy link
Member

@grvsachdeva grvsachdeva left a comment

Choose a reason for hiding this comment

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

Could you please provide a GIF showing the status of buttons on different screen widths? Thanks!

app/views/sidebar/_dashboard.html.erb Outdated Show resolved Hide resolved
Typo, closing tag.

Co-Authored-By: swiatek7 <swiatek7@gmail.com>
@meet2410shah
Copy link

I want to claim this.

@matvs
Copy link
Contributor Author

matvs commented Feb 21, 2019

Could you please provide a GIF showing the status of buttons on different screen widths? Thanks!

Done :)

Copy link
Member

@grvsachdeva grvsachdeva left a comment

Choose a reason for hiding this comment

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

Great work @swiatek7 🎉

@grvsachdeva grvsachdeva merged commit 51c2e50 into publiclab:master Feb 21, 2019
@grvsachdeva
Copy link
Member

grvsachdeva commented Feb 21, 2019

Merged 💯 👍 🎈 🎉 !

Hey @swiatek7, thanks for nice work. We would love to have more help from you. If you are interested in solving more issues then check here - https://code.publiclab.org/#r=all for a new issue. In case, you are unable to find an issue, feel free to comment here. Thanks!

@grvsachdeva
Copy link
Member

Hey @meet2410shah, please check other issues as this one is complete. Thanks!

@matvs matvs deleted the feature-FB-and-Twitter-buttons-on-same-line-#4821 branch February 21, 2019 20:10
@matvs
Copy link
Contributor Author

matvs commented Feb 21, 2019

Thanks @gauravano :)
I will definitely check out more issues and I will try to contribute.

icarito pushed a commit to icarito/plots2 that referenced this pull request Apr 9, 2019
…4821 (publiclab#4867)

* Remove newline to show FB and Twitter buttons on same line publiclab#4821

Removing <br> tag was not simply enough, since facebook button root node is a div with display block.
I am not that happy with this solution, because it relies on how Facebook renders its button, which can change at any time.
Other solution I came up with was adding float:left and margin-right to twitter button, then it does not matter that Facebook button is block element, but still it relies on how twitter's script renders its button in iframe.
Last solution I came up, but could not make work was wrapping both of them in divs and then position them based on our containers div with no regard what is inside.

* Change solution to indepent of internals of social media buttons

* Update app/views/sidebar/_dashboard.html.erb

Typo, closing tag.

Co-Authored-By: swiatek7 <swiatek7@gmail.com>
SrinandanPai pushed a commit to SrinandanPai/plots2 that referenced this pull request May 5, 2019
…4821 (publiclab#4867)

* Remove newline to show FB and Twitter buttons on same line publiclab#4821

Removing <br> tag was not simply enough, since facebook button root node is a div with display block.
I am not that happy with this solution, because it relies on how Facebook renders its button, which can change at any time.
Other solution I came up with was adding float:left and margin-right to twitter button, then it does not matter that Facebook button is block element, but still it relies on how twitter's script renders its button in iframe.
Last solution I came up, but could not make work was wrapping both of them in divs and then position them based on our containers div with no regard what is inside.

* Change solution to indepent of internals of social media buttons

* Update app/views/sidebar/_dashboard.html.erb

Typo, closing tag.

Co-Authored-By: swiatek7 <swiatek7@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants