Page MenuHomePhabricator

Enable the use of Unicode characters as icons
Open, Needs TriagePublic

Description

Unicode has many code pages dedicated to symbols that can satisfy a range of needs for icons. They are also much lighter to use.

Details

Related Gerrit Patches:

Event Timeline

ahmad created this task.Jan 3 2018, 11:20 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJan 3 2018, 11:20 PM

Great suggestion. I will try to get to add this functionality in the future.

Change 490205 had a related patch set uploaded (by أحمد; owner: أحمد):
[mediawiki/extensions/TitleIcon@master] Enable the use of Unicode characters as icons in extension TitleIcon

https://gerrit.wikimedia.org/r/490205

ahmad added a comment.EditedFeb 12 2019, 11:51 PM

I just submitted a patch, referenced above, which can be seen in action at https://arabdigitalexpression.org/wiki/مستخدم:أحمد, featuring two icons added to the title: one is a regular "file:" from the wiki, an the other a string of Unicode codepoints representing an emoji+modifier.

It would be even better to suppoort Font-Awesome icons, especially as they are bundled with twitter boostrap 4 (glyphicons in boostrap 3) and there are a lot of skins supporting twitter bootstrap for MediaWiki.

As the property Title Icon is already of type text, it would be easy to set

[[Tilte Icon::fas fa-info-circle]] or [[Tilte Icon::<span class="fas fa-info-circle"></span>]]

Which should result in

<span class="fas fa-info-circle"></span>

were the icon should appear. Regarding sizing, something like

<span class="fas fa-info-circle fa-2x"></span>
``` might be needed.

Agreed! Somebody else made exactly the same request while I was at the Hackathon a couple of weeks ago. I'd like feedback on several potential - possibly backward-incompatible - changes:

  1. I'm considering changing to a parser function to set the icons. This would allow passing in a format parameter (file, Unicode, Font-Awesome) with the value parameter, which would eliminate some of the complications discussion on the patch above (https://gerrit.wikimedia.org/r/490205).
  1. I'm considering changing the extension so that it does not require Semantic MediaWiki. It could use page properties or the new Multi-Content Revisions capability for storage instead. This would allow wikis without Semantic MediaWiki installed to use the extension. This would require changing to a parser function to set the icons as described in 1).
  1. Since both of those would be backward-incompatible changes, I'm wondering if I should leave this extension alone and either create a new extension or add this functionality to the DisplayTitle extension (since the icons are displayed with the title of the page).

Thoughts?

  1. I don't have a problem with parser functions even if it breaks changes. If you upgrade your wiki, you know that in advance and can change that accordingly.
  1. As with CommentStreams I like the approach that SMW is not a prerequisite, but is supported if it is available.
  1. Hmm. I have neither used the DisplayTitle extension yet, not Semantic Title. But I do think that it is a good option to merge the functionality of all three into one, it that is feasible.
cicalese moved this task from Inbox to Backlog on the User-Cicalese board.Jul 26 2019, 8:08 PM