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

Single button less than 200px becomes "tiny-format" #128

Closed
jsmoriss opened this issue Jul 10, 2015 · 18 comments
Closed

Single button less than 200px becomes "tiny-format" #128

jsmoriss opened this issue Jul 10, 2015 · 18 comments

Comments

@jsmoriss
Copy link
Contributor

I've been working on some CSS to align the buttons vertically by putting each button in it's own container. If the container for a single button is less than 200px wide, RRSSB formats it as "tiny".

Here's my temporary patch:

$ diff ~/svn/github/jsmoriss/rrssb/trunk/js/rrssb.js rrssb.js
135c135
<           if (containerWidth < 200) {

---
>           if ( containerWidth < $('li', self).length * 25 ) {

js.

@jsmoriss
Copy link
Contributor Author

Actually, I think this may be better. ;-)

$ diff ~/svn/github/jsmoriss/rrssb/trunk/js/rrssb.js rrssb.js
126a127
>           var buttonCountSmall = $('li.small', self).length;
129c130
<           if (buttonWidth > 170 && $('li.small', self).length < 1) {
---
>           if (buttonWidth > 170 && buttonCountSmall < 1) {
135c136
<           if (containerWidth < 200) {
---
>           if ( containerWidth < buttonCountSmall * 20 ) {

js.

@dbox
Copy link
Contributor

dbox commented Jul 11, 2015

Mind pasting a screenshot of what you're doing?
On Fri, Jul 10, 2015 at 5:34 PM JS Morisset [email protected]
wrote:

Actually, I think this may be better. ;-)

$ diff ~/svn/github/jsmoriss/rrssb/trunk/js/rrssb.js rrssb.js
126a127

      var buttonCountSmall = $('li.small', self).length;

129c130

< if (buttonWidth > 170 && $('li.small', self).length < 1) {

      if (buttonWidth > 170 && buttonCountSmall < 1) {

135c136

< if (containerWidth < 200) {

      if ( containerWidth < buttonCountSmall * 20 ) {

js.


Reply to this email directly or view it on GitHub
#128 (comment).

@jsmoriss
Copy link
Contributor Author

Without that change, any single button within a UL of 199px wide or less would turn into a tiny button. Obviously, a tiny button of 199px wide is a bit of a problem. ;-) With this change, the width must be less than "number of small buttons, multiplied by 20" pixels wide. So, if you have 10 buttons, they turn tiny when the container is 200px or less. If you have 1 button, the container must be 20px or less.

As an example, to create a floating sidebar like this, each button is in its own UL of 40px:

http://www.awesomescreenshot.com/088523cvde

js.

@dbox
Copy link
Contributor

dbox commented Jul 11, 2015

Gotcha. Yes. I have a note about this in 2.0. Thanks!!
On Sat, Jul 11, 2015 at 5:45 PM JS Morisset [email protected]
wrote:

Without that change, any single button within a UL of 199px wide or less
would turn into a tiny button. Obviously, a tiny button of 199px wide is a
bit of a problem. ;-) With this change, the width must be less than "number
of small buttons, multiplied by 20" pixels wide. So, if you have 10
buttons, they turn tiny when the container is 200px or less. If you have 1
button, the container must be 20px or less.

As an example, to create a floating sidebar like this, each button is in
its own UL of 40px:

http://www.awesomescreenshot.com/088523cvde

js.


Reply to this email directly or view it on GitHub
#128 (comment).

@jsmoriss
Copy link
Contributor Author

No problem.

BTW, there will soon be an RRSSB plugin available for WordPress as an extension to WPSSO. WPSSO is a social optimization plugin that can provide the RRSSB buttons with correct URLs, titles, descriptions, images, etc. I should have it done in another week or so...

js.

@dbox dbox added the 2.0 label Jul 23, 2015
@dbox
Copy link
Contributor

dbox commented Jul 23, 2015

@jsmoriss Great! We're trying to get 2.0 out the door as well here, so don't know if that will be helpful or not for you.

We just need to port the resizing functions over from 1.x to 2.0 and it should be pretty ready to go. It's a much nicer setup..

@jsmoriss
Copy link
Contributor Author

FYI - I just released WPSSO RRSSB - an RRSSB plugin for WordPress. ;-)

https://wordpress.org/plugins/wpsso-rrssb/

js.

@dbox
Copy link
Contributor

dbox commented Jul 28, 2015

Nice! There will be a lot of happy people.

Maybe a little credit to this repo on the homepage would be nice 😉

@jsmoriss
Copy link
Contributor Author

I was just thinking that - I was pushing to get this plugin out today and need to fill-out some of the details, like credit for the RRSSB css/js stuff. ;-)

js.

@dbox
Copy link
Contributor

dbox commented Jul 28, 2015

Cool. I'll get in in the readme soon.

@dbox
Copy link
Contributor

dbox commented Dec 9, 2015

Happy to accept a pull request if you have this fixed.

@dbox dbox removed the 2.0 label Dec 9, 2015
@jsmoriss
Copy link
Contributor Author

jsmoriss commented Dec 9, 2015

Done. ;-)

js.

@dbox
Copy link
Contributor

dbox commented Dec 9, 2015

Great. Looking now. Thanks!

@dbox dbox closed this as completed Dec 9, 2015
@Marc-pi
Copy link

Marc-pi commented Dec 9, 2015

@dbox, don't forget to update changelog/readme ;-)
great anyway

@dbox
Copy link
Contributor

dbox commented Dec 9, 2015

@Marc-pi which part?

@Marc-pi
Copy link

Marc-pi commented Dec 9, 2015

readme.md we are sticked to 1.8.0 ;-)

@dbox
Copy link
Contributor

dbox commented Dec 9, 2015

Ah yeah. Thanks. I think I"m just going to remove that entirely. It's all available under releases tab:

https://github.com/kni-labs/rrssb/releases

@Marc-pi
Copy link

Marc-pi commented Dec 9, 2015

yes, i use that page also, but i noticed that in package when reading the readme and other files

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

No branches or pull requests

3 participants