Community Wishlist Survey 2017/Multimedia and Commons/Support CSS files associated to SVG as media files
Support CSS files associated to SVG as media files
- Problem: There are a number of svg maps presenting statistical information or locations for countries or regions. Every time a new information is presented the map is duplicated and adapted to the information to be shown. This leads to several problems: (1) increases the size of data to be stored - the same geographical information is copied every time (2) requires skills to manipulate these images using software or knowledge of the svg format and (3) requires several images to be corrected if the basic geographical information is changed. As an example the following maps are based on the same geographical information but present different data. Each time the map of 12 MB is copied and modified:
CSS files associated to svg images can be used to present information without changing the svg file. Entities from the picture can be coloured using their ids in a separate file. This file than can be used in association with the basic svg as a picture instead of creating new image every time. A simple text editor can be used to manipulate data given that the basic svg is formed in a convenient manner.
- Who would benefit: Wikimedia Commons, editors
- Proposed solution: Allow CSS files associated to svg files to be used as media.
- More comments:
- Phabricator tickets:
- Proposer: Ikonact (talk) 14:54, 14 November 2017 (UTC)
- Translations: none yet
Discussion
editProbably doable with the Graph extension? Ping @Yurik: --Tgr (WMF) (talk) 00:41, 20 November 2017 (UTC)
- Yes and no. I don't think you can customize the SVG files, BUT you can store the file as geojson (using .map on commons), and customize its visualization (e.g. specify which region should be shown with what style). Also, graph could allow you to draw an image, and draw things on top of it. --Yurik (talk) 20:14, 20 November 2017 (UTC)
- Hi, thanks for the comments. I think Graph is a good tool and may be very useful. I do not know how practical will be to present the examples above with 36538 occurrences of polygon elements. --Ikonact (talk) 09:23, 21 November 2017 (UTC)
- Yes and no. I don't think you can customize the SVG files, BUT you can store the file as geojson (using .map on commons), and customize its visualization (e.g. specify which region should be shown with what style). Also, graph could allow you to draw an image, and draw things on top of it. --Yurik (talk) 20:14, 20 November 2017 (UTC)
- This would depend on whether our SVG renderer (librsvg) can support external CSS. I'm not sure whether it can or not. Would be good to test. Ryan Kaldari (WMF) (talk) 23:07, 20 November 2017 (UTC)
- That's a good question. I suppose a way to do this is to save locally the svg file with the css included before render it. --Ikonact (talk) 09:23, 21 November 2017 (UTC)
- Note, we intentionally disable network support in librsvg for security reasons (Which is why for example including external images aren't supported except by data: uris). BWolff (WMF) (talk) 23:04, 28 November 2017 (UTC)
- That's a good question. I suppose a way to do this is to save locally the svg file with the css included before render it. --Ikonact (talk) 09:23, 21 November 2017 (UTC)
This is a cool use case but I'm not sure how the implementation would look - we don't have any clean way of handling multiple files as one media item, and working around that would make our media handling code more hacky, and it's already a DX horror show. So I am mildly against this - maybe in a few years it can be implemented cleanly on top of MCR --Tgr (talk) 06:31, 28 November 2017 (UTC)
- It would also mean that users would not be able to download a standalone file that just worked, which seems unfortunate. BWolff (WMF) (talk) 23:04, 28 November 2017 (UTC)
- Can still screen-grab it. — SMcCandlish ☺ ☏ ¢ ≽ʌⱷ҅ᴥⱷʌ≼ 08:00, 4 December 2017 (UTC)
I would REALLY appreciate this -- I recently made a similar wish in the German WP (or at least parked it because I missed the deadline). -- Christallkeks (talk) 13:00, 6 December 2017 (UTC)
If anyone's still watching this: I submitted a wish very similar to this one for this year's survey -- Christallkeks 30th October 2018
- @Viciarg, Ikonact, Liuxinyu970226, Draceane, Iliev, Thomas Obermair 4, Donald Trung, Swpb, Giovanni Alfredo Garciliano Diaz, Uglemat, Alexmar983, Talmoryair, LikeLifer, Reneman, Psychoslave, Martin Kraft, and יונה בנדלאק: Sorry for the spam, but you may want to vote on my very similar wish for this year's survey: VOTE HERE -- Best wishes, Christallkeks (talk) 13:23, 17 November 2018 (UTC)
Voting
edit- Support —viciarg414 08:24, 28 November 2017 (UTC)
- Support Ikonact (talk) 08:35, 28 November 2017 (UTC)
- Support --Liuxinyu970226 (talk) 13:15, 28 November 2017 (UTC)
- Support — Draceane talkcontrib. 18:37, 28 November 2017 (UTC)
- Support — Luchesar • T/C 21:58, 28 November 2017 (UTC)
- Support Thomas Obermair 4 (talk) 23:01, 28 November 2017 (UTC)
- Support Donald Trung (Talk 🤳🏻) (My global lock 🔒) (My global unlock 🔓) 10:58, 29 November 2017 (UTC)
- Support Swpb (talk) 21:06, 29 November 2017 (UTC)
- Support Giovanni Alfredo Garciliano Diaz (talk) 22:20, 29 November 2017 (UTC)
- Support - yona B. (D) 08:29, 30 November 2017 (UTC)
- Support Uglemat (talk) 07:01, 1 December 2017 (UTC)
- Support that could be interesting.--Alexmar983 (talk) 14:14, 3 December 2017 (UTC)
- Support Talmoryair (talk) 17:01, 3 December 2017 (UTC)
- Support LikeLifer (talk) 18:07, 3 December 2017 (UTC)
- Support Reneman (talk) 17:11, 5 December 2017 (UTC)
- Support Would be SO handy! Christallkeks (talk) 12:59, 6 December 2017 (UTC)
- Support Psychoslave (talk) 08:29, 11 December 2017 (UTC)
- Support Martin Kraft (talk) 17:58, 11 December 2017 (UTC)
- Support--Alexmar983 (talk) 13:26, 17 November 2018 (UTC)