Files
wekan/client/components/notifications/notificationIcon.jade
T
Lauri Ojansivu 3487d2519d One icon set: Font Awesome. The Grey Icons feature is removed.
WeKan used colourful Unicode emoji as its icon set in 8.00-8.24 only; before and
after, the icons are Font Awesome 4.7. A handful of emoji had survived that
change - every notification type, the board star, the vote-against thumb, the
spent-time badge, the reaction and add buttons, the list width toggles, the
bookmarks star, the back arrow, the custom-field pencil, the notification bin,
the sidebar's plus and hash, the four date badges in cardDate.css and
minicard.css, the mobile drag handle, the multi-selection tick, and the gantt
day markers. Each of those is a different picture on every platform, at a size
and colour the stylesheet does not control. They are Font Awesome glyphs now:
either an `i.fa` element, or the codepoint (`content: "\f11e"`) with the font
named, since `time::before` is not an `.fa` element. The helpers that produced an
emoji return a class name instead, and their templates render an `<i>`.

"Grey Icons" in Member Settings existed to grey exactly those emoji. It ran a
MutationObserver over every rendered subtree, for the whole session, wrapping any
text node that was one of ~50 emoji in a span it could greyscale - and only 13 of
those emoji were still anywhere in the app. With them gone it has nothing left to
find, so the feature is removed whole: the menu entry, the click handler, the
`toggleGreyIcons` method, the `hasGreyIcons` helper, the `profile.GreyIcons`
schema field and its published-fields entry, the `userGreyIcons` publication and
its subscription, unicode-icons.js/.css and the feature import, twelve
`body.grey-icons-enabled` CSS rules across six stylesheets, the `grey-icons`
string in all 147 language files, the field in public/api/wekan.yml and
wekan.html, and the two mentions in docs/DeveloperDocs.

The language flags in the language picker stay: Font Awesome 4.7 has no flags.

tests/fontAwesomeIcons.test.cjs fails on an emoji in any template or any CSS
`content:`, checks the date badges name the font and use the four codepoints,
checks the icon-producing helpers return class names, and checks that no part of
the removed feature is left anywhere.

Thanks to xet7 !
2026-07-27 11:28:52 +03:00

71 lines
2.7 KiB
Plaintext

template(name='notificationIcon')
if($in activityType 'deleteAttachment' 'addAttachment')
span.activity-type(title="attachment")
i.fa.fa-paperclip
else if($in activityType 'createBoard' 'importBoard')
span.activity-type(title="board")
i.fa.fa-folder-open
else if($in activityType 'createCard' 'importCard' 'moveCard')
+cardNotificationIcon
else if($in activityType 'moveCardBoard' 'archivedCard' 'restoredCard')
+cardNotificationIcon
//- $in can only handle up to 3 cases so we have to break this case over 2 cases... use a simple template to keep it
//- DRY and consistant
else if($in activityType 'addChecklist' 'removedChecklist' 'completeChecklist')
+checklistNotificationIcon
else if($in activityType 'uncompleteChecklist')
+checklistNotificationIcon
//- $in can only handle up to 3 cases so we have to break this case over 2 cases... use a simple template to keep it
//- DRY and consistant
else if($in activityType 'checkedItem' 'uncheckedItem' 'addChecklistItem' 'removedChecklistItem')
span.activity-type(title="checklist item")
i.fa.fa-check-square-o
else if($in activityType 'addComment')
span.activity-type.hidden(title="comment")
else if($in activityType 'createCustomField' 'setCustomField' 'unsetCustomField')
span.activity-type(title="custom field")
i.fa.fa-puzzle-piece
else if($in activityType 'addedLabel' 'removedLabel')
span.activity-type(title="label")
i.fa.fa-tag
else if($in activityType 'a-startAt' 'a-receivedAt')
span.activity-type(title="date")
i.fa.fa-clock-o
else if($in activityType 'a-dueAt' 'a-endAt')
span.activity-type(title="date")
i.fa.fa-clock-o
else if($in activityType 'createList' 'removeList' 'archivedList')
+listNotificationIcon
else if($in activityType 'importList')
+listNotificationIcon
//- $in can only handle up to 3 cases so we have to break this case over 2 cases... use a simple template to keep it
//- DRY and consistant
//- elswhere in the app we use fa-trello to indicate lists...
//- i personally like fa-columns a bit better
else if($in activityType 'unjoinMember' 'addBoardMember' 'joinMember' 'removeBoardMember')
span.activity-type(title="member")
i.fa.fa-user
else if($in activityType 'createSwimlane' 'archivedSwimlane')
span.activity-type(title="swimlane")
i.fa.fa-compass
else
span.activity-type(title="can't find icon for #{activityType}")
i.fa.fa-bug
template(name='cardNotificationIcon')
span.activity-type(title="card")
i.fa.fa-sticky-note-o
template(name='checklistNotificationIcon')
span.activity-type(title="checklist")
i.fa.fa-list-ul
template(name='listNotificationIcon')
span.activity-type(title="list")
i.fa.fa-columns