Jump to content

Talk:Requests for comment/Clickable section anchors

Add topic
From mediawiki.org
Latest comment: 3 months ago by Quiddity in topic Status?

Implementation

[edit]
$('#mw-content-text').find('.mw-headline').after(function () {
	return $('<a>')
		.text('[#]')
		.css({'color': '#aaa', 'font-size': '12px', 'margin-left': '1em'})
		.attr('href', '#' + $(this).attr('id'))
})

Code from Matma Rex. - -MZMcBride (talk) 18:17, 16 July 2013 (UTC)Reply

Implementation (2)

[edit]

See MediaWiki:Gadget-vector-headanchor.js and MediaWiki:Gadget-vector-headanchor.css. Krinkle (talk) 18:22, 16 July 2013 (UTC)Reply

Option 2, left margin looks great to me on desktop. What would be the implementation on mobile, though? Also, have you had a chance to run this by someone in UX? -- RobLa-WMF (talk) 17:35, 2 January 2014 (UTC)Reply

What does it copy, a wikilink, ID, or href?

[edit]

The proposal reads to provide a copyable #Hello or possible [[Example page#Hello]]

But the talk about the link icon makes it sound as if it's to provide a full hyperlink URL, https://www.mediawiki.org/wiki/Example_Page#Hello. Well, which? Sometimes you want one, sometimes you want the other.

The Flow discussion and collaboration extension uses a permalink icon in the right margin that is an <a href> hyperlink so that right-click > Copy Link Location provides a full href URL. We may move it into an action menu.

-- S Page (WMF) (talk) 00:02, 7 January 2014 (UTC)Reply

Status?

[edit]

Still seems like a fine idea ;) Quiddity what's the status? How does something like this get resolved? There was a back and forth in the phab thread long ago that was unresolved. Sj (talk) 13:37, 25 May 2024 (UTC)Reply

@Sj I think it's really complicated, hence I kept postponing replying! >.< (And hence it hasn't progressed recently).
I overhauled the project page here, in April 2016‎, in an attempt to make all of the uncertainties ("Open questions") explicit and detailed.
Hypothetically, any Product Manager (staff or volunteer) could try to get more people to give feedback for each of those questions, to help settle on a widely agreeable implementation. Then it's a SMOP! (simple matter of programming).
But then there's also the related UI aspects (current and requested) which would ideally be taken into account, too... (I.e. Always best to keep future-plans/growth in mind, and deal with any growing disorganization/clutter that is related). E.g. [current] the two relatively newish Tools-menu links for "Get shortened URL" and "Download QR code". (I.e. those currently only work at a page-level -- we cannot currently use those Tools-menu links to get foo#section links. We have to use their dedicated Special:... pages for that.)
TLDR: Many product decisions, and design decisions, are still needed. And all outcomes will make some people happy (new useful features!) and other people unhappy (new annoying clutter! or not the 'right' designs!). –Quiddity (talk) 23:30, 1 June 2024 (UTC)Reply