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

Footer/header/navbar FAQ #21

Closed
pgaskin opened this issue Sep 21, 2019 · 10 comments
Closed

Footer/header/navbar FAQ #21

pgaskin opened this issue Sep 21, 2019 · 10 comments
Assignees
Labels
docs Category: Relates to the documentation. enhancement Type: Improvement (but not a new patch or update).

Comments

@pgaskin
Copy link
Owner

pgaskin commented Sep 21, 2019

There are at least 5 different patches about this, and it's not clear (even to me) what they all do. Let's collect some notes here which can be turned into a FAQ.

cc @jackiew1

@pgaskin pgaskin added the enhancement Type: Improvement (but not a new patch or update). label Sep 21, 2019
@jackiew1
Copy link
Collaborator

Re: height of header/footer I think there now needs to be only 2 patches (nickel.yaml)

  1. GeoffR: Reduce top/bottom page spacer
  2. jackie_w: Reduce new header/footer height
    Both are customisable to single pixel level, so when it comes to perceived "wasted vertical whitespace" everyone should be able to find an option to suit if they make the effort.

You can enable either, neither or both of patch 1 & 2.

  1. controls the height of the header/footer when the user sets to OFF Chapter progress and Book progress respectively.
  2. controls the height of the header/footer when the user sets to not-OFF Chapter progress and Book progress respectively.

a) An only-fullpage-reading-will-do user, who always sets both to OFF only needs to enable patch 1.
b) A user who likes to have both header & footer ON, but thinks they're a bit too tall, only needs to enable patch 2.
c) A user who wants header or footer ON, but not both, and who wants to minimise space taken up by the one that's OFF should enable both.
d) A user who's not sure yet but thinks the default header & footer are too tall - same as c)

@pgaskin
Copy link
Owner Author

pgaskin commented Sep 21, 2019

I think I've figured out how the different spacing patches and header/footer options interact. I'm working on an interactive demo to show what it looks like.

@pgaskin
Copy link
Owner Author

pgaskin commented Sep 22, 2019

@NiLuJe
Copy link
Collaborator

NiLuJe commented Sep 22, 2019

I don't recall if the spacer patch actually affects anything when the header/fotter is shown, but, otherwise, yeah, that's the idea.

I do have a bit of a cropping issue with the patched full-screen setup, though:

hdrftrptch

(Granted, that could theoretically happen in Nickel at one time, but I think those days are mostly gone ;p).

@pgaskin
Copy link
Owner Author

pgaskin commented Sep 22, 2019

I don't recall if the spacer patch actually affects anything when the header/fotter is shown, but, otherwise, yeah, that's the idea.

I did it by eye (with an ordinary book, not the margin test one), and it seemed to have a small difference, but looking again, I think you're right. I'll fix that.

I do have a bit of a cropping issue with the patched full-screen setup, though

Yes, that's an issue, as I did the page body the lazy way by clipping, instead of using proper CSS columns and overflow tricks. I'll see if there's a simple way to fix it without losing compatibility or consistency too much.

@NiLuJe
Copy link
Collaborator

NiLuJe commented Sep 22, 2019

The debug option that displays the widget regions and names was mildy useful (and/or at least entertaining to watch) when we had to go digging for the spacer the first time around ;).

(I think that's ShowLayoutRectangles in FeatureSettings. Or possibly ShowWidget in DeveloperSettings. Or actually each does what it says on the tin and I was thinking of both enabled ;p).

I think it also dumps a bunch of extra stuff to the syslog (unless that's yet another debug option ;p).

@jackiew1
Copy link
Collaborator

When I was testing I noticed that after the initial reboot after patching if I opened my previous book there were sometimes weird issues with cutoff but once I paged across a chapter boundary (or opened a new book) everything sorted itself out. I've paged through both an epub and a kepub and am not seeing any cutoffs - no matter whether header or footer are ON/OFF.

P.S. I don't have time for a long discussion now, it's 01:30 and I'm old.

pgaskin added a commit that referenced this issue Sep 22, 2019
* Used CSS columns so lines aren't clipped.
* Fixed conditions for when spacers are shown.
* Added short patch/option descriptions.
* Renamed based on minimum version for future-proofing.
@pgaskin
Copy link
Owner Author

pgaskin commented Sep 22, 2019

@NiLuJe I've fixed everything (and made some other improvements). The new URL is: https://pgaskin.net/kobopatch-patches/hdrftrptch-13651.html.

@jackiew1 I'm probably going to make a release now.

pgaskin added a commit that referenced this issue Sep 22, 2019
* Smaller sans-serif font for header/footer.
* Slightly larger line spacing to make it easier to see the difference.
* Also made it easier to see which patches are enabled.
@NiLuJe
Copy link
Collaborator

NiLuJe commented Sep 22, 2019

@jackiew1: Yep, the first thing shown when opening a book being a cached render vaguely rings a bell ;).

@geek1011: 👍

Sidebar re: the progress bar: From the very quick glance I took at it, it shouldn't affect page layout at all (it's effectively an overlay, you can check on a cover page, you'll be able to see a few lines of the image below the bar).

@pgaskin
Copy link
Owner Author

pgaskin commented Sep 22, 2019

@NiLuJe That's why I used absolute positioning instead of having it part of the flexbox layout.

@pgaskin pgaskin added the docs Category: Relates to the documentation. label Oct 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Category: Relates to the documentation. enhancement Type: Improvement (but not a new patch or update).
Projects
None yet
Development

No branches or pull requests

3 participants