Template talk:Sort under

Suggest making class=sort-under the default. That being the one with the centered icons
. This is easier to remember and do. It follows this pattern of adding a dash, and nothing else, to form these TemplateStyles classes:

I just copy and paste these 2 rows to many tables. The pattern is obvious to others too. --Timeshifter (talk) 07:00, 28 January 2024 (UTC)


 * Adding a  class would be 16 extra selectors in the styles, so I would rather not. Originally, I was going to have one class (right aligned) and no other alignment options, but decided to offer a second option. Jroberson108 (talk) 07:09, 28 January 2024 (UTC)
 * . At Template:Sort under/styles.css wouldn't just removing all instances of "-center" accomplish what I am asking for? Most people want the icon in the center.
 * So there would be only 2 classes:
 * sort-under
 * sort-under-right
 * By the way, so far I have looked at the template doc examples in iphone SE 2020 in Safari, Firefox, Edge, Chrome, and Opera. All the examples look good, and they sort fine. And the unsortable class is working too (not sorting). --Timeshifter (talk) 07:32, 28 January 2024 (UTC)
 * Good to know it works in your iPhone browsers. I thoroughly tested it in Windows 10 Chrome/Edge/Firefox (all skins), Android Chrome/Firefox (Minerva skin), and Android Wikipedia app. Jroberson108 (talk) 07:36, 28 January 2024 (UTC)
 * In the iphone all the browsers were in mobile view. I looked at the bottom of the template page in each browser just now, and they all had the "desktop" toggle link.
 * There is something to be said for simplicity. Template:Sticky header may be new, but it is already popular: Over 400 transclusions so far:
 * https://templatecount.toolforge.org/index.php?lang=en&namespace=10&name=Sticky_header#bottom
 * Currently, sort under is not transcluded in any article pages. So making "class=sort-under" the default class will not cause any major problems. There is no need for "class=sort-under-center".
 * Sorting row only has 200+ transclusions currently:
 * https://templatecount.toolforge.org/index.php?lang=en&namespace=10&name=Sorting_row#bottom
 * It is not easy to use, because it is easy to place it in the wrong place. And it doesn't allow attributes to its header cells.
 * sort under will be used much more if its pattern follows the typical TemplateStyles simplicity. --Timeshifter (talk) 08:49, 28 January 2024 (UTC)
 * You don't need to continue pushing your same opinion. I've heard you, considered it even before you brought it up, and disagree. This template offers two alignment options, which these classes clearly describe. I literally just went live with it by sharing a link at T35249. Give others time to review it and give their opinions, if they are still interested. You are welcome to invite other editors to review the template. If there is a strong consensus from several editors that only one alignment is needed, which could be "right" not "center", then I will remove one and shorten the other. Like I mentioned earlier, I originally was going to have one short class for moving it under while maintaining the current right alignment. The only reason I added a center option is because I see in the other template and the related phab task that there is some preference. I have not seen others clearly give the same preference, so I gave clear options with the option of adding a clear "left" if there is enough demand. Jroberson108 (talk) 15:43, 28 January 2024 (UTC)

Thanks for creating this template. I provided more reasons for my point of view. That is not "pushing" my point of view. I don't appreciate that characterization.

I agree with getting more opinions, and doing as you say (I paraphrase): Use class=sort-under for the more popular choice.

I left requests for comments (directing them here) at Help talk:Table, Help talk:Sortable tables, Village pump (technical), and T35249. --Timeshifter (talk) 22:15, 28 January 2024 (UTC)


 * You're welcome, and hopefully this template helps. If you were just giving more reasons to support your opinion, then I apologize and mean no offense. I just want to hear from others too. Thanks for reaching out for more comments. Jroberson108 (talk) 22:19, 28 January 2024 (UTC)

Here is an example of a table excerpt (from here) with columns with differing text alignment. It uses sorting row. Specifically:

I think it would look weird for those left-aligned text columns to have right-aligned sorting icons.

