rodneyrehm / viewport-units-buggyfill

Making viewport units (vh|vw|vmin|vmax) work properly in Mobile Safari.
MIT License
1.59k stars 151 forks source link

IE9+, Safari iOS6, viewport units in calc() and other fixes/features. #14

Closed zoltan-dulac closed 10 years ago

zoltan-dulac commented 10 years ago

I have added the following to the buggyfill:

rodneyrehm commented 10 years ago

I haven't forgotten this. I'm just swamped at work and (probably) won't get to it for another couple of days. If you want to push out your blog post linking to your fork for the moment, please do so… sorry for the inconvenience :/

zoltan-dulac commented 10 years ago

Hey Rodney!

Thanks for mailing back. No worries -- I am busy after work this week helping a friend with her wedding site, so it's been crazy for me too. :-)

Let me know when you can, though. Would love to get the post out the door if/when you merge the code in and publicize your work. It's awesome stuff!

Cheers, Z.

On Tue, Jul 15, 2014 at 5:08 AM, Rodney Rehm notifications@github.com wrote:

I haven't forgotten this. I'm just swamped at work and (probably) won't get to it for another couple of days. If you want to push out your blog post linking to your fork for the moment, please do so... sorry for the inconvenience :/

Reply to this email directly or view it on GitHub https://github.com/rodneyrehm/viewport-units-buggyfill/pull/14#issuecomment-49007510 .

Zoltan Hawryluk. Client-side web technology specialist.

e: zoltan.dulac@gmail.com t: @zoltandulac w: http://www.useragentman.com

rodneyrehm commented 10 years ago

I've gotten the first two hours of review into it… track the progress in the refactoring-pr-14 branch.

After I'm done with the trivial stuff, I'll try to extract the hacks into a file that needs to be loaded individually. separation of concerns and all…

zoltan-dulac commented 10 years ago

Hey Rodney,

Cool! Thanks dude! Much appreciated!

Z. On Jul 25, 2014 2:37 PM, "Rodney Rehm" notifications@github.com wrote:

I've gotten the first two hours of review into it... track the progress in the refactoring-pr-14 branch https://github.com/rodneyrehm/viewport-units-buggyfill/tree/refactoring-pr-14.

After I'm done with the trivial stuff, I'll try to extract the hacks into a file that needs to be loaded individually. separation of concerns and all...

Reply to this email directly or view it on GitHub https://github.com/rodneyrehm/viewport-units-buggyfill/pull/14#issuecomment-50187627 .

rodneyrehm commented 10 years ago

except for the examples directory I think I'm through. I've fixed code style, linting errors and refactored your hacks into their own file. How the hacks make their way into viewport-units-buggyfill isn't exactly pretty, but it's still nicer than having the hacks amidst the other code.

What do you think? Do your tests still work? (currently no iOS/IE available…)

zoltan-dulac commented 10 years ago

Hey Rodney

Thanks for doing this. I am going to check when I get home tonight. I'll let you know. In any case, I really appreciate you doing this. Much appreciated.

Z. On Jul 27, 2014 4:41 PM, "Rodney Rehm" notifications@github.com wrote:

except for the examples directory I think I'm through. I've fixed code style, linting errors and refactored your hacks into their own file. How the hacks make their way into viewport-units-buggyfill isn't exactly pretty, but it's still nicer than having the hacks amidst the other code.

What do you think? Do your tests still work? (currently no iOS/IE available...)

Reply to this email directly or view it on GitHub https://github.com/rodneyrehm/viewport-units-buggyfill/pull/14#issuecomment-50285096 .

zoltan-dulac commented 10 years ago

I think it may need a little refactoring to make it work right -- give me a few days to look into it.

Thanks a lot Rodney!

Z.

On Sun, Jul 27, 2014 at 5:06 PM, Zoltan Hawryluk zoltan.dulac@gmail.com wrote:

Hey Rodney

Thanks for doing this. I am going to check when I get home tonight. I'll let you know. In any case, I really appreciate you doing this. Much appreciated.

Z. On Jul 27, 2014 4:41 PM, "Rodney Rehm" notifications@github.com wrote:

except for the examples directory I think I'm through. I've fixed code style, linting errors and refactored your hacks into their own file. How the hacks make their way into viewport-units-buggyfill isn't exactly pretty, but it's still nicer than having the hacks amidst the other code.

What do you think? Do your tests still work? (currently no iOS/IE available...)

Reply to this email directly or view it on GitHub https://github.com/rodneyrehm/viewport-units-buggyfill/pull/14#issuecomment-50285096 .

Zoltan Hawryluk. Client-side web technology specialist.

e: zoltan.dulac@gmail.com t: @zoltandulac w: http://www.useragentman.com

zoltan-dulac commented 10 years ago

Hey Rodney

Sorry I've been incommunicado about this in the last few weeks. My mother fell ill and I had to put my life on hold while I took care of her.

Things are back to normal now, so I'll be looking at this this week, if that is okay with you. Again -- apologies about not saying anything earlier. I am serious about getting this thing done.

Cheers Zoltan.

On Sun, Jul 27, 2014 at 11:10 PM, Zoltan Hawryluk zoltan.dulac@gmail.com wrote:

I think it may need a little refactoring to make it work right -- give me a few days to look into it.

Thanks a lot Rodney!

Z.

On Sun, Jul 27, 2014 at 5:06 PM, Zoltan Hawryluk zoltan.dulac@gmail.com wrote:

