From 4b7e5799bf6e5bbc8c6cc3ba1f332faf21a266d9 Mon Sep 17 00:00:00 2001 From: Scarriffle Date: Mon, 1 Jun 2026 19:20:31 +0200 Subject: [PATCH] refactor: group icons are semantic keys, not emoji (display_title drops glyph) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Group icons move from OS-emoji (which render differently per platform) to semantic keys rendered natively per client. The combined view's display_title therefore no longer embeds an icon glyph — group-calendar events are distinguished by their colour; only the owner/creator first-name is prefixed. Co-Authored-By: Claude Opus 4.8 --- backend/routers/groups_router.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/backend/routers/groups_router.py b/backend/routers/groups_router.py index c7c7cdd..314e088 100644 --- a/backend/routers/groups_router.py +++ b/backend/routers/groups_router.py @@ -316,16 +316,16 @@ def _first_name(name: Optional[str]) -> str: def _decorate_title(title: str, *, is_group: bool, creator: Optional[dict], - owner: Optional[dict], me_id: int, group_icon: Optional[str]) -> str: + owner: Optional[dict], me_id: int) -> str: """Server-side display title for the combined view so every client (web, - iOS, Android) renders group events identically: the group's own icon for - group-calendar events, the owner's first name for other members' events. - The raw `title` is left untouched for editing.""" - icon = group_icon or "👥" + iOS, Android) renders identically: another member's / creator's first name + is prefixed. No icon glyph is embedded — group icons are semantic keys the + clients render as native vector icons, and group-calendar events are + distinguished by their (group) colour. The raw `title` stays for editing.""" if is_group: if creator and creator.get("id") is not None and creator.get("id") != me_id: - return f"{icon} {_first_name(creator.get('display_name'))}: {title}" - return f"{icon} {title}" + return f"{_first_name(creator.get('display_name'))}: {title}" + return title if owner and owner.get("id") is not None and owner.get("id") != me_id: return f"{_first_name(owner.get('display_name'))}: {title}" return title @@ -413,7 +413,7 @@ def combined_events( # so all clients render identically; raw `title` kept for editing. b["display_title"] = _decorate_title( b.get("title", ""), is_group=is_group, creator=b.get("creator"), - owner=owner, me_id=current_user.id, group_icon=group.icon, + owner=owner, me_id=current_user.id, ) all_events.append(b)