Tables using table alignment often have a mixture of column alignments. And nearly all tables have a left-aligned first column. --Timeshifter (talk) 00:51, 31 January 2024 (UTC)


 * I realize I haven't given my own preferences, so I'll just state them here, not that it matters since no other editors have joined for almost a week. Mine is for right alignment because that is the normal location where sortable and other spreadsheet applications put it. Even adding a separate sorting row without sorting row aligns it right unless otherwise styled. Left aligned seems usable only on sites that have right-to-left text like Arabic. Center aligned is too prominent for something that isn't content, and distracts my reading experience when going from the header to its data. On wider columns, right aligned arrows are far less distracting than on narrower columns. I'm fine with this template offering both right and center alignment for the different preferences, but if I had to choose one, then it would be right alignment. Jroberson108 (talk) 03:40, 3 February 2024 (UTC)
 * OK. I am surprised that anybody likes it right aligned when the sorting icon is below the column header text. No one ever complained about sorting row being center aligned, that I remember.
 * I asked for comments at the Village Pump instead of here. See:
 * Village pump (technical)
 * I put up 3 tables there for people to choose from. --Timeshifter (talk) 08:40, 3 February 2024 (UTC)
 * I don't recommend splitting the discussion in two locations, it's just going to confuse things further. Also, it's not a "choose one" discussion, but a "multiple or one". Jroberson108 (talk) 08:48, 3 February 2024 (UTC)
 * It's not working here. We tried, and as you said: "no other editors have joined for almost a week."
 * It's a "choose one" discussion concerning a default class: class=sort-under for the more popular choice.
 * I doubt anyone will choose left-aligned. But if so, it is no big deal to provide that option too. We have 2 classes now: (center and right-aligned).
 * It is common to go to the Village Pump for more opinions, expert advice, etc. when discussion is inadequate elsewhere.
 * --Timeshifter (talk) 09:14, 3 February 2024 (UTC)
 * I'm haven't been discussing "choose one" for a "default" or, as you put it, "popular choice" class. I've already said I'm against it and repeatedly said that the current classes clearly describe the alignments. I would never propose adding ambiguity when there are multiple options. What I am discussing is this: "If there is a strong consensus from several editors that only one alignment is needed, which could be "right" not "center", then I will remove one and shorten the other." Jroberson108 (talk) 09:56, 3 February 2024 (UTC)
 * Here, and on 4 different talk pages trying to get people here, I specifically said that we would use class=sort-under for the more popular choice. I thought you agreed, and said so (see previous posts). Your statement above sounded like that to me. If it was an incorrect interpretation, you waited a long time to correct me.
 * Now you are back to your original position of ignoring my point about simplicity working to make templates get used more.
 * You don't own this template even though you did the initial work on it. Let's see what others say.
 * There is no reason there can't be 4 options. Left, right, center, and default.
 * In fact since you are so dead set against using the default class=sort-under option, then don't use it. But we will let others use it. Those who want to use the long version can do so. Everybody is happy. No one is imposing their class on another. Those, like me and many others, who want to save time, will use class=sort-under, knowing it is the more popular choice. --Timeshifter (talk) 10:59, 3 February 2024 (UTC)
 * I've been very clear in my responses even clealy saying "disagree" and brought up an alternative. I didn't correct you because it sounded like you were just rallying support for your "default" preference and they were going to respond on this talk page and see what was being discussed anyways. The responses moved, so I responded. I don't waste my time trying to correct everything everyone might say incorrectly. You are using some choice words I don't appreciate like "ignoring" that doesn't assume good faith. I disagreed, not ignored. As far as adding four options, my first response also applies. You've provided no solid metrics to back your claim of "templates get used more" or "saves time" and pointed to no discussions showing consensus for "many others" or "popular". I agree that there needs to be a consensus for the requested changes. Jroberson108 (talk) 13:07, 3 February 2024 (UTC)
 * I wrote previously: "I agree with getting more opinions, and doing as you say (I paraphrase): Use class=sort-under for the more popular choice. I left requests for comments (directing them here) at Help talk:Table, Help talk:Sortable tables, Village pump (technical), and T35249."
 * You didn't say anything about disagreeing with that. So it is too late to disagree now that people will be responding assuming that they are responding concerning a default class=sort-under.
 * And anyway I provided a solution that lets people use whatever alignment they want: 4 options. Left, right, center, and default.
 * Unless you find consensus against that I will put it into the CSS myself. Maybe not for left, if no one wants it.
 * And what is this disrespectful BS: "You've provided no solid metrics to back your claim of 'templates get used more' or 'saves time'."
 * I told you it saved me time. That should be good enough since you know that I edit a lot of tables. --Timeshifter (talk) 13:57, 3 February 2024 (UTC)
 * Get consensus for the requested changes. Jroberson108 (talk) 14:54, 3 February 2024 (UTC)

