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

Isis fix for safari bug #5970 #7185

Closed
wants to merge 10 commits into from
Closed

Isis fix for safari bug #5970 #7185

wants to merge 10 commits into from

Conversation

dgrammatiko
Copy link
Contributor

This PR drops the current custom code for sticking the two top toolbars together and instead use the already loaded bootstrap script!

Should work with all browsers but the idea was to fix #5970 and safari!

@wilsonge If this gets merged you got a nice conflict with 3.5-dev ???? Sorry!

@losedk @JoomliC and anyone with safari ever experienced this glitch can you give this a test?

@peterlose
Copy link
Contributor

Seems to fix the problem :)

However noticed two things. The affix kicks in immediately on scroll and when clicking on menu items in the sidebar menu it jumps a bit

@dgrammatiko
Copy link
Contributor Author

@losedk So I fixed a bug by introducing another one? 😃
For me the instant effect is not a problem and the jump of the sidebar is really unnoticeable...

@peterlose
Copy link
Contributor

Hehe 😄 Wouldn't call them bugs, just minor issues. But let's get some people to test :)

@dgrammatiko
Copy link
Contributor Author

@losedk actually this is a problem caused by safari’s rubber band, all other browsers are totally fine (with or without this PR). But also I think is better to use already loaded scripts (bootstrap) instead of writing our own custom ones.
And also with this PR you will never end up with a messed up screen

@peterlose
Copy link
Contributor

@dgt41 Ahh okay, I didn't know that. I totally agree that it's much better to use the native BS.

@dgrammatiko
Copy link
Contributor Author

@infograf768 JM can you test this with com_localize as I am touching the sidebar script here and AFAIK there were some compatibility issues when sidebar was introduced. Thanks

@infograf768
Copy link
Member

@dgt41
Will do asap.

@infograf768
Copy link
Member

@dgt41
Looks like it's fine in com_localise.

@zero-24
Copy link
Contributor

zero-24 commented Jun 19, 2015

RTC based on Tests by @losedk and @infograf768 Thanks 😄


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/7185.

@zero-24 zero-24 added the RTC This Pull Request is Ready To Commit label Jun 19, 2015
@dgrammatiko
Copy link
Contributor Author

I just found another less intruding way to solve this:

html {
height: 100%;
}

That will not require a change for our scripts here

@wilsonge
Copy link
Contributor

From a technical perspective I'd imagine it's better to use the bootstrap affix though than hack it ourselves and then add in fixes when the functionality already exists? I mean I'd rather get it right than bug fix the hacks :P

@dgrammatiko
Copy link
Contributor Author

Apart from the wrong decision to affix also the sidebar (that’s a big change from the previous behavior and also is buggy), I totally agree with you.

@infograf768
Copy link
Member

@test
Still OK here for core and com_localise.

@brianpeat
Copy link
Contributor

Seems to fix the issue for me in 2 sites once I remembered to clear my cache.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/7185.

@brianteeman
Copy link
Contributor

Multiple good tests setting to RTC

@wilsonge would be good to get this into 3.4.2


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/7185.

@wilsonge wilsonge added this to the Joomla! 3.4.2 milestone Jun 24, 2015
@rdeutz rdeutz modified the milestones: Joomla! 3.4.3, Joomla! 3.4.2 Jun 28, 2015
@dgrammatiko
Copy link
Contributor Author

@rdeutz Robert are there any particular reasons to postpone this for 3.4.3?

@Bakual
Copy link
Contributor

Bakual commented Jun 29, 2015

We only fix critical things during an RC. As far as I understood this is only a minor visual thing.

@brianpeat
Copy link
Contributor

I would not consider this minor. There are times when I am completely unable to get to buttons because the header never expands. It's enough to make me almost want to stop using Safari because at times the admin screens are unusable (can't name something, can't access the New button, etc).

@dgrammatiko
Copy link
Contributor Author

@Bakual Fair enough, I just guessed since we have this fix that annoy a lot of people maybe we could also include that as well.

@mbabker
Copy link
Contributor

mbabker commented Jun 29, 2015

@dgt41 IMO this is a step backwards as now we again have the jumping subnav bar.

@dgrammatiko
Copy link
Contributor Author

@mbabker jumping? You mean the animation is not as smooth as it was or you get some other glitch?

@mbabker
Copy link
Contributor

