Inspired by #2058279: Align mini pager accessibility markup to full pager., currently postponed on changes in #2004872: [meta] Theme system architecture changes and resolution of #939462: Specific preprocess functions for theme hook suggestions are not invoked (we need the ability to have a suggestion-specific preprocess function).

Updated: Comment #3

Problem/Motivation

The default pager and the Views mini pager use an identical Twig template. Let's consolidate them and have the mini pager use a theme suggestion instead.

Proposed resolution

  • Remove views-mini-pager.html.twig, update any calls to '#theme' => 'views_mini_pager' to 'pager__mini_pager' or similar.
  • Use a suggestion-specific preprocess function (template_preprocess_pager__mini_pager()) - postponed on changes in #2004872: [meta] Theme system architecture changes.

Remaining tasks

Create patch

User interface changes

n/a

API changes

Removal of views_mini_pager theme hook.

#2058279: Align mini pager accessibility markup to full pager.
#1912604: Convert theme_views_mini_pager to twig
#1804614: [meta] Consolidate theme functions and properly use theme suggestions in core

Files: 
CommentFileSizeAuthor
#10 views-mini-pager-to-pager-suggestion-2076301-10.patch9.51 KBl0ke
FAILED: [[SimpleTest]]: [PHP 5.5 MySQL] 110,455 pass(es), 1 fail(s), and 644 exception(s). View
#9 views-mini-pager-to-pager-suggestion-2076301-9.patch6.05 KBl0ke
FAILED: [[SimpleTest]]: [PHP 5.5 MySQL] 110,407 pass(es), 37 fail(s), and 32 exception(s). View

Comments

Cottser’s picture

Issue tags: +theme system cleanup

Missing tag.

Cottser’s picture

Issue tags: +Template consolidation

And another.

mondrake’s picture

mondrake’s picture

Issue summary: View changes

Update first line

mondrake’s picture

Issue summary: View changes

Updated issue summary, after #2058279: Align mini pager accessibility markup to full pager. was committed.

Cottser’s picture

Great, thanks @mondrake!

Cottser’s picture

Issue summary: View changes

Updated issue summary.

mitokens’s picture

lauriii’s picture

Status: Postponed » Active

Unpostponing!

dawehner’s picture

Well, its maybe not that obvious, because for this case we pass ing different data than for the normal case. Is the use of the same base template still semantically the right thing?

l0ke’s picture

Assigned: Unassigned » l0ke
Issue tags: +dcuacs2015
l0ke’s picture

Status: Active » Needs review
FileSize
6.05 KB
FAILED: [[SimpleTest]]: [PHP 5.5 MySQL] 110,407 pass(es), 37 fail(s), and 32 exception(s). View
l0ke’s picture

FileSize
9.51 KB
FAILED: [[SimpleTest]]: [PHP 5.5 MySQL] 110,455 pass(es), 1 fail(s), and 644 exception(s). View

Added pager--mini-pager.html.twig

The last submitted patch, 9: views-mini-pager-to-pager-suggestion-2076301-9.patch, failed testing.

Status: Needs review » Needs work

The last submitted patch, 10: views-mini-pager-to-pager-suggestion-2076301-10.patch, failed testing.

keopx’s picture

@lokeoke are you working on it? otherwise please change to unassigned.

lauriii’s picture

Assigned: l0ke » Unassigned
andypost’s picture

Version: 8.0.x-dev » 8.1.x-dev

Is there any policy about to remove templates in 8.x?

dawehner’s picture

Well, we would certainly need to keep it, but we could add maybe a special template suggestion, so it will fallback to it, but classy will provide a pager__mini_pager template which is exactly the same as the normal pager?

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.0-beta1 was released on March 2, 2016, which means new developments and disruptive changes should now be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

joelpittet’s picture

Issue tags: +Twig

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.0-beta1 was released on August 3, 2016, which means new developments and disruptive changes should now be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.0-alpha1 will be released the week of January 30, 2017, which means new developments and disruptive changes should now be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.