Active
Project:
Drupal core
Version:
main
Component:
theme system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
16 Jun 2011 at 13:58 UTC
Updated:
26 Mar 2024 at 07:36 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
merlinofchaos commentedThat button is controlled and generated by theme('pager') which is Drupal core. Views has no control or influence over it.
Comment #2
steenbob commentedThanks for moving the bug over to Drupal Core. I didn't realize it was controlled by Core. Still a Drupal newbie. :^)
Comment #3
jasonsavino commentedThe patch attached will add theme_pager_ellipsis which returns a themed pager_link.
) will jump to page 12.When displaying pages 3 -11 the first ellipsis (after
Comment #4
kscheirerThis should go into the current development branch of Drupal (8.x-dev) and then backported if needed. Also settting to needs review for patchbot to find it.
Looks like a good addition though!
Comment #6
bleen commentedThis is a patch for D8 based on teh patch in #3
Comment #7
jasonsavino commentedComment #8
kscheirerare these patches the same?
Comment #9
bleen commentedI'm not sure why jasonsavino posted #7 ... it looks like the only difference between the two is the position within the files that the new functions were added
Comment #10
kscheirerCode works as advertised (either patch). Can we add a tooltip on the ellipses like "Jump to page x" like we have on the other pager links?
Comment #11
jasonsavino commentedI added an attributes array to the theme function and passed "t('Jump to previous group')" and "t('Jump to next group')" to the ellipsis links.
Comment #12
kscheirerThanks jasonsavino, works for me.
Comment #13
tim.plunkettWhy bother assigning all these variables? Why not just use the long form in the theme function?
Comment #14
bleen commentedAn excellent point tim
This cleans up that theme function a bit
Comment #15
jasonsavino commentedThanks Alex. Works for me.
Comment #16
bleen commentedwoot
Comment #17
catchHmm, I'm not sure why we can't prepare the variables in theme_pager() and use theme_pager_link() here too, is there a reason to add the new theme function otherwise?
Comment #18
bleen commentedI think the extra theme function is more about making it easier to override by themers ... With the pager in particular there is a history of generalizing the different pieces (like class names) and we end up coming back to it later anyway.
Is there a compelling argument not to have the new theme function?
Comment #19
ramlev commentedI'm totally with bleen18 on this.
I have tested and everything works like it supposed to.
Comment #20
catchFor specific overrides, we ought to be able to use theme hook suggestions no? So theme('pager_link__ellipsis')?
Comment #21
bleen commentedCatch's suggestion in #20 seems to make sense.... so I took it one step further. I replaced all the theme_pager_* functions with theme suggestions based off of theme_pager_link. With this change a user can add any of the following functions:
.. or the corresponding tpl instead.
I was a bit concerned about scope creep with this patch, but I spoke with catch in IRC and he agreed that as long as we are cleaning things up then he wouldn't object to it.
... now, let's see what testbot has to say
Comment #22
tstoecklerHmm..., I don't see that being used in the patch. Or is that some hidden feature by our theme system, that I didn't know of :)
Otherwise looks pretty cool. Nice diffstat!!!
Could use someone trying this out, though.
Comment #23
tstoecklerAnd below: Since we're already modifying this in the patch, can we change this to use the verbose array declaration split over multiple lines. The patch doesn't make things worse than they were, but it's still very hard to read.
(That will hurt the diffstat, but still... :) )
Comment #24
bleen commentedre #22: That was some cruft left over from a previously failed attempt. I've killed it with fire.
re #23: I spose...
Comment #25
tstoecklerThat looks so much better. Code-wise this is RTBC. I don't know in how good our test coverage is with regards to pagers, but I guess someone trying this out locally can't hurt.
Comment #26
sunAhem. The massive code clean-up here looks really nice and I totally like that.
But the actual suggestion of turning the "..." into something clickable sounds very odd to me. I don't think I've ever seen such a pager feature/behavior anywhere else on the net.
In fact, I totally would not expect that clicking on "..." will effectively load a new page which is the same as the "next" link, but just moves/shifts the pager items/numbers differently.
I think what I'd rather expect would be some fancy simple JS that only moves/shifts the pager items/numbers, but without reloading the entire page, so I'm able to get to page 23 of 42 more quickly. (Overall that's an edge-case of a use-case on its own.)
I think this proposal needs more design/usability discussion. Therefore, I'd almost suggest to move that nice code clean-up work into a separate issue.
Comment #27
webchickSince this removes not one, not two, not three, but FOUR theme functions I'm tentatively tagging it with the theme system cleanup tag.
Comment #28
kscheirer@sun - instead of jumping to the same page as "next", how about jumping further ahead? Then it has a more specific function that we currently don't offer - a way to jump far ahead without just editing the pagenum in the url.
Comment #29
Bojhan commented....
Comment #30
Bojhan commentedNot sure, what I should review.
Comment #31
jasonsavino commentedI believe we have added to much to the initial request. The request was to add clickability to the ellipsis'. That was done and should stop there. If there is an issue with the way pager theme functions are done, shouldn't that be it's own issue?
@sun - to your comments in #26, to be honest I find it odd that we would have a the ellipsis at all. If there are next/previous links then logic dictates that there must be more pages. When the next or previous links disappear then there are no pages ... could it get any more simple?
But since they are there, they should be useful. To that end the patch in #11 allows the user to jump to the next set of links. If you had, for instance, 30 pages worth of content, the page would show 9 pages and the ellipsis link would jump you so you would see 10 - 18 (roughly). This is not the same functionality as "next" which only moves you one page.
Comment #32
sunTotally agreed. Moved the clean-up into #1598886: Clean up pager theme functions
Comment #33
joachim commented> If you had, for instance, 30 pages worth of content, the page would show 9 pages and the ellipsis link would jump you so you would see 10 - 18 (roughly).
'Roughly'? Could someone explain exactly what clicking the ellipsis would do? Perhaps use the drupal core issue queue as an example: what happens when I click either of the two ellipses on this page: http://drupal.org/project/issues/drupal?page=8
Comment #34
Bojhan commentedhttp://www.webdistortion.com/2008/10/27/26-pager-styles-from-around-the-...
I tend to agree with @sun on this one, it seems like we are trying to be smart creating a interaction that would be relatively unique to Drupal. I don't even get why we have this in core, the use of ellipsis tends to be between the last highest, and the last page - not before next/last.
Comment #35
mondrakeHi all, just fyi, I recently contributed the Pagerer module http://drupal.org/project/pagerer , that provides some pager themes that help addressing pages far away from current. take a look if you wish.
Comment #36
webchickLOL. Awesome module name.
Comment #37
mgifford#24: 1190436.patch queued for re-testing.
Comment #39
bleen commentedMost of the patch in #24 was moved (and committed) to #1598886: Clean up pager theme functions
I'm not surprised it fails now
Comment #40
yesct commentedupdating tags.
needs reroll. http://drupal.org/patch/reroll (or just remaking a patch manually making the changes that are still needed.)
add back the needs screenshot tag when a new patch is posted.
Comment #41
bdgreen commentedAttempted reroll from #24 patch (date: May 18, 2012) - but unable to continue with rebase ... (bullet point 11.) "... you might want to skip this patch."?
Comment #42
bdgreen commentedRerolled with same result after fresh install ...
Attached are the two "conflict" patches for core/includes/common.inc and core/includes/pager.inc the only two conflict files identified during the rebase.
Hope this helps? ;)
Comment #43
manu4543 commentedMade changes manually as mentioned by YesCT in comment #40.
Comment #44
manu4543 commentedComment #46
manu4543 commentedIt shouldn't work.
Comment #47
manu4543 commentedComment #48
star-szr@manu4543 - thanks for working on this :) I think the rerolls are missing changes from earlier patches. The patch in #24 has 2 files changed, 64 insertions, 167 deletions.
The patch in #43 has 1 files changed, 26 insertions, 13 deletions.
So I would recommend a straight reroll of #24 and resolving conflicts during the rebase, instead of trying to recreate the patch manually.
Comment #49
yesct commentedI dont know much about theming, but...
code style looks ok, on a quick look.
At first it looked like two identical blocks of code were added in different places, but they are different: one for next group, one for previous group.
I think the character change from ... to uh, something else might have been unintentional.
(http://drupal.org/project/dreditor helped me do this review)
Also, interdiffs are great.
For instructions on creating an interdiff, see https://drupal.org/documentation/git/interdiff Or, http://xjm.drupalgardens.com/blog/interdiffs-how-make-them-and-why-they-...
since this applies now, removing the needs reroll tag.
Comment #50
yesct commented@Cottser good points!
I'm going to try and remember to compare the number of
files changed, insertions, deletions
when I look at future rerolls.
Comment #51
manu4543 commented@Cottser, @YesCT - Most of the patch from #24 has been committed see 39
Comment #52
star-szrAh I totally missed #39, sorry about that.
Comment #53
manu4543 commentedNothing fancy, just removed the uh (?) symbol.
Comment #54
bleen commentedI still contend that we should be using … here
Comment #55
star-szr@bleen18 - Wait, I'm confused. We should or shouldn't be using an ellipsis character? Both before and after the patch in #53 it's an ellipsis character, not three dots.
Comment #56
bleen commentedBlarg ... I meant
…but it got rendered in my commentComment #57
Bojhan commentedThisis RTBC?
Comment #58
vijaycs85Manually tested by applying the patch in #53 and everything looks working fine. Attached screenshot of default and click of ellipsis.
Setting it RTBC...
Comment #59
bleen commentedNo one has answered my question ... Why aren't we using
…...Comment #60
tim.plunkettBecause we already use ... in several places, and we don't use hellip anywhere yet in Drupal code.
But a follow-up issue to replace it everywhere would be great.
Comment #61
klonos...here you go: #2018591: Replace all instances of ... with …
Comment #62
alexpottWe should have a test that clicks on the elipsis and confirms it works.
Comment #63
yesct commentedcontributor task document on how to add tests: https://drupal.org/contributor-tasks/write-tests
updated issue summary with follow-up and remaining tasks
Comment #64
vijaycs85Adding test case...
Comment #65
yesct commentedlets get a tests only patch without the fix, and make sure the testbot shows it fails.
Comment #66
vijaycs85Here is the same patch in #64 with test_only
Comment #67
yesct commentedthanks. that looks good.
Just a small clean up to
make function use third person verb in the comment description.
Comment #68
star-szrVery nice work people :) a couple more minor docs touchups to be done:
"Check for ellipsis." would be better here - capital C and ellipsis is not a proper noun.
clickable instead of click-able.
Comment #69
vijaycs85Thanks for your review @Cottser. Here is the fix.
Comment #71
vijaycs85#69: 1190436-ellipsis-does-nothing-69.patch queued for re-testing.
Comment #73
vijaycs85#69: 1190436-ellipsis-does-nothing-69.patch queued for re-testing.
Comment #75
star-szrWow, that was quick @vijaycs85 :)
This change seems unintentional.
Lower 'e' for ellipsis…
We also lost @YesCT's changes from #67 in the latest patch.
Comment #75.0
star-szradded follow up and remaining tasks
Comment #76
bdgreen commentedRerolled #67 to test prior to full review (#68 to #70.0) and then update
Comment #78
bdgreen commentedPatch does not appear to display ellipsis (hence test failure?) using replicated settings from a Drupal 7 site (similar 300 Devel'd pages) that correctly displays (inactive ;) ellipsis.
Comment #79
bill richardson commentedNo longer an issue in either Drupal 7 or 8
Comment #80
aswathyajish commentedI got the same issue in drupal 9.4.8.
Ellipsis appear before Last button in pager. I want to remove ellipsis since it does nothing.
Any solution to this?
Comment #82
quietone commentedI tested this on Drupal 10.1.x, standard install using the steps in the issue summary. i was able to reproduce the problem.
Comment #83
catchYeah this is still valid. Can we just drop the ellipsis entirely?
Comment #85
pameeela commentedI am not really sold on this change, I think that the point of it is a visual indication that there are more pages. I don't think it needs to do anything beyond that, and I certainly don't think it's safe to assume that whatever we have it do is what a user would expect.
Given that the current simple visual indicator is not at all accessible, I would also support just removing it, although it is possible some sites expect it to be there right?