Jump to content

Template talk:Sticky table start

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Disable scroll window. And: Enable sticky headers

[edit]

I think the disable and enable buttons need to be clearer. I think there is room since nothing else is on the same line?

Suggestions: "Disable scroll window". And: "Enable sticky headers"

I think that would be clearer on my iphone SE 2020. For example here:

By the way, that page section table can not use sticky row headers, since the first column does not consist of row headers. --Timeshifter (talk) 18:15, 2 September 2024 (UTC)[reply]

@Qwerty284651: since you've been involved with this template lately, do you have an opinion on this? Mine is that disable/enable seems as clear as collapsible's hide/show. Once clicked/pressed, the reader will quickly know what it is for and it isn't hard to remember.
What is disabled and enabled is both the scrolling div and the sticky cells, which aren't necessarily headers. Other things get disabled too like the border fixes. Jroberson108 (talk) 19:39, 2 September 2024 (UTC)[reply]
When I came across it on my cell phone today, I thought "disable" was confusing. As in disable what? I can see how some would just scroll by and not even realize they missed a table. The header fills in the whole screen. Granted, after using it, it is clear. But non-regular Wikipedia readers may forget.
Other possibilities: "Open table up." ...
I assume that a row or column can be made sticky even if not a header row or column. So "enable" in almost all cases is enabling what in effect become sticky headers. So "Enable sticky headers" seems most clear. I think it will be rare to see only a scrolling table, without sticky headers at all. --Timeshifter (talk) 20:42, 2 September 2024 (UTC)[reply]
I thought about it and am gravitating towards the former "Expand/collapse", which, admittedly, might get confused with "show/hide" as they sound similar. Alternatively, something along the lines of the following can be used:
1. For expand: "show entire table", "expand table", "reveal table", "disable sticky headers"..
2. For collapse: "fit table to screen", "collapse table", "shrink table", "restore small table", "enable sticky headers"...
Can't any data cell be made sticky with class=sticky-table-left? Qwerty284651 (talk) 22:41, 2 September 2024 (UTC)[reply]
See above mentioned table. Added extra text in 1st data cell to force the table to expand beyond the page's width in mobile portrait. Qwerty284651 (talk) 23:09, 2 September 2024 (UTC)[reply]
Yes, any cell can be made sticky or not sticky, not just headers. The same goes for a single row or column. However, for the sticky-table-head option, sortable and the sticky gadget only move consecutive header rows into the thead, so that's always headers even if misused for say a totals header row that normally should be a sorttop data row or a caption in a top header row that should be caption markup. Sortable also moves sorttop data rows into the thead after sorting, so those become sticky too.
Also, although the template is built and named for tables, it isn't limited to usage for tables. It is possible that the scrollable div can be used on something else that has no need for sticky like a large graph that extends beyond the desktop's main content area, albeit predictably rarely used on non-tables. I may have questioned what the hide/show links were when I first came across them, but it was quickly and permanently answered with a single click.
The former expand/collapse was changed to the current disable/enable for accuracy because this template can be used unnecessarily on a narrow, short table or used on one that is narrow but tall that won't "expand" noticeably without scrolling down to compare. In essence, the links disable/enable this template's styling/features and the links are only visible on smaller screens like mobile to give the reader a way to disable what might be causing a readability issue, if any. Jroberson108 (talk) 02:25, 3 September 2024 (UTC)[reply]
Because its application expand beyond just tables, maybe renaming to of its existing shortcuts {{sticky top}} or {{sticky start}} would best reflect its usage, which consequently might not be immediately intuitive that it is used for tables, primarily, if "table" is removed from the title. Qwerty284651 (talk) 01:58, 5 September 2024 (UTC)[reply]
Well in that case, the "sticky" part doesn't apply. Sticky is only used in tables. For non-tables, it's just the scrollable div. Jroberson108 (talk) 03:36, 5 September 2024 (UTC)[reply]

Jroberson108. Could you give an example table here or elsewhere (version link) that uses class=sticky-table-left?

And is the only certain thing about this template is that it is in a scroll window? If so, then could the buttons be called "disable scroll window" and "enable scroll window"?

