view .hgignore @ 7961:34c8cb3198d8

diff: fix 2-way diff panel height Since a jQuery upgrade in commit c225c37c069d, 2-way diff was broken: the height was not correct, and sometimes the source code was shown in gray boxes. Analysis showed that in the invocation of mergely (templates/files/diff_2way.html), '$("#footer").height()' is undefined, in turn caused by the absence of an HTML element with id 'footer'. In jQuery 3.0, the height function returns 'undefined' on empty sets, while it was 'null' in older versions. This is important because in a mathematical expression, 'null' behaves as the number 0, but 'undefined' causes a NaN (not-a-number) result. See: https://jquery.com/upgrade-guide/3.0/#breaking-change-return-values-on-empty-sets-are-undefined The 'id' property on the footer was removed in commit 61c99cdbbfff, retaining only the 'class="footer"'. Fix the problem by using the class-based selector to get the footer height. As the footer height will now be an actual value instead of '0' originally, we can update the calculation without 'magic' values like '36' which was actually a reference to the footer size. When we initialize mergely, the page only contains the header and footer. All window space below the footer can be assigned to the compare panes. The height specified to mergely is thus the total window height minus the header height (the top position of the footer) and the footer height. Note: another change in this context is that jQuery 3.0 can now return non-integer values for .height(), e.g. 138.0345. In the case of 2-way diff, this is not an actual problem. See: https://jquery.com/upgrade-guide/3.0/#breaking-change-width-height-css-quot-width-quot-and-css-quot-height-quot-can-return-non-integer-values
author Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
date Wed, 20 Nov 2019 15:12:23 +0100
parents 17b86a2976ca
children 43d9615facc6
line wrap: on
line source

syntax: glob
*.pyc
*.swp
*.sqlite
*.tox
*.egg-info
*.egg
*.mo
*.orig
*.rej
*.bak
.eggs/
tarballcache/

syntax: regexp
^rcextensions
^build
^dist/
^docs/build/
^docs/_build/
^data$
^sql_dumps/
^\.settings$
^\.project$
^\.pydevproject$
^\.coverage$
^kallithea/front-end/node_modules$
^kallithea/front-end/package-lock\.json$
^kallithea/front-end/theme\.less$
^kallithea/front-end/tmp$
^kallithea/public/codemirror$
^kallithea/public/css/select2-spinner\.gif$
^kallithea/public/css/select2\.png$
^kallithea/public/css/select2x2\.png$
^kallithea/public/css/style\.css$
^kallithea/public/css/style\.css\.map$
^kallithea/public/js/bootstrap\.js$
^kallithea/public/js/dataTables\.bootstrap\.js$
^kallithea/public/js/jquery\.atwho\.min\.js$
^kallithea/public/js/jquery\.caret\.min\.js$
^kallithea/public/js/jquery\.dataTables\.js$
^kallithea/public/js/jquery\.flot\.js$
^kallithea/public/js/jquery\.flot\.selection\.js$
^kallithea/public/js/jquery\.flot\.time\.js$
^kallithea/public/js/jquery\.min\.js$
^kallithea/public/js/select2\.js$
^kallithea\.db$
^test\.db$
^Kallithea\.egg-info$
^my\.ini$
^fabfile.py
^\.idea$
^\.cache$
^\.pytest_cache$
/__pycache__$