Hey Rodney

Thanks for doing this. I am going to check when I get home tonight. I'll let you know. In any case, I really appreciate you doing this. Much appreciated.

Z. On Jul 27, 2014 4:41 PM, "Rodney Rehm" notifications@github.com wrote:

except for the examples directory I think I'm through. I've fixed code style, linting errors and refactored your hacks into their own file. How the hacks make their way into viewport-units-buggyfill isn't exactly pretty, but it's still nicer than having the hacks amidst the other code.

What do you think? Do your tests still work? (currently no iOS/IE available...)

Reply to this email directly or view it on GitHub https://github.com/rodneyrehm/viewport-units-buggyfill/pull/14#issuecomment-50285096 .

Zoltan Hawryluk. Client-side web technology specialist.

e: zoltan.dulac@gmail.com t: @zoltandulac w: http://www.useragentman.com

Zoltan Hawryluk. Client-side web technology specialist.

e: zoltan.dulac@gmail.com t: @zoltandulac w: http://www.useragentman.com

rodneyrehm commented 10 years ago

Send your mother my best! No worries, I'm not exactly getting bored because of delayed feedback ;)

zoltan-dulac commented 10 years ago

Hey Rodney.

Sorry for the huge delay on getting back to you on your refactored code. I have had a lot of catch up to do because of my busy schedule, but I finally got back to this, looked at the code and made the necessary changes to make sure things are all working correctly in IE9-10 land.

I have sent a whole new pull request for this, based on changes in the official repo's refactoring-pr-14 branch that you sent back to me. The old pull request can be ignored if this is merged. I hope this is not confusing -- I am still new-ish to git and didn't know a better way of handling this.

There are only a few small things I changed from your refactored JS:

1) I changed the hack plugin code to allow viewport units to work correctly in visual filters .. this was working originally, but you took out a regex match that broke it (I assume this was to optimize the code, but IE really needs it).

2) I changed the main buggyfill JS to check for a bad version of IE (that is to say, IE < 10), and force the buggyfill to do it's thing even if the hack is not loaded. This is important, because IE9-10 do some strange things with vh and vw and fonts sometimes, so it is quite a valid use case to do this.

3) I also made a change to force IE9-10 to listen for the resize event in the main buggyfill script. This was taken out during the refactor, so I put it back in.

Things that I put into place, but think you should know about:

Anyways -- I hope you can accommodate my changes into the main branch of your repo. Let me know what you think. In even event, I really appreciate you looking into it. As soon as you publish your changes, I'll post my blog post (I just have to make some small changes to it to reflect the changes you made here).

Also: again -- thanks a lot for your script. As I said, I have used it in production sites and it works really well.

Cheers, Z.

On Mon, Aug 11, 2014 at 11:27 AM, Rodney Rehm notifications@github.com wrote:

Send your mother my best! No worries, I'm not exactly getting bored because of delayed feedback ;)

Reply to this email directly or view it on GitHub https://github.com/rodneyrehm/viewport-units-buggyfill/pull/14#issuecomment-51795716 .

Zoltan Hawryluk. Client-side web technology specialist.

e: zoltan.dulac@gmail.com t: @zoltandulac w: http://www.useragentman.com

rodneyrehm commented 10 years ago

Hey Zoltan, no worries, life is crazy. Hope everything worked out for you!

I haven't seen a new PR for the refactoring-pr-14 branch. I'm happy to look at it after I get back from Reasons :)

zoltan-dulac commented 10 years ago

hey there!

I hope Reasons was fun. Looks like an awesome conference.

I created a new pull request (not the same branch bit has all the changed you made from that branch). Should I create a new pull request with that branch instead?

Sorry for the confusion. As I have mentioned, I am still fairly new to git, so I may not be doing things the usual or most optimal way.

Let me know, Z. On Aug 31, 2014 5:18 AM, "Rodney Rehm" notifications@github.com wrote:

Hey Zoltan, no worries, life is crazy. Hope everything worked out for you!

I haven't seen a new PR for the refactoring-pr-14 branch https://github.com/rodneyrehm/viewport-units-buggyfill/tree/refactoring-pr-14. I'm happy to look at it after I get back from Reasons http://reasons.to/ :)

Reply to this email directly or view it on GitHub https://github.com/rodneyrehm/viewport-units-buggyfill/pull/14#issuecomment-53982350 .

rodneyrehm commented 10 years ago

yep send a PR for the refactoring-pr-14 branch :)

zoltan-dulac commented 10 years ago

Hey Rodney.

Sorry for the delay ... I submitted the pull request. There seems to be some conflicts, and I can't see where they are on github. I can't imagine them being huge .. my changes were pretty small. Let me know if this is an issue -- want to make this right.

Cheers, Z

Cheers, Zoltan.

On Wed, Sep 3, 2014 at 4:20 AM, Rodney Rehm notifications@github.com wrote:

yep send a PR for the refactoring-pr-14 branch :)

Reply to this email directly or view it on GitHub https://github.com/rodneyrehm/viewport-units-buggyfill/pull/14#issuecomment-54265445 .

Zoltan Hawryluk. Client-side web technology specialist.

e: zoltan.dulac@gmail.com t: @zoltandulac w: http://www.useragentman.com

rodneyrehm commented 10 years ago

Hey Zoltan,

no problem! I'll look at the changes shortly (maybe today, maybe Tuesday…). I'm closing this issue and moving the conversation to #16 - thanks! :)