This would make the buttons distinctive from show/hide toggle buttons, and expand/collapse toggle buttons, which are used on fully collapsed tables for the most part. And never on scroll windows. --Timeshifter (talk) 03:13, 5 September 2024 (UTC)[reply]

@Timeshifter, you can find some examples here: (1, 2, 3, 4) which are using class=sticky-table-left. Qwerty284651 (talk) 03:50, 5 September 2024 (UTC)[reply]
If you want to know where sticky-table-left is used, you can just search for it. It was recently added.
Again, it doesn't just disable/enable the scroll window. The names differ from hide/show, so it is already distinctive. There are no expand/collapse buttons. Jroberson108 (talk) 03:52, 5 September 2024 (UTC)[reply]
Addendum: expand/collapse was renamed to disable/enable.
Those are the tables I linked to in my examples in the comment above. Qwerty284651 (talk) 03:57, 5 September 2024 (UTC)[reply]
I think bringing up expand/collapse earlier might have caused some confusion. Looks like your links are the same as the search, which would show more uses beyond your own. Jroberson108 (talk) 04:26, 5 September 2024 (UTC)[reply]

I did not know that expand/collapse is no longer used anywhere on Wikipedia.

Thanks for the insource search link. I used a couple insource search links in Template:Sticky table start/doc‎. I also added another table example from an article.

I understand that Template:Sticky table start does more than add a scrolling window. My point is that it does it in all cases of its use.

The meaning of show/hide is obvious. The meaning of enable/disable is not. Though it is distinctive. I want more meaning, and there is room. Adding a couple more words hurts nothing, and helps readers who don't see these scrolling tables often (which right now is almost everybody). It helps irregular Wikipedia readers even more.

disable scroll window and enable scroll window. --Timeshifter (talk) 17:16, 5 September 2024 (UTC)[reply]

I agree with the proposed names above. Qwerty284651 (talk) 17:40, 5 September 2024 (UTC)[reply]
How about "disable scroll/sticky" and "enable scroll/sticky" so we don't have a repeat of #Expanded table is not sticky. Also, background colors removed? My issue is that you only refer to the scroll, which is no different than naming it expand/collapse that implies that the sticky should still work per the linked discussion. That's why it is simply "disable" and "enable". I highly doubt disable/enable or "disable scroll/sticky" and "enable scroll/sticky" will cause any real confusion beyond this hypothetical discussion, especially after clicking the link.
Also, in your second example, using color as the only means to convey data (Active or Defunct tournament) is not accessible for screen readers. Jroberson108 (talk) 19:58, 5 September 2024 (UTC)[reply]
I am trying to ensure that they click the link.
I like "disable scroll/sticky" and "enable scroll/sticky".
--Timeshifter (talk) 20:42, 5 September 2024 (UTC)[reply]

Table design discussion

[edit]

Reenable class stacking

[edit]

Can you reenable class stacking so I can use both sticky-row1 and sticky-row2 in WTA 1000 Series singles records and statistics#Title leaders? Because of the latest edits sticky-left and sticky-none useless can't fix the span issues in mobile. Related discussion for sticky-table-left and sicky-table-none classes in #Need help with class="sticky-table-unsticky".Qwerty284651 (talk) 18:34, 6 September 2024 (UTC)[reply]

@Qwerty284651: That won't fix your issue. Because of the rowspan, you have to use sticky-table-head to make both rows top sticky. If row1 and row2 were used, the botton of the rowspans would stick out below row2 once the latter is sticky. Jroberson108 (talk) 23:57, 6 September 2024 (UTC)[reply]
That solved it. Qwerty284651 (talk) 00:11, 7 September 2024 (UTC)[reply]
I would update the doc that "adding sticky-table-row1 or -row2 disables sticky-table-head's feature of making both rows sticky". See example. Qwerty284651 (talk) 00:15, 7 September 2024 (UTC)[reply]
It does say limit one and don't combine and gives reasons. More can be added, but they need to read it. Jroberson108 (talk) 00:17, 7 September 2024 (UTC)[reply]
It does say that. Now I know. Qwerty284651 (talk) 00:23, 7 September 2024 (UTC)[reply]

