-
Notifications
You must be signed in to change notification settings - Fork 93
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
Fix: Sidebar height calculation #1158
base: skosmos-2
Are you sure you want to change the base?
Conversation
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Codecov Report
@@ Coverage Diff @@
## master #1158 +/- ##
=========================================
Coverage 67.97% 67.97%
Complexity 1584 1584
=========================================
Files 32 32
Lines 3888 3888
=========================================
Hits 2643 2643
Misses 1245 1245 Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's some sharp eye @danmichaelo 👏
Here's a zoomed-in view of https://dev.finto.fi/ysapaikat/en/page/Y169060?clang=fi (in XFCE/Ubuntu, ALT + Mouse scroll gives you control over monitor zoom).
Then applying your JavaScript changes locally with the following script in the browser console:
var pixels = $('.nav-tabs').outerHeight();
if ($('#sidebar > .pagination').is(':visible')) { pixels += $('.pagination').outerHeight(); }
$('.sidebar-grey').attr('style', pixels)
Worked for me on Firefox + Ubuntu. Might be good to check the other browsers perhaps, but using outerHeight
sounds like the right approach, instead of using a 2px
buffer 👍 (probably could use 100vh - $var
too)
Bruno
Actually I don't have that good eyes 😆 I realize that my description above was a bit brief – I forgot to mention that the problem was that the extra height causes a scrollbar on pages that should not have a scrollbar (only when using the alphabetical tab): That the patch also removes the extra padding on the hierarchical tab was just a lucky side effect 😄 I tested the following snippet in the browser console in Firefox, Chrome and Safari on Mac now:
Seems to give a tight fit on both the alphabetical and hierarchical tab 👍 |
The sidebar is a few pixels too high when the alphabetical list is active, due to the padding of the div containing the letters. This should fix it.