-
Notifications
You must be signed in to change notification settings - Fork 9
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
Improve loading speed and browser compatibility #26
Conversation
colemanw
commented
Dec 9, 2018
- Store menu data in localCache for performance
- Cache rendered markup and add to the dom asap to prevent flash with no menu
- Fix some race conditions when loading and rendering the menu
- Fix quicksearch icon and width in older browsers
b0ccb58
to
4c42740
Compare
@christianwach this stabilizes the height adjustment on WP and other systems. The only time the height doesn't adjust now is when the quicksearch box temporarily pushes the menu to a 2nd line, but IMO that's acceptable and maybe even desirable, as the user is focused on interacting with the quicksearch box in that moment and doesn't need to be distracted by other page content shifting around. As soon as that box loses focus the menu snaps back to its original size and all should be well. But the main thrust of this PR is blazingly fast render speeds to avoid any jumpiness when navigating between pages. @andrewpthompson can you try this out one more time on your array of browsers and CMSs - I think we're ready to cross the finish line on this one. |
@colemanw Here are my results of re-testing of the updated #26 on Joomla 3.9.1 using Firefox 63 (Windows 10 + Fedora 28 KDE), Chrome 70 (Windows), Edge 42, IE 11. Flash during page load - now pretty darn good:
Quick search:
|
@colemanw Sorry one more trivial thing I noticed on IE11. On a Civi page that is big enough to need scrolling, the scrollbar is invisible (auto-hides) until the mouse is moved. Problem is that the scroll bar is then on top of the KAM's 'Adjust menu position' icon so it then becomes slightly awkward to click on 'Adjust menu position'. In other words, if you move the mouse to go to click on the icon the scrollbar decides to appear and gets (mostly) in your way. |
Thanks again for the testing @andrewpthompson - since we're now down to trivial stuff I'm going to merge this and release another beta so it gets more exposure. I haven't been able to reproduce that icon issue, and I'll hop back on IE11 tomorrow to see if I can reproduce the scrollbar problem. Could be Joomla-specific. |
@colemanw Great work :) Disregard the icon issue. That was my fault - I had Shoreditch installed, which caused it. Also at one point I thought that IE and Edge were not expanding the Quick Search box but I just re-tested more thoroughly and can't reproduce it now. |
@andrewpthompson yes Shoreditch will need to be updated. I've filed civicrm/org.civicrm.shoreditch#342 |