Visual editor issues

[edit]

It seems like Template:COVID-19 pandemic data/United States medical cases by state has become harder to edit visually after using Sticky Table. I would appreciate if you know how to resolve this. Horizon Sunset (talk) 16:55, 12 October 2024 (UTC)[reply]

@Horizon Sunset: I'll try to look at it later. Can you explain how it is harder to edit so I know what to look for? Jroberson108 (talk) 17:03, 12 October 2024 (UTC)[reply]
If you go to my sandbox (which had the version before your edits, except I removed the invalid .css which you also removed) and click on visual editor, you can edit each cell's data. But if you go to Template:COVID-19 pandemic data/United States medical cases by state and click on "Edit with visual editor", it shows that you are editing parameters of a template instead. I am trying to make this better by reducing number of parameters within the table. Horizon Sunset (talk) 22:12, 12 October 2024 (UTC)[reply]
@Horizon Sunset: I moved the discussion to this template's talk so other's are also aware.
I narrowed the issue down to having two opening div tags in the start template and two closing div tags in the end template. Adding the div tags around the table without the template did not cause an issue. Removing one of the two div tags from each template did not cause an issue, so VE might be doing some minimal correction in it's parsing.
VE has a list of "Template issues" at Wikipedia:VisualEditor#Limitations, specifically "Unbalanced code". I don't see a way to exclude the div tags from VE. Jroberson108 (talk) 01:41, 13 October 2024 (UTC)[reply]
@Horizon Sunset: I started a discussion at Wikipedia talk:VisualEditor#Exclude transcluded unbalanced code. Will see if a solution exists. Jroberson108 (talk) 02:23, 13 October 2024 (UTC)[reply]
@Jroberson108: I really appreciate that, thank you so much:). Horizon Sunset (talk) 02:40, 13 October 2024 (UTC)[reply]
Have you tried putting the sticky table templates inside <includeonly>...</includeonly> tags on the template page? That might make it editable while maintaining the features you want when it is transcluded. – Jonesey95 (talk) 20:20, 20 October 2024 (UTC)[reply]
@Jonesey95: I assume from your sandbox edits that you saw the tags already exist in each template. Jroberson108 (talk) 10:41, 22 October 2024 (UTC)[reply]
I haven't tried includeonly tags in the sandbox. I just added them to Template:COVID-19 pandemic data/United States medical cases by state/sandbox. Is that editable with VE? – Jonesey95 (talk) 14:41, 22 October 2024 (UTC)[reply]
@Jonesey95: This template and {{sticky table end}} both already have includeonly tags in them, also in their sandboxes too. Template:COVID-19 pandemic data/United States medical cases by state/sandbox seems editable with VE now, although adding "includeonly" tags around the template transclusions doesn't seem feasible for other pages. Jroberson108 (talk) 15:58, 22 October 2024 (UTC)[reply]
Yes, I know about the tags in Sticky table start, but those don't matter once the template is transcluded somewhere else. Excluding the Sticky table templates from rendering on the page where the table needs to be edited appears to work around this shortcoming in VE. You don't give an example of a page where it is not feasible, so I can't comment on that assertion. – Jonesey95 (talk) 16:31, 22 October 2024 (UTC)[reply]
@Jonesey95: Not being feasible is in regards to having to add it to all 314 pages that transclude this template as well as expecting editors to add these extra tags around future transclusions, something I have yet to see done in this way with other templates. I see at Wikipedia talk:VisualEditor#Exclude transcluded unbalanced code that another person said there is no easy and reliable way to fix it. Minimum, a note can be added to the doc explaining VE's issue. Jroberson108 (talk) 02:10, 23 October 2024 (UTC)[reply]
If you don't want to implement this workaround, then putting a note in the documentation is probably the way to go. I found {{Vedit notice}}, but I did not find a similar standardized template that states the opposite (which surprised me). – Jonesey95 (talk) 02:19, 23 October 2024 (UTC)[reply]