You can edit almost every page by Creating an account and confirming your email.

Template talk:Shortcut

From EverybodyWiki Bios & Wiki

Direct link

Since this is placed on the policy in question, the links displayed do not do anything but make your browser reload the page. I thought it'd be nice to send them directly to the page of the redirect, as that adds a little bit of use to an otherwise useless link--it makes it easier to check the history, etc. and see if it'd be alright to reappropriate the shortcut in question. Red Slash 02:48, 10 January 2014 (UTC)

Hi, could someone please change the bluelinks in this to be "redirect=no" links? I did it on Template:Shortcut-l and the text <small>[[Wikipedia:Shortcut|Shortcut{{#if:{{{2|}}}|s}}]]: {{#if:{{{1|}}}|* {{no redirect|{{{1}}} }}{{#if:{{{2|}}}| * {{no redirect|{{{2}}}}} }}{{#if:{{{3|}}}| * {{no redirect|{{{3}}}}} }}{{#if:{{{4|}}}| * {{no redirect|{{{4}}}}} }}{{#if:{{{5|}}}| * {{no redirect|{{{5}}}}} }}{{#if:{{{6|}}}| * {{no redirect|{{{6}}}}} }}{{#if:{{{7|}}}| * {{no redirect|{{{7}}}}} }}{{#if:{{{8|}}}| * {{no redirect|{{{8}}}}} }}{{#if:{{{9|}}}| * {{no redirect|{{{9}}}}} }}{{#if:{{{10|}}}| * {{no redirect|{{{10}}}}} }}{{#if:{{{11|}}}| * {{no redirect|{{{11}}}}} }}{{#if:{{{12|}}}| * {{no redirect|{{{12}}}}} }} }}{{#if:{{{2|}}}| * [[{{{2}}}]] }}{{#if:{{{3|}}}| * [[{{{3}}}]] }}{{#if:{{{4|}}}| * [[{{{4}}}]] }}{{#if:{{{5|}}}| * [[{{{5}}}]] }}</small>

could be inserted in the corresponding part of the template... Or just copy/paste the content from my test case: {{shortcut/sandbox3}}

Shortcuts:

Thanks! Red Slash 04:15, 7 March 2014 (UTC)

I guess doing this right after you've requested it in an edit request is bad timing, but I've just implemented this as a Lua module - see Module:Shortcut. This will remove the 10-shortcut limit, and will also mean that the template doesn't have to check all 10 parameters if only one or two have been specified in the template invocation. I've adjusted it to add redirect=no, though, so the net effect should be the same. :) Have a play around with it and see what you think. There should probably be some more time for people to discuss this before we make any changes to the main template, so I'm marking this request as answered for now. — Mr. Stradivarius ♪ talk ♪ 06:31, 7 March 2014 (UTC)

Continued

Hi, could the links in the template please be "redirect-only" links? There's really no need for the links to even be there if they're just going to lead you back to the page you're already on; redirect-only links let you check out what's linking to those exact shortcuts, etc. Thanks! Red Slash 03:41, 10 April 2015 (UTC)

@Red Slash: You put this on as a request to edit Template:Shortcut, but that does pretty much nothing nowadays other than send information to Module:Shortcut for processing. You'd need a Lua specialist to amend that; but regardless, Not done: please establish a consensus for this alteration before using the {{edit template-protected}} template. --Redrose64 (talk) 10:29, 10 April 2015 (UTC)
@Red Slash: I definitely agree that the links should land on the redirect page (or otherwise should be removed), and have coded this change in Module:Shortcut/sandbox. Pppery 18:38, 23 November 2016 (UTC)
Reactivating this edit request to respond to this. User:Pppery's sandbox code seems fine to me. Note - the module itself is template protected, but the whole thing is cascade protected. — Train2104 (t • c) 21:16, 6 March 2017 (UTC)
Done — Martin (MSGJ · talk) 15:57, 8 March 2017 (UTC)

Protected edit request on 4 December 2014

Please replace the current version with this sandbox version. The content/function change (starting from a duplicate of the current template) is here; the subsequent changes change nothing other than the code's presentation.

The key content/function change is the removal of whitespace accompanying the parameters. This, for example, releases restrictions on parameter formatting in templates that call {{Shortcut}}, such as {{Village pump page header}} (see "Third" shortcut output below):

code
{{Village pump page header
 | Test
 | This parameter, the second, carries text...


...that can be quite lengthy.
 |First |Second |Third
}}
output
 Policy Technical Proposals Idea lab Miscellaneous 
This parameter, the second, carries text...


...that can be quite lengthy.

« Archives, no archives yet (create)

Sardanaphalus (talk) 20:19, 4 December 2014 (UTC)

Again you're messing with newlines for no apparent benefit. It makes it very difficult to carry about a comparison with the sandbox diff link above. --Redrose64 (talk) 20:41, 4 December 2014 (UTC)
  • Incorrect – if, that is, you read the request and followed the second link ("here") provided.
This article, in the context of the comprehension of and/or reaquaintance with code, might indicate why I take trouble over ("mess with") spacings, alignments and so on.
Sardanaphalus (talk) 01:17, 5 December 2014 (UTC)
Not done: please establish a consensus for this alteration before using the {{edit protected}} template. I also object to this pointless change. I have fully read your request, and that article you link 1) doesn't use this template, so I see no connection and 2) looks horrible as there is way too much whitespace on my screens resolutions. — {{U|Technical 13}} (etc) 16:17, 8 December 2014 (UTC)
  1. I don't understand how this change is seen as pointless. This template assumes parameters are fed to it without whitespace. An example of what happens when this doesn't occur is given above, using a template (Village pump page header) that calls/invokes/transcludes this template. The change therefore strips parameters of whitespace they may include. ("The key content/function change is the removal of whitespace accompanying the parameters.")
  2. If by "that article" you're referring to the article Principles of grouping linked in my reponse to Redrose64, it's not meant as an example of where this template {{Shortcut}} is in use / malfunctioning / etc. It's to suggest (to Redrose64) why I try to give code layout some structure.
  3. I don't understand what you mean by the proposed version looking "horrible ... way too much whitespace". The change made doesn't add any whitespace to what is already a relatively small box on the righthand side of the page.
Sardanaphalus (talk) 17:53, 9 December 2014 (UTC)
The parameter whitespace fix seems a positive change. It's the "changes in the code's presentation" which seem to be generating disagreement here. Would you mind doing the former without the latter? — Martin (MSGJ · talk) 21:54, 9 December 2014 (UTC)
The former is here (yes, the same "here" linked in the intial request and again for Redrose64). It's misreading the request that has generated the smoke and mirrors, not the increase in the clarity of the code's presentation – although I suspect that's already recogniszed. Thank you for your post. Sardanaphalus (talk) 22:13, 11 December 2014 (UTC)
Then why not sandbox that change only and leave out all of the unnecessary stuff? --Redrose64 (talk) 22:52, 13 December 2014 (UTC)
  • Because I believe the other changes are worthwhile. Anyone with the required access is able to make that change only. Sardanaphalus (talk) 12:36, 16 December 2014 (UTC)
This request reminded me - I had previously written Module:Shortcut but forgotten about it. I've fixed it up, and changed the test cases so that they are more useful for comparing the template versus the module. The module also fixes the newline issue that Sardanaphalus had fixed. What would people think of switching this template to use the module instead? — Mr. Stradivarius ♪ talk ♪ 14:12, 15 December 2014 (UTC)
  • Sounds like a timely step forward here; thank you for suggesting. Sardanaphalus (talk) 12:36, 16 December 2014 (UTC)
Done Ok, the module is now up live. — Mr. Stradivarius ♪ talk ♪ 12:34, 17 December 2014 (UTC)

Strange problem

I'm having a strange problem with {{Shortcut-l}}.

I've tried using it on WP:COI, because I've been adding images or quote boxes that take up the right-hand side. But the template is repeating all but the first shortcut. You can see it in this section, where the second shortcut is repeated, and in this one, where it repeats the second and third.

Any suggestions for how to fix this? SarahSV (talk) 05:21, 9 December 2015 (UTC)

@SlimVirgin: The template was horribly broken - among other things, it listed shortcuts 2-5 twice. This edit should have fixed it. — Mr. Stradivarius ♪ talk ♪ 05:53, 9 December 2015 (UTC)
It has indeed fixed it. Thank you, Mr. Stradivarius. SarahSV (talk) 06:04, 9 December 2015 (UTC)

Div instead of table?

The module builds a layout table containing a single cell, a <th>. This causes an accessibility error, screen readers treat it as a data table (see WP:LTAB). Changing the <th> to a bolded <td>, and adding :attr('role', 'presentation') to the table would be a quick fix. But would a simple floating div instead of a table be more appropriate? Matt Fitzpatrick (talk) 10:16, 12 April 2016 (UTC)

It really ought to be a floated <div>...</div>. --Redrose64 (talk) 10:55, 12 April 2016 (UTC)

How's this?

Matt Fitzpatrick (talk) 08:56, 15 April 2016 (UTC)

No visual changes, give or take a pixel. But I should explain what's changed under the hood.

  • <div> instead of <table>.
  • As there was only one cell, I guess the <th> was just for bolding the text. Replaced with "font-weight:bold".
  • "background:transparent" to override <th>'s style no longer needed.
  • role="note" and "font-size:smaller" instead of <small>. Semantically more of an aside or note than small print. Also, tidy doesn't allow a <ul> nested inside a <small> and messes with the output.
  • line-height and padding tweaks to minimize pixel differences.

Matt Fitzpatrick (talk) 04:02, 19 April 2016 (UTC)

Related, just found these.

Policy shortcut uses a table with a single header cell, and I think it should be similarly changed. I'll drop a note on its talk page. Shortcut-l uses a div already and looks mostly fine to me. Matt Fitzpatrick (talk) 04:12, 19 April 2016 (UTC)

The reason that you can't put <ul>...</ul> inside <small>...</small> is because the former is a block-level element ("flow content" in modern terminology) whereas the latter is an inline element ("phrasing content"). The proper thing to do in HTML 4 (or later) is to add a class attribute to the <ul> tag, and in the style sheet, assign the declaration font-size:smaller; to that class. --Redrose64 (talk) 19:47, 19 April 2016 (UTC)
@Redrose64: Luckily, the table already had class="shortcutbox", and I kept that in the div. If the inline styles are acceptable, should I ask an admin to move them into a .shortcutbox rule in common.css at the same time as making my sandbox edit? Matt Fitzpatrick (talk) 23:47, 26 April 2016 (UTC)
I think so; perhaps Edokter (talk⧼dot-separator⧽contribs)? --Redrose64 (talk) 09:49, 27 April 2016 (UTC)
Shortcut boxes are a relatively rare occurence compared to the number of total pages. Let's leave them inline for now and wait for TemplateStyles to be deployed. -- [[User:Edokter]] {{talk}} 10:04, 27 April 2016 (UTC)

Module:Sandbox/Matt_Fitzpatrick/Shortcut to Module:Sandbox Module:Shortcut (diff)

Includes a margin fix from User:Edokter, thanks! This replaces the layout <table> containing a single <th> (which is an accessibility error) with a <div>. It leaves styles inline for now, per Edokter, with TemplateStyles coming soon. See also Template:Shortcut/testcases. Matt Fitzpatrick (talk) 21:10, 29 April 2016 (UTC)

Edited - typo on module link. Matt Fitzpatrick (talk) 21:13, 29 April 2016 (UTC)

 Done. -- [[User:Edokter]] {{talk}} 21:58, 29 April 2016 (UTC)

Treating redlinked shortcuts as errors

Redlinked shortcuts currently populate the cleanup category Category:Wikipedia shortcut box first parameter needs fixing. I don't think this behavior is correct, because redlinked shortcuts are just like any other sort of redlink: sometimes the box is on a userspace draft of a policy that'll eventually be promoted; sometimes the box is meant to illustrate a humorous parallel with an actual shortcut. Either way, I don't think redlinks naturally "need fixing". (Pinging Mr. Stradivarius, who wrote the module.) Enterprisey (talk!(formerly APerson) 03:12, 18 July 2016 (UTC)

@Enterprisey: This category was in the original template, and has been around since 2008. Looking at the rationale for adding it, I see that it was originally meant to be temporary. I don't mind if we take it out. Or we could make it suppressible with something like |nocat=true if that is more desirable. — Mr. Stradivarius ♪ talk ♪ 03:31, 18 July 2016 (UTC)
Actually, I see that it already is suppressible with |category=no. — Mr. Stradivarius ♪ talk ♪ 03:34, 18 July 2016 (UTC)
Wonderful! Great find. Thanks. Enterprisey (talk!(formerly APerson) 03:40, 18 July 2016 (UTC)

Protected edit request on 20 August 2016

At the moment, the error category for an invalid first parameter is added if the first parameter is a valid interwiki link; apparently, mw.title.exists is false in this case. Therefore:

if not title or not title.exists then

should be changed to

if not title or (not title.exists and title.interwiki == '') then

in order to catch this case.

Enterprisey (talk!(formerly APerson) 03:45, 20 August 2016 (UTC)

 Donexaosflux Talk 23:23, 20 August 2016 (UTC)

The cleanup category should be removed

Since I cleared out CAT:SHORTFIX, the category should be deleted and all code that adds pages to it (as far as I know, such code is present in {{Ombox/shortcut}}, {{Policy shortcut}}, and {{Shortcut-l}}, in addition to Module:Shortcut) should be removed. In the original discussion, it was suggested that this happen as soon as the category was cleared out. Pinging Mr. Stradivarius, with whom I had a related discussion last month. Enterprisey (talk!(formerly APerson) 20:57, 31 August 2016 (UTC)

I've removed it from the module and from all the templates you listed. — Mr. Stradivarius ♪ talk ♪ 23:30, 31 August 2016 (UTC)
Thank you! Enterprisey (talk!(formerly APerson) 02:49, 1 September 2016 (UTC)

Visual redesign proposal

Hello. I see some minor problems with the standard shortcut box. It is oversized. Ideally the shortcuts should be as light and unintrusive as possible, but the current box takes much more space than needed. In some pages (Wikipedia:Talk page guidelines, for example) the shortcut boxes conflict with each other and make the page look messy. In some policy banners, the shortcut list is so long that it pushes the banner out of proportion (see WP:OR, for example). These problems have been addressed in {{policy shortcut}} and {{ombox/shortcut}}, where the line spacing is shorter, but not in {{shortcut}}. Furthermore, the bold font makes the box look heavy; a normal font weight is enough and would make the template look lighter and more unintrusive.

Current Proposal

The top and bottom margins would be removed as well. This avoids most conflicts between boxes close to each other, and integrates the box better in the body of text. Here you can see a before and after screenshot of how it would look in Wikipedia:Talk page guidelines. This style can be also applied to {{policy shortcut}} and {{ombox/shortcut}}, creating a totally unified style across all shortcut templates. In short, the proposal entails 1) reducing the line spacing; 2) changing the font weight from bold to normal; and 3) removing top and bottom margins

Before making a formal request I would like to know, would anyone object to the proposed change? Thank you. Atón (talk) 07:30, 25 September 2017 (UTC)

Your description of the current situation is incorrect, in that it uses a <table>...</table>. In fact, it uses a <div>...</div> - for instance, at Wikipedia:No original research, the HTML that is served is basically as follows:
<div class="shortcutbox plainlist noprint" role="note" style="float:right;border:1px solid #aaa;background:#fff;margin:.3em .3em .3em 1em;padding:.4em .6em;text-align:center;font-size:smaller;line-height:2em;font-weight:bold">
  <a href="/wiki/Wikipedia:Shortcut" title="Wikipedia:Shortcut">Shortcuts</a>:
  <ul>
    <li><span class="plainlinks"><a class="external text" href="//en.wikipedia.org/w/index.php?title=Wikipedia:OR&amp;redirect=no">WP:OR</a></span></li>
    <li><span class="plainlinks"><a class="external text" href="//en.wikipedia.org/w/index.php?title=Wikipedia:NOR&amp;redirect=no">WP:NOR</a></span></li>
    <li><span class="plainlinks"><a class="external text" href="//en.wikipedia.org/w/index.php?title=Wikipedia:ORIGINAL&amp;redirect=no">WP:ORIGINAL</a></span></li>
    <li><span class="plainlinks"><a class="external text" href="//en.wikipedia.org/w/index.php?title=Wikipedia:ISAWIT&amp;redirect=no">WP:ISAWIT</a></span></li>
  </ul>
</div>
the change to a <div>...</div> was made over a year ago, see Template talk:Shortcut#Div instead of table? above. If the list of shortcuts is too long, remove some; see WP:2SHORTCUTS. --Redrose64 🌹 (talk) 18:27, 25 September 2017 (UTC)
I've corrected the code, thanks for noticing. The number of shortcuts it's ok, I just think we could use less line spacing. Atón (talk) 21:27, 25 September 2017 (UTC)

Protected edit request on 11 October 2017

Please reduce the line spacing, margins, padding and font weight per Template talk:Shortcut#Proposal. Changes are the following:

line 89: ('margin', '.3em .3em .3em 1em') to ('margin', '0em 0em 0em 1em')
line 90: ('padding', '.4em .6em') to ('padding', '.3em .6em .2em .6em')
line 93: ('line-height', '2em') to ('line-height', '1.4em')
line 94: ('font-weight', 'bold') to ('font-weight', 'normal')

It would be great if the top 'shortcut' link could be underlined. In wikicode I've done it by placing it in a div block as follows: <div style="display: inline-block; border-bottom: 1px solid #aaa; line-height: 1.5em;">[[Wikipedia:Shortcut|Shortcuts]]</div>. But I don't know how to translate that into Lua code. Thank you. Atón (talk) 12:02, 11 October 2017 (UTC)

Not done: please make your requested changes to the template's sandbox first; see WP:TESTCASES. I see no difference between Module:Shortcut and Module:Shortcut/sandbox. --Redrose64 🌹 (talk) 18:18, 11 October 2017 (UTC)

Edited sandbox. As I explained above, I would also like to request the separation line between the shortcut heading and the shortcut list, but I don't know how to do it with Lua code. I'd appreciate if someone could do that as well, or explain to me how to do it. Thank you. Atón (talk) 19:21, 11 October 2017 (UTC)

 Done. Can't help you with the Lua coding but you could ask at Wikipedia talk:Lua — Martin (MSGJ · talk) 21:08, 12 October 2017 (UTC)
@Atón and MSGJ: I disagree with this change strongly. Please change it back and seek out consensus before changing again. The shortcuts are beneficial when they stand out rather than being hidden or tucked away in similar formatting to the rest of the page. Additionally, on larger monitors, this change makes it difficult to even read. Nihlus 01:46, 13 October 2017 (UTC)
I have undone the change for now. Atón has been seeking consensus on this for several weeks (see above) and is unfortunate that you did not join in earlier. — Martin (MSGJ · talk) 07:14, 13 October 2017 (UTC)
@MSGJ: Unfortunately, I had no way of knowing this conversation was ongoing until the change was processed. Nihlus 14:43, 13 October 2017 (UTC)
@Nihlus:
Error creating thumbnail:
screenshot before after
As the screenshot shows, the proposal doesn't hide or tuck the shortcuts away. The proposal doesn't change the font size (which is larger than the font in the top and left interface menus) so it shouldn't be difficult to read even in large screens. Atón (talk) 14:36, 13 October 2017 (UTC)
@Atón: I disagree. It is more difficult to see them when they are normal rather than bold, and the spacing causes them to be squished together. It just seems like a case of WP:SLOP. Nihlus 14:43, 13 October 2017 (UTC)
@Nihlus: I agree with you on the spacing. I used the same spacing as {{ombox/shortcut}}, namely 1.4em. It can be tweaked. On the right you have a shortcut box with the same spacing and font size as {{policy shortcut}}. The spacing is slightly larger, and it looks lighter and better than the original proposal. So you are right, 1.4em is on the cramped side. I don't see however the difficulty in seeing the normal font weight—it seems perfectly visible and readable. It is not as flashy as bold all caps, but that is the point of the proposal, to make the shortcuts less heavy and intrusive, which in turns makes Wikipedia pages look cleaner and more uncluttered. Is this a bad idea? Atón (talk) 21:13, 13 October 2017 (UTC)
@Atón: Although better than your first version, I still don't like it and still think it's an unnecessary change (as I mentioned before, WP:SLOP). It's also not perfectly readable for those who have large resolution monitors as I mentioned before as well. Nihlus 20:09, 15 October 2017 (UTC)
@Nihlus: You don't like it and that you think it's unnecessary, what am I supposed to do with that? It is a legitimate tweak that adresses the issues enumerated in Template talk:Shortcut#Proposal. Regarding readability, the original proposal had a 85% font size, which conforms to Wikipedia:Manual_of_Style/Accessibility#Text. I've changed the last version above to 85% as well (it was 80%). Regarding the tucking effect you mentioned earlier, I think maintaining the current bottom margin (.3em instead of 0) will solve it. Atón (talk) 21:32, 15 October 2017 (UTC)
You're not supposed to do anything until you obtain consensus. I've already made my point that nothing should change, so I'm not going to re-argue it over and over again. Nihlus 21:41, 15 October 2017 (UTC)

──────────────────── Consensus is not unanimity; no single editor has veto power. Readability was the issue; the new proposal has a larger line spacing, wider margins, and conforms to all accessibility guidelines. Would anyone else object? Atón (talk) 07:54, 16 October 2017 (UTC)

Line spacing is smaller, not larger. --Redrose64 🌹 (talk) 15:51, 16 October 2017 (UTC)
I meant to say that line spacing in the new proposal -see conversation above- is larger than in the original proposal. Atón (talk) 07:10, 17 October 2017 (UTC)
  • Agree with spacing compression (it will actually be useful in places with shortcut boxes crowding each other), disagree with de-boldfacing (per Nihlus, above), and am neutral on the underline.  — SMcCandlish ¢ >ʌⱷ҅ʌ<  19:53, 10 November 2017 (UTC)
  • After looking it over, I am fine with the compression and underline. However, I want to keep the bold. See the example to the right. Nihlus 20:02, 10 November 2017 (UTC)
    • SMcCandlish and Nihlus, I'm glad we can reach an agreement. I can live with the bolded shortucts. However, and I'm going to sound very nit-picky, would you object to debolding the heading? It would make the shortcuts, the truly important information, stand out more cleary. You can see how it would look in Template:Shortcut/testcases. Atón (talk) 12:04, 12 November 2017 (UTC)
      I was going to suggest that myself; the underline serves the same purpose as the bold (emphasis) but is a distinct form of it, and better sets off the actual shortcuts from their label. Shown to the right.  — SMcCandlish ¢ >ʌⱷ҅ʌ<  18:06, 12 November 2017 (UTC)
It's honestly not my favorite, but I'm fine with it if others prefer it. Nihlus 18:14, 12 November 2017 (UTC)

Protected edit request on 17 November 2017

Per discussion above, please change:

  • line 89: ('margin', '.3em .3em .3em 1em') to ('margin', '0em 0em 0em 1em')
  • line 90: ('padding', '.4em .6em') to ('padding', '.3em .6em .2em .6em')
  • line 93: delete line to force default line height

To format the heading, please replace line 95 with

	if shortcutHeading then
		shortcutList
			:tag('div')
				:css('display','inline-block')
				:css('border-bottom','1px solid #aaa')
				:css('margin-bottom', '.2em')
				:css('font-weight', 'normal')
				:wikitext(shortcutHeading)
	end
	shortcutList

To remove the colon ( : ) from the heading, no longer necessary, please delete it from Module:Shortcut/config. Thank you. Atón (talk) 16:37, 17 November 2017 (UTC)

@Atón: Not done: please make your requested changes to the template's sandbox first; see WP:TESTCASES. I see no significant difference between Template:Shortcut and Template:Shortcut/sandbox. --Redrose64 🌹 (talk) 19:21, 17 November 2017 (UTC)
The changes are to be made in Module:Shortcut. The changes were made in Module:Shortcut/sandbox first. Atón (talk) 22:00, 17 November 2017 (UTC)
Done — Martin (MSGJ · talk) 00:29, 19 November 2017 (UTC)
Thank you Martin. Just one more thing, could you please also remove the colon ( : ) at the end of the 'shortcut-heading' string in Module:Shortcut/config? It has become redundant. Thanks. Atón (talk) 12:06, 19 November 2017 (UTC)
Sure — Martin (MSGJ · talk) 08:47, 20 November 2017 (UTC)

Also change Template Shortcut?

See discussion at Template_talk:Template_shortcut#Proposed_style_adjustment - Evad37 [talk] 01:41, 23 November 2017 (UTC)

Length of the line

I find the new underline ugly especially when accompanied by shortcuts with comparatively long names. I think it needs to be wider:

Side by side comparison
{{Shortcut}}{{Shortcut/sandbox}}

Wouldn't you agree? Nardog (talk) 05:39, 30 November 2017 (UTC)

@Redrose64, Atón, Nihlus, and SMcCandlish: I would like to hear your opinion. Nardog (talk) 22:19, 14 December 2017 (UTC)

I personally find the shorter line more beautiful, but I guess it's a matter of personal taste, so I wouldn't oppose the change if others agree with it. Atón (talk) 07:39, 15 December 2017 (UTC)
I prefer the shorter line. Nihlus 23:11, 19 December 2017 (UTC)

Anchor functionality proposal

We should modify this template to emit anchors for the shortcut(s), for the part after FOO:. This would make the shortcut name work in the page in #QUUX form, which seems to be desirable given the frequency with which people insert {{Anchor|QUUX}} for any given case of {{Shortcut|Wikipedia:QUUX}}, so that [[WP:Barbaz#QUUX]] works, as frequently expected to.

This would obviate the need to keep adding {{Anchor}} clutter all over the place; people actually edit-war about that stuff at highly-shortcutted pages like WP:NOT. Just get rid of the whole mess. This would need to be done in Lua, to efficiently parse out strings like "WP:", "WT:", "MOS:".  — SMcCandlish ¢ >ʌⱷ҅ʌ<  20:04, 12 November 2017 (UTC)

I definitely support this with the option of not anchoring coded. However, couldn't we just use: {{#invoke:String|replace|source=MOS:TEST|pattern=.*:|replace=|plain=false}} → TEST ? Nihlus 20:21, 12 November 2017 (UTC)
Why I suppose we could!  — SMcCandlish ¢ >ʌⱷ҅ʌ<  22:35, 14 December 2017 (UTC)

Transwiki help

I know that this question doesn't have anything to do with the way this template works on this project, but I figured that this is the best place to ask for help. So, I wanted to use this template on Bosnian Wikipedia, so I copied over the module, its configuration and this template that it uses, but the code doesn't seem to generate properly. Take a look at the shortcut box on the right here. This is the code it generates:

<div class="shortcutbox plainlist noprint" role="note" style="float:right;border:1px solid #aaa;background:#fff;margin:0em 0em 0em 1em;padding:.3em .6em .2em .6em;text-align:center;font-size:85%;font-weight:bold"><div style="display:inline-block;border-bottom:1px solid #aaa;margin-bottom:.2em;font-weight:normal"><a href="/wiki/Wikipedia:Pre%C4%8Dica" title="Wikipedia:Prečica">Prečica</a>
</div><ul></ul><li><span class="plainlinks"><a class="external text" href="//bs.wikipedia.org/w/index.php?title=WP:JL&amp;redirect=no">WP:JL</a></span></li></div>

Notice that the <ul> tag just opens and then immediately closes instead of opening before <span class="plainlinks"> and closing after </li>, which would get rid of the preceding bullet. Does anyone know how to fix this? – Srdjan m (talk) 09:57, 15 March 2018 (UTC)

That is a question for MSGJ (talk⧼dot-separator⧽contribs) or Mr. Stradivarius (talk⧼dot-separator⧽contribs), who did most of the work on Module:Shortcut. --Redrose64 🌹 (talk) 11:23, 15 March 2018 (UTC)
What I can think of is that the bosnian wikipedia has switched from HTML tidy (see mw:Parsing/Replacing_Tidy) to Remex, which would produce different output in html. So it may actually be a problem that has to be fixed here too - because we're also supposed to do the switch. I believe I've Fixed it, per [1]. Same fix (or if there's slightly better way that Mr. Stradivarius knows of) should be done here Galobtter (pingó mió) 12:36, 15 March 2018 (UTC)
Oh, yeah... I completely forgot about the Remex switch. Thanks! – Srdjan m (talk) 20:31, 16 March 2018 (UTC)
@Galobtter: I noticed a similar issue here, except the <ul>...</ul> tag is missing altogether. Here's the English version for comparison. Do you mind taking a look? I think it's to do with the Side box module, which was copied from here, so it's probably going to affect this wiki as well when the Remex switch happens. – Srdjan m (talk) 13:37, 21 March 2018 (UTC)
Srdjan m actually a problem with Module:Uses Wikidata - just missing <ul> around a <li> tag; fixed here and at bs:Modul:Uses_Wikidata Galobtter (pingó mió) 10:45, 30 March 2018 (UTC)
Awesome. Thank you! :-) – Srdjan m (talk) 10:47, 30 March 2018 (UTC)

Rename to linkbox?

I am thinking to propose that this template be renamed to "linkbox". I think I have noticed over many years that some people think new shortcuts need the use of this shortcut template, whereas this template is less about shortcuts and more about WP:LINKBOXES. --SmokeyJoe (talk) 01:07, 22 June 2018 (UTC)

Inline option?

We should provide and 'inline' option for multiple shortcuts, e.g. instead of {{Shortcut|WP:V|WP:VERIFY}} giving

we would have {{Shortcut|WP:V|WP:VERIFY|WP:FOOBAR|WP:BOTS|WP:BOTNEWS|WP:BOTN|inline=yes|width=20em}}

giving something like

Shortcuts

WP:V · WP:VERIFY · WP:BOTS · WP:BOTSNEWS · WP:BOTN · WP:BOTN

This is obviously an exaggerated example, but something like

Shortcuts

WP:B · WP:BOTS

would be perfectly reasonable in many cases. @Johnuniq:, something for you? Headbomb {t · c · p · b} 08:14, 26 August 2018 (UTC)

I just added this page to my watchlist and may be able to look in a few days but not at the moment. This sounds like a job where {{hlist}} would be used, or more likely the hlist class which I have seen somewhere but know little about. Johnuniq (talk) 09:53, 26 August 2018 (UTC)
It's certainly not a high-priority option, no rush. Headbomb {t · c · p · b} 10:56, 26 August 2018 (UTC)
Why bother? If people abide by WP:2SHORTCUTS the box will not expand beyond three lines (plus the overhead of padding, border and margin). --Redrose64 🌹 (talk) 18:27, 26 August 2018 (UTC)
There are some spaces where vertical space is limited, and this would be nice to use. And many, many pages don't abide by WP:2SHORTCUTS. Headbomb {t · c · p · b} 18:39, 26 August 2018 (UTC)
Headbomb, can you provide examples where this would be beneficial? Nihlus 19:26, 26 August 2018 (UTC)
One place I was looking to use it was at WP:5P. I was trying to separate the 5P1 on its own line, but keeping too shortcuts interfere with my plans. Headbomb {t · c · p · b} 19:31, 26 August 2018 (UTC)