Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The function _statistics_link() truncates the path to 35 chars, and it makes hard to read longer paths. It would be nice to have the title attribute in the link showing the full path.
Comment | File | Size | Author |
---|---|---|---|
#27 | 79079.add-title-attr-to-statistics-link.027.patch | 705 bytes | karschsp |
#22 | drupal.statistics-link-title.22.patch | 859 bytes | sun |
#6 | 79079-statistics-url-links-title-D7.patch | 753 bytes | Dave Reid |
#2 | jsomers_79079_title_1.patch | 997 bytes | j.somers |
#2 | jsomers_79079_title_2.patch | 1009 bytes | j.somers |
Comments
Comment #1
LAsan CreditAttribution: LAsan commentedFeature request go to cvs.
Comment #2
j.somers CreditAttribution: j.somers commentedI attached a patch which implements this request.
Both patches achieve the same result but patch #1 uses an extra line to define the $options array while patch #2 combines it all in 1 single line.
Comment #3
Dries CreditAttribution: Dries commentedThe title_2.patch looks good to me. I wonder how necessary this patch is. Both Firefox and Safari, for example, show the URL in their status bar (i.e. the bar at the bottom). It makes this patch pretty redundant, IMO.
Comment #4
j.somers CreditAttribution: j.somers commentedI agree that it might be trivial but for some it might be easier to check the title attribute when they hover over it and I don't think it will cause much overhead.
Comment #6
Dave Reid+1 for this feature. I know some browsers show the full URL in the status bar, but some people may have the status bar hidden, or some users have lots of extensions that shorten the status bar. It would be useful to show this information. Re-rolled for HEAD.
Comment #7
Dave ReidComment #8
mcrittenden CreditAttribution: mcrittenden commentedPatch is a success for me. Definitely a useful feature and the patch only adds one more parameter. Cooperates with standards as well. Let's get this in.
Comment #9
Dave ReidFeel free to mark as RTBC then. :)
Comment #10
j.somers CreditAttribution: j.somers commentedPatch looks OK here too.
Comment #11
Dries CreditAttribution: Dries commentedBrowsers already show the complete URL when you hover over it. Do you have the "status bar" enabled in your browser? It does what you want it to do, and better. I'm tempted to mark this "won't fix".
Comment #12
mgiffordI do really like this patch actually. Had put a similar request forward here - http://drupal.org/node/134090
It just makes it much more apparent to people. You can see the full link in the status bar, but I don't think most folks go there. However, if you see the link light up with the title it's really obvious.
Maybe some usability folks can comment on this.
Comment #13
Dave Reid@Dries: This is actually the current behavior of the Drupal's URL input/text filter. See http://drupal.org/node/441414 for two examples of links that were truncated but display the full URL in the title attribute.
Comment #14
cburschkaStill RTBC, assuming it still clears testbot's latest round of retesting (apparently we just had a core commit).
Comment #16
Dave ReidPretty sure this was related to bot error. Resetting.
Comment #18
deekayen CreditAttribution: deekayen commentednaughty pifr client
Comment #19
webchickI know that in Safari, at least, the status bar is disabled by default (this routinely causes me to curse loudly and is probably the second thing I change on any new OSX install, after my password). So I can see the rationale for this patch. It's also consistent with the way the URL filter input format works as Dave Reid points out in #13, and having it pop up as a link title is more convenient to my eyeballs than breaking from the link I'm looking at and scanning way down at the bottom of my browser window and finding my way back again.
However, it really sounds like Dries is unconvinced, and it's also something we could always change after code-freeze, so I'm going to leave this at RTBC for now and move onto other issues.
Comment #20
mgiffordUltimately it's a little thing affecting one small part of the admin screen for Drupal. However, if it makes the system more consistent and applies more information for the browser then why not? I haven't heard back from any of the usability folks. And yes, it can easily be applied after Sept 1st. I do wonder though how many other patches might fit into that category.
It may largely be about what browser you have and how you've got it configured. Or perhaps how you're used to using your browser. But I don't think most folks are looking for additional information in the status bar when they hover over a link.
Comment #21
sunIf this is a common browser problem, then trying to fix solely in statistics module's links is the wrong point to fix it. Fix l() instead.
Comment #22
sunQuite some confusion here. The original patch in #2 displayed the URL alias as link title attribute, which is already displayed as link text, but truncated. Hovering over the link also displays that URL alias in the browser's status bar.
However, the internal system path is not displayed anywhere.
Comment #23
mgiffordThanks @sun - your patch applies nicely.
Looking at the stats results here:
/admin/reports/hits
I'm getting this however:
And I'm pretty sure we want:
Did you mean to use $path?
Comment #24
sunDoes it make sense to repeat the URL alias, which is already displayed in the browser's status bar?
Comment #25
mgiffordI think Dries made that argument somewhere. I couldn't find it. I think it works fine for geeks.
I do think that it's good to make it more obvious to people. If you're hovering over a partial link & want to see what the rest of it is it's not going to make sense to look down at the bottom of the browser.
From a usability perspective, I'm not sure how many people look down at the browser's status bar on a regular basis. It's outa the box & outa mind.
Putting the node ID as a reference could have some benefits, but the issue is about the full URL and not the node path.
Comment #26
ff1 CreditAttribution: ff1 commentedIt's helpful, but doesn't fix any bugs, so according to Webchick's rules, this needs to move to D8.
Also, the latest patch doesn't add the intended feature, so marking as needs work.
Comment #27
karschsp CreditAttribution: karschsp commentedHere's a re-roll of #22 which incorporates mgifford's feedback from #23.
Comment #28
andypostPatch still valid
Hunk #1 succeeded at 386 with fuzz 1 (offset 8 lines).
Suppose it's good to have a title - no reason to move eyes to bottom of browser this could lead to loose focus on line you are see
Comment #29
catchhmm I'm not sure either way on this, handing over to Bojhan/yoroy for an opinion.
Comment #30
Bojhan CreditAttribution: Bojhan commentedSounds fine, its a suuuper tiny improvement - for those who notice :) Does not make it less of an improvement, heh.
Comment #31
webchickEr. So did anyone actually try this patch? I don't really understand the point at all of displaying the exact link text in the title, which seems to be what it's doing right now:
I also don't know that I understand the value in displaying the full URL as shown in the status bar (localhost/8.x/node/1). It's not like various sub-domains' statistics are showing up here. All URLs here will be local to the current site.
GIven this, I also lean towards "won't fix" unless there's a compelling reason not to do that.
Comment #43
quietone CreditAttribution: quietone at PreviousNext commentedMore information was asked for 10 years ago and none has been provided. Also, the function _statistics_link was removed in #2343651: Remove most remaining l() calls in Drupal 8.0.x.
Therefore, closing as outdated. If this is incorrect reopen the issue, by setting the status to 'Active', and add a comment explaining what still needs to be done.
Thanks!