feat(desktop): restore section icon/emoji picker#1516
Conversation
Re-introduce the section icon feature that was accidentally removed in PR #1428 (workspace rail unread observer refactor). This restores the functionality originally added in PR #1424. Changes: - Add icon?: string field to ChannelSection type - Parse and persist icon in channelSectionsStorage - Add emoji picker to Create/Rename section dialogs - Render section icon in sidebar header and Move-to-section submenu - Wire icon through useChannelSections create/rename methods - Add unit tests for icon field parsing Fixes regression where section icons were stripped during the #1428 refactor. Co-authored-by: klopez4212 <klopez4212@gmail.com> Signed-off-by: klopez4212 <klopez4212@gmail.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 87f354ae07
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ? { | ||
| id: s.id, | ||
| name: newName, | ||
| ...(icon ? { icon } : {}), |
There was a problem hiding this comment.
Include icons in section publish de-dupe
When the rename dialog changes only the section icon, this new icon field is persisted locally and then queued for sync, but ChannelSectionSyncManager.isIdenticalToLastPublished() still compares only id, name, order, and assignments. After a prior successful publish, an icon-only edit keeps those fields unchanged, so the publish is treated as identical and skipped; other devices/clients never receive the restored icon change until some unrelated section field changes.
Useful? React with 👍 / 👎.
Summary
Restores the section icon/emoji feature that was accidentally removed in PR #1428 (workspace rail unread observer refactor). This brings back the functionality originally added in PR #1424.
What was lost
PR #1428 refactored
CustomChannelSection.tsxandChannelSectionDialogs.tsxand in the process removed:icon?: stringfield fromChannelSectiontypeEmojiPickerandStatusEmojirendering in section headersWhat this PR restores
icon?: stringfield onChannelSection, parsed/persisted in storage#button to pick an emoji, click X to clear)createSectionandrenameSectionaccept optional icon parameterTesting
pnpm test— all 1607 unit tests passpnpm typecheck— no type errorsFixes regression from #1428. Restores #1424.