Postponed
Project:
Drupal core
Version:
main
Component:
Olivero theme
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
7 Jun 2023 at 15:53 UTC
Updated:
19 Aug 2026 at 09:59 UTC
Jump to comment: Most recent, Most recent file

Comments
Comment #2
xenophyle commentedComment #3
sharkbaitdc commentedInitial pass at converting the pager for sdc
Comment #4
xenophyle commentedComment #5
xenophyle commentedComment #6
mherchelThanks for all of the work on this! Initial review below:
Lets get rid of the schema, status, and group keys here.
There's no pager block, so this is not needed
Lets keep these comments within the pager.html.twig
Need to use spaces not tabs.
Lets 1) convert this to a twig function, and 2) bring all of the pager's images into the component and reference them using componentMetadata.
Need to use spaces not tabs.
Since we're not using any blocks here, let's use an include function.
Comment #7
dieterholvoet commentedComment #8
gauravvvv commentedAddressed feedbacks from #6, attached interdiff for same. please review
Comment #9
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
This does not mean that the patch needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #10
_utsavsharma commentedTried to fix failures in #8.
Comment #13
ahsannazir commentedComment #14
vishal choudharyUsing this MR: https://git.drupalcode.org/project/drupal/-/merge_requests/8768 Comment !12
In this scenario, I have created two nodes and a view to show a node using a pager.
After saving the view go to the page URL and show the Output like that
Screenshot Attached:
To See this Output May be Moved to RTBC
Thanks.
Comment #15
catchOne question on the MR.
Comment #16
catchLooks like the library definition still needs updating too.
Comment #17
ahsannazir commentedComment #18
smustgrave commentedAppears to have multiple test failures.
Comment #19
johnvComment #20
ignaciofarre commentedFirst-time contributor - Refactoring the pager component
Hi, this is my first time contributing to Drupal. 😊
This patch includes updates to the pager.component.yml and pager.twig files
If there’s anything I’ve done incorrectly or any feedback you have, please let me know. Thank you!
Comment #25
ignaciofarre commentedComment #26
smustgrave commentedHello and thanks for the first time contribution.
So with all issues they should use the standard issue template, the template that's there when you create a new ticket. Even if sections aren't relevant like API change leave it and put a NA under it.
Will probably need SDC maintainer eyes, will ping them.
Comment #27
pdureau commentedHi Ignacio,
Thanks for your work. Here ara a few feedbacks from a first quick look about Pager component: https://git.drupalcode.org/project/drupal/-/merge_requests/8768/diffs
Undefined objects
This is not enough to be understood by developers using your component and leveraged by display builders (UI Patterns 2, the upcoming Experience Builder...):
You need to tell what is inside the object, which properties.
Buy the way, don't feel obligated to mimic the current Twig logic and model of
core/themes/olivero/templates/navigation/pager.html.twig, this is also the occasion of proposing a cleaner model and do the mapping when youincludethe component.Alien classes
Are you sure
layout--content-mediumbelongs to the component template ?it looks foreign for me.
Maybe you can inject it from the presenter template instead:
Use
includefunction instead ofincludetagAccording to Twig documentation, it is recommended to use the include function instead as it provides the same features with a bit more flexibility: https://twig.symfony.com/doc/3.x/tags/include.html
Proper use of icons
It is a bit weird to use
componentMetadataas a workaround to get icon path but I understand why you did that:However, there is a new Icon API in Drupal Core since Drupal 11.1: #3471494: Add an icon management API
So, you can add an icon pack in
olivero.icons.yml(naive, non tested, example):Adn then call your icon from your template:
It is a new API. I would be happy to help if necessary.
Comment #29
oily commentedEdited MR. Attempt to make code more comprehensible.
Comment #30
ignaciofarre commentedHi Pierre,
Thank you for your review and comments—I really appreciate the feedback.
I’ve made some updates based on the suggestions:
1. I added a new component (`pager_item`) and structured the render arrays in the preprocess function. This seemed necessary because of the complexity, but I’m not entirely sure if this was the best approach. Please let me know if there’s room for improvement.
2. I also added the view mini pager template since it was previously unstyled.
Unfortunately, I wasn’t able to make the icons work. Any guidance or feedback on this would be greatly appreciated.
Lastly, thank you, Andrew, for reviewing the text as well. English isn’t my first language, and I’d really appreciate another review of the text if possible.
Please let me know if I can improve or update the code further—I am eager to learn, so don’t hesitate to share any suggestions.
Thanks again!
Comment #31
ignaciofarre commentedComment #32
pdureau commentedHi Ignacio,
Undefined objects
Creating a
pager_itemcomponent is not a bad idea. There is plenty of situations when we want a "sub component" repeated in a parent component' slot:However, in this case, I don't believe it is the best choice:
pager_itemso the repeated data structure can be expressed with JSON schematype: objectAlso, if you decide to keep
pager_item, the BEM HTML class name must not be an element of pager:but its own block:
See: https://getbem.com/naming/
Proper use of icons
This new API (available since Drupal 11.1) is easy to use once the icon pack is defined.
First, you need to have a clearer organisation of your icons. You actually have:
I have no opinion about where to keep those 2 icons, but it seems there is some duplications to fix, so I am proposing to move
components/paginator/pager_item/images/*.svgtoimages/icons/*.svg, replacing the existing files.Then you can create a
olivero.icons.ymlfile at the root of the theme with:And try to print
{{ icon ('olivero', 'pager-previous') }}in a template. Is it working?If yes, it is a good start :) If no, let's check this together.
Linting & and checking
There is no official Twig linter for Drupal Core yet, but you can run the Twig files of the components added by you (and only those ones) with #3284817: Adopt vincentlanglet/twig-cs-fixer for Twig coding standards
Also, https://www.drupal.org/project/sdc_devel can be useful to check your component (definition & template) :
drush sdv oliveroComment #34
quietone commentedThe 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.