arturobernalg opened a new pull request, #576: URL: https://github.com/apache/jspwiki/pull/576
JSPWIKI-1322: the page flashes on reload. The header was `position: fixed`, which takes no space, and `wiki.yoyo` added a spacer of the header's height after the page had loaded. On a reload with cached files the page was painted with the content under the header, and the content moved down about half a second later. The header is now `position: sticky`, so it keeps its space in the page from the first paint, and the spacer is removed. The hide on scroll down and the show on scroll up are unchanged. The rules that set the width of the header in the fixed layout are removed, because the header now takes the width of its container. Measured on master and on this branch, in Chromium, on a reload with cached files, at 1327, 1000, 800 and 500 px wide: the layout shift of the content went from 0.44, 0.54, 0.68 and 0.83 to none. Before, the content moved from y=0 to y=106 (y=69 at 500 px); now it does not move. A smaller shift of the footer remains (0.046 to 0.082), which has another cause that I did not look into. In both versions the header hides when scrolling down and shows when scrolling up, and its left position and width in the fixed layout are the same at 1327, 1000 and 800 px (I tried that layout by changing the class of the container in the page, not through the user preference). Not tested: Firefox, Edge and Safari, the editor and the other templates, the print style, the sticky toolbars of the edit page. No automated test covers this change, and the integration tests were not run. https://issues.apache.org/jira/browse/JSPWIKI-1322 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