mbabker commented Jun 29, 2015

No animation at all, just jumps... http://cl.ly/0s0v0i0e0S17

@zero-24 zero-24 modified the milestones: Joomla! 3.4.3, Joomla! 3.4.4 Jul 2, 2015
We use css3 transition for this.
IE8,9 will work without animation:
http://caniuse.com/#search=transition
(this also goes for the sidebar)
@dgrammatiko
Copy link
Contributor Author

I do not quite agree with @mbabker that this is a step backwards, but I also realize that a better animation can be applied here. So with the latest commit I try to follow the same route Joomla did with sidebar: use css3 transition.

I would like to ask if you agree with this animation or if it is too long/short?
So @losedk @mbabker @brianpeat @infograf768 your feedback here is essential, Thanks

@mbabker
Copy link
Contributor

mbabker commented Jul 4, 2015

The animation is only triggering for me in Safari; Chrome and Firefox still just jump.

So here's why I say it's a step backwards. Right now, for the most part, the toolbar smoothly scrolls with the page and affixes when it reaches the target point. With this PR applied, scrolling one pixel causes it to jump up to its affixed spot. So in fixing an issue for one case, we're introducing a less than optimal behavior for another case.

FWIW, this same JavaScript logic is in use on the Bootstrap based joomla.org template and there I can't duplicate the behavior in Safari of the page content not being below the second toolbar (in the .org case it's the site menu). Actually, when the page loads "properly", unpatched I see the body contents get pushed down during rendering in the Joomla admin, but the .org sites I tested against (API which is using pure HTML and an unaltered Bootstrap source and Developer which is a CMS install) don't exhibit the same behaviors.

@dgrammatiko
Copy link
Contributor Author

The problem is that the current script used in Isis is somehow conflicting with the bootstrap collapse for the same toolbar. If you remove the collapse from the subhead everything works nicely. I think we have many competing scripts (sidebar, collapse, affix) and somehow there is an interference as all of them trying at the same time to calculate the save values e.g. height, width

@mbabker
Copy link
Contributor

mbabker commented Jul 4, 2015

Without redesigning the whole top section I don't see there being a good fix for this whole thing. Either something has to stop being affixed or we have to deal with rather ugly behaviors on scroll.

@dgrammatiko
Copy link
Contributor Author

@mbabker I will agree on that redesign! Anyways I gave it one more try fixing FF,chrome,opera,IE11 animation

@dgrammatiko
Copy link
Contributor Author

@mbabker messing around with the old script I found a root of the problem, so indeed we don’t have to drop the old script. Here it is:

            function processScroll()
            {
                if ($('.subhead').length) {
                    var scrollTop = $(window).scrollTop();
                    if (scrollTop >= navTop && !isFixed) {
                        isFixed = true;
                        $('.subhead').addClass('subhead-fixed');

                        // Fix the container top
                        $(".container-main").css("top", $('.subhead').offset().top + $('nav.navbar').height());
                    } else if (scrollTop <= navTop && isFixed) {
                        isFixed = false;
                        $('.subhead').removeClass('subhead-fixed');
                    }
                }
            }

@dgrammatiko
Copy link
Contributor Author

OK I am gonna leave the decision to PLT if they want to merge this or #7342 which solves the problem with the old script 😃

@cyrezdev
Copy link
Contributor

cyrezdev commented Jul 7, 2015

It is not having the expected behavior for me (just tested on FF), and with issue on mobile device (the last pixel up render smaller toolbar buttons)...
In the same time, #7342 is working nice, and don't change the behavior (i understand your goal with this PR, but not sure it's an easy job to introduce it in Isis (and not yet working with fluidity), or to keep some new stuff for a future new admin template ;-) )


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/7185.

@wilsonge
Copy link
Contributor

wilsonge commented Jul 7, 2015

As this still seems buggy for people and as metioned #7342 is working ok. going to close this for #7342 - because at the end of the day we need something that works.

@wilsonge wilsonge closed this Jul 7, 2015
@zero-24 zero-24 removed this from the Joomla! 3.4.4 milestone Jul 7, 2015
@dgrammatiko dgrammatiko deleted the _isis_second_navbar_stacked branch August 14, 2015 16:28
@zero-24 zero-24 removed the RTC This Pull Request is Ready To Commit label Oct 14, 2015
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.

Sidebar animation gets stuck