For those who are interested. Someone at the technical Village Pump suggested going to this MOS discussion page since it is a style discussion, and not a technical problem. See: --Timeshifter (talk) 14:07, 4 February 2024 (UTC)
 * Wikipedia talk:Manual of Style/Tables

Sort under makes table float to the center
A table using sort under on WTA 1000 Series singles records and statistics floats centered. Removing it fixes the issues. Can you please fix this? Qwerty284651 (talk) 17:03, 1 July 2024 (UTC)


 * This template isn't causing it. You can remove this template and most of the columns and see the table is still centered. Removing the table's "margin:auto" style fixes it. Jroberson108 (talk) 17:47, 1 July 2024 (UTC)
 * Changing it to margin:0 resolved it. Qwerty284651 (talk) 18:00, 1 July 2024 (UTC)
 * I removed margin:0. It doesn't seem necessary. See table after I formatted it further:
 * https://en.wikipedia.org/w/index.php?title=WTA_1000_Series_singles_records_and_statistics&oldid=1232157291#Title_leaders
 * --Timeshifter (talk) 07:49, 2 July 2024 (UTC)
 * I made the table with sticky row headers for easier navigability when horizontally scrolling on mobile. That's why margin:0 was used to remove the whitespace Template:COVID-19 pandemic data/styles.css causes.
 * I also proposed some new designs of the table on the project's talk page. How do I remove the whitespace caused by columns-list? Qwerty284651 (talk) 13:09, 2 July 2024 (UTC)
 * OK. Feel free to revert some of my changes. I may do it sooner. Sticky row headers are nice. I am not seeing them though in Firefox at Wikipedia talk:WikiProject Tennis. I am seeing them in Chrome there. Maybe  can help with that there.
 * I don't know where you are using columns-list.
 * If it is a possibility for the table header glossary above the table, then I suggest that this is better, and more compact:
 * Help:Tables and locations
 * And it wraps better as the screen width narrows. --Timeshifter (talk) 17:19, 2 July 2024 (UTC)
 * Try zooming in to 200/250% to see the sticky headers or go on mobile. I proposed the columns list in versions 1-3 on WT:TEN. Qwerty284651 (talk) 17:26, 2 July 2024 (UTC)
 * Firefox problem with showing sticky row headers has been fixed on WT:TEN.
 * The flat-list glossary fixes the white-space problem. I mean the unneeded space between columns-list and the table. --Timeshifter (talk) 19:53, 2 July 2024 (UTC)
 * Sticky rows CSS code adds whitespace, which I resolved it with margin:0. Qwerty284651 (talk) 19:56, 2 July 2024 (UTC)
 * I was experimenting with columns list, wanted them to be listed column by column rather than by row with the glossary. Qwerty284651 (talk) 19:59, 2 July 2024 (UTC)
 * Let's discuss whitespace further at WT:TEN to avoid duplication. --Timeshifter (talk) 20:42, 2 July 2024 (UTC)
 * Already doing that. Qwerty284651 (talk) 20:47, 2 July 2024 (UTC)