Problem/Motivation

Pages wraps more and more as the page number gets higher.

First page:

Third page:

Sixth page:

Further pages did not wrap more, I tried up to page 22 :)

Steps to reproduce

This happens on hojtsy.hu, I assume it is not special to the site since I don't have any customization to Olivero yet.

Proposed resolution

Don't wrap the pager. Not sure how though.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Issue fork drupal-3420866

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Gábor Hojtsy created an issue. See original summary.

mherchel’s picture

Status: Active » Postponed (maintainer needs more info)
StatusFileSize
new90.58 KB

I can't reproduce this with out of the box Drupal. When I look at your site, I do see the issue, but the markup is changed a bit (not sure what's doing it). There's also a sidebar block that's displaying empty markup. That might be related.

Not sure how to troubleshoot this, because I can't reproduce. Ping me in slack and we can figure out time to troubleshoot.

gábor hojtsy’s picture

Status: Postponed (maintainer needs more info) » Active

The only block I have in the sidebar is the book navigation block. Eg. https://www.hojtsy.hu/blog/2013-jul-17/drupal-8-multilingual-tidbits-8-t... shows that in action. Its not very well styled, but that is another question :)

Seems like on pages like the front page where there is no book navigation this still produces some whitespace which makes Olivero think there is a sidebar. I think that in itself is a bug. (But this also means that if there is a sidebar, the pager will not be styled properly?)

mherchel’s picture

I think that in itself is a bug.

Yeah, I agree with that. If you disable that block, does it fix the pager issue?

gábor hojtsy’s picture

Title: Olivero pager wraps more and more as active page number is higher » Olivero pager wraps more and more as active page number is higher if there is a sidebar

The pager is good when I disable the sidebar block. So I think there are two bugs:

(1) the pager wraps when there is a sidebar block
(2) there looks like whitespace produced from block templates that the main page template thinks is sidebar content

gábor hojtsy’s picture

It seems like the Olivero book navigation template override attaches the olivero book library (hah, get it? book library!) even if there is no book tree to display. That may result in some whitespace left around from there? I don't have enough experience to know how whitespace is handled in templates.

shweta__sharma’s picture

Status: Active » Needs work
StatusFileSize
new128.42 KB

I can confirm this issue when placing any block in the side-bar region the pager wrapped up in the next line.

image

Unsetting the flex-wrap to flex-wrap: nowrap; fixed the issue.

Gauravvvv made their first commit to this issue’s fork.

gauravvvv’s picture

Status: Needs work » Needs review
shweta__sharma’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new138.39 KB
new179.69 KB

Tested the MR 6591 and it worked fine the pager did not wrap into the next line even if there is a sidebar.

Attached Before/After screenshots

Thanks

gábor hojtsy’s picture

How does this look with a tall sidebar? I am not well versed enough in CSS flex to tell sorry :)

mherchel’s picture

Status: Reviewed & tested by the community » Needs work

The current patch needs a different approach. The pager needs to wrap if 1) narrow viewport or 2) user zooms in where the items would otherwise be off the screen. In addition, @Gábor Hojtsy is right that the pager needs to accommodate a sidebar that can potentially have more content than the main region.

@Gábor Hojtsy refers to two issues

(1) the pager wraps when there is a sidebar block
(2) there looks like whitespace produced from block templates that the main page template thinks is sidebar content

However, I'm not sure if we can resolve the first issue because the pager does not know how much content is in the sidebar region. If it overflows, it has to wrap. If the pager were in its own block, we could move it to a different full-width region, but that's not the case.

The main issue here is that we need to make sure that the region markup does not output when content is not present.

mherchel’s picture

Also Happy Valentines Day everyone! ♥️

gábor hojtsy’s picture

Some out of the box ideas is if the pager can hide some items towards the end if it would be too wide? Or it can be more tight (less click/touch space) if the space is not enough due to sidebar? The region output IMHO would be its own issue, should I open that one as well?

gábor hojtsy’s picture

mherchel’s picture

StatusFileSize
new196.44 KB

I'm pretty sure the root of the region output issue appears to be #953034: [meta] Themes improperly check renderable arrays when determining visibility, although there are likely ways to work around this.

I'm still not able to reproduce the wrapping issue though. I even set up book, and got the extra element in there, but no wrapping happened.

shweta__sharma’s picture

Try generating more nodes and check maybe it could be the reason why you are not replicating the wrapping issue.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.

quietone’s picture

Title: Olivero pager wraps more and more as active page number is higher if there is a sidebar » pager wraps more and more as active page number is higher if there is a sidebar
Status: Needs work » Postponed

The Olivero theme was approved for removal in #3590816: [policy, no patch] Deprecate Olivero and move to contrib.

This is Postponed. The status is set according to two policies. The Remove a core extension and move it to a contributed project and the Extensions approved for removal policies.

The deprecation work is in #3595082: [meta] Tasks to deprecate the Olivero theme and the removal work in #3595085: [meta] Tasks to remove the Olivero theme.

quietone’s picture

Project: Drupal core » Olivero
Version: main » 2.0.0
Component: Olivero theme » Code
Status: Postponed » Needs work
quietone’s picture

Version: 2.0.0 » 2.x-dev