Template talk:Species table

Table collapse
For large tables, can we get a collapse option? There are a few places I'd like to implement this template instead of manual tables, but many of those tables have a full table collapse option. - UtherSRG (talk) 11:18, 16 May 2023 (UTC)
 * Where are you thinking? Can you link an example of one? Per MOS:COLLAPSE, you're not supposed to collapse article content, so I'd be leery of making this template collapsible, but maybe I'm not picturing the context correctly. -- Pres N  11:53, 16 May 2023 (UTC)
 * Collapse the whole table might be good for larger see Lilium for example --Cs california (talk) 05:14, 17 May 2023 (UTC)
 * See below section; also, this template isn't 100% suitable for plants (the "diet" bit doesn't make sense), so if y'all want to use it for that, I may make a plant variant like I did with Plant genera table. -- Pres N  13:57, 17 May 2023 (UTC)
 * Another change I'd like to see is to make the table a little narrower. See Episynlestes... because of the width it is pushed down below the taxobox. - UtherSRG (talk) 10:40, 17 May 2023 (UTC)
 * This isn't completely solvable- I can try to sort it out for full-width computer pages, but on narrower viewports (phones, narrow screens) it's pushed below no matter how narrow it is. The real fix is for Episynlestes to have more text content before the list. Let me see what I can do, though. -- Pres N  13:43, 17 May 2023 (UTC)
 * Okay, added a "narrow-percent" field and used it in Episynlestes, though again, if you make your browser window narrower at some point the table will get pushed down anyway. -- Pres N  13:54, 17 May 2023 (UTC)
 * Indeed on all counts. I picked that article because it was the first one I found that had the width issue. (I don't use mobile for wiki, and usually have a very wide browser screen, so when things take up a lot of vertical white space, it gets annoying.) Thanks for the work! - UtherSRG (talk) 14:27, 17 May 2023 (UTC)

Suggested Fields
I think it would be a good idea to have the following: --Cs california (talk) 05:12, 17 May 2023 (UTC)
 * Subspecies fields (optional)
 * IUCN status should be blank if there is no data
 * Male / Female images (optional)
 * Table collapse for large tables
 * sortable fields
 * For subspecies, see Species table/row - it has a subspecies field already
 * If IUCN has not evaluated a species, use "NE" as the status ("Not Evaluated")
 * Multiple images should be possible; I'll look into the best way to get two images in there
 * While I respect that the table in Lilium is too long to be displayed uncollapsed, the solution isn't to make it collapsed. Collapsible options are actively discouraged for article content - tracklist, for example, had it deprecated for years, and fully removed last month. That article needs to either not have 110 images resulting in a mile-long table, or else split it into a separate list.
 * I'll see if I can get sortable working, it's a wikitable in the end so it should work
 * Okay, sorting added with the optional parameter |sortable=yes; updated the docs to show it. -- Pres N  19:03, 17 May 2023 (UTC)
 * -- Pres N  13:40, 17 May 2023 (UTC)
 * Oh sorry I meant to put subgenus / section not subspecies it was kind of late when I was writing the post. If you look at the table in juglans, Gunnera or Araucaria have decent examples.
 * How would you like this displayed? Looking at Species table/row, right now it has row 1: latin name, row 2: authority, row 3: subspecies. I'm thinking inserting a row between the latin name and authority like "Subgenus: subgenus_name", maybe with the "Subgenus" bit overridable in case you want it to be like "Section: section_name", since two of your examples have that instead. Does that work, or do you think it should be displayed differently? -- Pres N  00:15, 19 May 2023 (UTC)
 * It should probably be just like the Genus line. Maybe a new template (or a variant of the heading template) that's a subgenus/section heading? So you'd get 1 row for the Genus, then 1 row for Subgenus/Section, then 1 row for each species. Oh... howler monkey reminds me that sometimes we have species-groups instead of subgenera, so this would be helpful there, too. - UtherSRG (talk) 01:25, 19 May 2023 (UTC)
 * If I leave the IUCN blank it should automatically be NE which it is not.
 * Hmm, I started to do this, but then backed out- there's a different between "the IUCN didn't evaluated this species" and "the editor didn't put in a status". If I do this and a row is left blank, then having it come up as NE may or may not be true, which seems incorrect. -- Pres N  00:15, 19 May 2023 (UTC)
 * Unknown? Yeah, I'm not sure that there's a better solution and I'm not sure defaulting to NE works best. - UtherSRG (talk) 01:26, 19 May 2023 (UTC)
 * I'm not a fan of NE as a status. You can't prove a negative. Not having a record for a particular species in the IUCN database may mean that it hasn't been evaluated, but it may also mean that the IUCN is using a species concept that doesn't recognize a species as independent. If Wikipedia splits species that IUCN lumps (and has evaluated), I wouldn't say that the split species is really unevaluated, but I also wouldn't assume that the status given for the lumped species is necessarily applicable to the split species. I think leaving status blank is a better option than displaying NE. Plantdrew (talk) 19:02, 25 May 2023 (UTC)
 * Agreed! - UtherSRG (talk) 19:05, 25 May 2023 (UTC)
 * Alright, modified the row template to not call the IUCN template at all if the parameter is not passed, so it will be blank instead of giving an error. -- Pres N  20:13, 25 May 2023 (UTC)
 * For Size and ecology fields sometimes you dont have sufficient data it should be optional so if it is blank it does not show up.
 * Not sure if this is possible but if there is a way to automatically count the number of species it might be manually putting it in the header.
 * I'd like that, but I don't think there's a way to do it if the header and rows are different templates. -- Pres N  00:15, 19 May 2023 (UTC)
 * I don't really have an opinion on this but some people also like pulling data from wikidata. Cs california (talk) 04:18, 18 May 2023 (UTC)
 * Because of the way these templates are for items that aren't what the actual article is (e.g. each row is a species but the article is about the genus), using wikidata would require the editor to put in the wikidata id of the species for each row and then make sure wikidata is correct, as opposed to just pulling whatever the wikidata is for the article in question, which is just the same thing as now but with extra steps. I wouldn't stop anyone from adding this, but I'm not going to spend time on it. -- Pres N  00:15, 19 May 2023 (UTC)
 * I mentioned this in the above section, but, are you planning on using this template for plants? Given that all your example articles are plants. If so, would it be more helpful to make a plant variant of the template, like how we have Plant genera table vs. Animal genera table? (though Plant genera table is basically unused, as the editor I made it for decided to do different lists instead with just wikitables). Asking because I'd rather not make the size/ecology sections optional, as they're an essential part of the animal species, but they'd pretty much always be empty for plants so it'd make sense to skip them. -- Pres N  00:15, 19 May 2023 (UTC)
 * You could put a  parameter in the template to suppress the size/ecology columns. Seems simpler than making a new template. - UtherSRG (talk) 01:29, 19 May 2023 (UTC)
 * I will try it out the next time I edit.--Cs california (talk) 17:05, 19 May 2023 (UTC)
 * I will try it out the next time I edit.--Cs california (talk) 17:05, 19 May 2023 (UTC)

I've added two options:
 * "group-name", which lets you put in text to override the "Genus", e.g. "|group-name=Subgenus". For accessibility reasons, you aren't supposed to have header rows in the middle of a table, so instead of subdividing a genus table with subgenera, instead you can make a separate table for each subgenus or tribe or whatever
 * "no-ecology", which you put in this template and each row to suppress the "Size and ecology" column. Someone asked me for this as they had a family of birds where every row would have essentially the same information in this column. Is this fine for plants? Or would y'all want it to still be there but be named "Habitat" with the size and diet bullet points removed?
 * The documentation for this template and the row template has been updated with all changes. -- Pres N  18:40, 25 May 2023 (UTC)

Parallel template
I just wanted to let anyone who's interested know that I've made a parallel template to this one, Template:Paleospecies table, for fossil species. At this time it is still very rough (documentation isn't done, etc.) but I plan on improving it as I get a handle on template editing. (Also, thanks for making this original template; 90% of the new one was copied from yours). Happy editing, SilverTiger12 (talk) 01:15, 29 November 2023 (UTC)
 * Awesome, added it to the See Also links for the animal/plant templates! -- Pres N  01:34, 29 November 2023 (UTC)
 * I'm glad I got the documentation started, then. It's functional now. SilverTiger12 (talk) 01:56, 29 November 2023 (UTC)

Template use issue
I have been converting some of the templates over to this species table. The issues here are some of the issues I have ran into: -Cs california (talk) 06:45, 26 January 2024 (UTC)
 * How do you add two pics for sexually dimorphic species (eg: male and female lions)?
 * Had some issues adding the reference source for the IUCN status
 * Added an image2 / image-size2 / image-alt2 for a second species image; as I put in the documentation, you'll likely want the image-size / image-size2 to be small or else the row will be super tall. Also stuck in a status-ref parameter for the iucn reference since I guess you're not putting in either the population size or direction parameters, which is usually where that would go. See the template docs for the row template for more detail! -- Pres N  14:30, 26 January 2024 (UTC)
 * I am just translating data from one table to another and sometimes there was no population. Thanks for updating the docs. -Cs california (talk) 05:03, 27 January 2024 (UTC)
 * Is there a option for a caption for this? I have 2 images in Dendragapus and I want to distinguish the male and the female apart. -Cs california (talk) 06:55, 27 March 2024 (UTC)
 * Added two new fields: image-caption and image2-caption, which put a caption below the first/second image. If you just want a caption above the images, you can put it in the name field like |name=animal name caption text . -- Pres N  01:48, 28 March 2024 (UTC)
 * Ok I changed it see Dendragapus maybe make it less prominent like the caption in the Infobox/Speciesbox. But great work -Cs california (talk) 17:31, 28 March 2024 (UTC)