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

Stick kiwixNav on top #896

Merged
merged 3 commits into from Mar 6, 2023
Merged

Stick kiwixNav on top #896

merged 3 commits into from Mar 6, 2023

Conversation

juuz0
Copy link
Collaborator

@juuz0 juuz0 commented Feb 11, 2023

Fixes #883

@codecov
Copy link

codecov bot commented Feb 11, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (973ac28) 72.00% compared to head (f838314) 72.00%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #896   +/-   ##
=======================================
  Coverage   72.00%   72.00%           
=======================================
  Files          54       54           
  Lines        3751     3751           
  Branches     2096     2096           
=======================================
  Hits         2701     2701           
  Misses       1048     1048           
  Partials        2        2           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Collaborator

@kelson42 kelson42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@juuz0 LGTM. TXH!

@kelson42
Copy link
Collaborator

@juuz0 Don't worry if this is not merged straight. We want to merge #846 first.

Copy link
Collaborator

@veloman-yunkan veloman-yunkan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On narrow screens the topbar section's use of the screen space is quite uneconomic:
Screenshot from 2023-02-16 15-40-46
Making the topbar sticky worsens the situation.

I propose that on narrow screens

  1. the topbar's vertical space usage is fixed and
  2. the topbar is autohidden while scrolling (similar to how ZIM viewer's toolbar behaves).

@kelson42
Copy link
Collaborator

@juuz0 Any feedback on @veloman-yunkan request? This PR is part of the next milestone and have only a few tickets left. Therefore we should move forward quickly on this. If you could rebase, that woukd be great as well.

@juuz0
Copy link
Collaborator Author

juuz0 commented Feb 26, 2023

Sorry I totally missed this review comment while working on other PR, doing it ASAP

@kelson42
Copy link
Collaborator

kelson42 commented Feb 26, 2023

@juuz0 Thx! Github provides great notification features. I recommend to any Kiwix dev to put attention on this. If you don't do this, then this just slows down artificially the whole development process and create additional work load to others (like you know, it is not really the role of the CTO or any other dev to chase a colleague so he communicates transparently about his own work).

@juuz0
Copy link
Collaborator Author

juuz0 commented Feb 26, 2023

like you know, it is not really the role of the CTO or any other dev to chase a colleague so he communicates transparently about his own work

Understandable. Apologies.

@juuz0
Copy link
Collaborator Author

juuz0 commented Feb 26, 2023

There's a style issue, tiles go to the left while scrolling for no reason..Investigating

Edit: done.

Copy link
Collaborator

@veloman-yunkan veloman-yunkan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The UI language selector button and OPDS feed link button have disappeared.

@juuz0
Copy link
Collaborator Author

juuz0 commented Feb 27, 2023

The UI language selector button and OPDS feed link button have disappeared.

I put them inside kiwixNav element now.

static/skin/index.js Outdated Show resolved Hide resolved
static/skin/index.js Outdated Show resolved Hide resolved
if (st > previousScrollTop) {
kiwixNav.style.position = 'fixed';
kiwixNav.style.top = '-100%';
document.querySelector('.kiwixHomeBody').style.width = '100%';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you need this line here? Is the width of kiwixHomeBody element set dynamically to something else somewhere else?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think (and have checked) it's dynamically set anywhere. But still, when I remove kiwixNav all the list, gets shifted to the left on scrolling. Checking through inspector, the width is reduced hence the line.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't it be set in the CSS instead?

Copy link
Collaborator Author

@juuz0 juuz0 Mar 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right. It can be done in CSS & should've been done there only. Thank you.
At such moments, I realise I shouldn't haste.

The filters menu will always stay on top now.
No pre defined height for devices with with max-width 590px now. The previous height took a good amount of space on some devices.
Since kiwixNav is sticky for larger screens now, the tiles area on mobile devices is incredibly low.
This change hides kiwixNav if the screen is scrolled.
@veloman-yunkan veloman-yunkan merged commit 32b4bca into main Mar 6, 2023
@veloman-yunkan veloman-yunkan deleted the stickyNav branch March 6, 2023 11:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

kiwix-serve welcome page filter bar should be sticky/frozen
3 participants