fix(composer): wrap Buzz chip labels without orphaning icons - #6581
Draft
tellaho wants to merge 6 commits into
Draft
fix(composer): wrap Buzz chip labels without orphaning icons#6581tellaho wants to merge 6 commits into
tellaho wants to merge 6 commits into
Conversation
Co-authored-by: Carl <acda9e433d19dcd0e6b6840f7f4b98f3a56f1fab98049d444c087019e6d36560@buzz.block.builderlab.xyz> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Carl <acda9e433d19dcd0e6b6840f7f4b98f3a56f1fab98049d444c087019e6d36560@buzz.block.builderlab.xyz> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Carl <acda9e433d19dcd0e6b6840f7f4b98f3a56f1fab98049d444c087019e6d36560@buzz.block.builderlab.xyz> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Carl <acda9e433d19dcd0e6b6840f7f4b98f3a56f1fab98049d444c087019e6d36560@buzz.block.builderlab.xyz> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Carl <acda9e433d19dcd0e6b6840f7f4b98f3a56f1fab98049d444c087019e6d36560@buzz.block.builderlab.xyz> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Carl <acda9e433d19dcd0e6b6840f7f4b98f3a56f1fab98049d444c087019e6d36560@buzz.block.builderlab.xyz> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Category: fix
User Impact: Long Buzz link chips now wrap without overflowing in composers and sent messages; icon-bearing stubs use at most five graphemes when no earlier separator exists, so some sent chips attach the icon to a shorter prefix than before. Labels over 48 graphemes are visibly truncated in the composer while their full identity remains available to assistive technology and in the tooltip.
Problem: Long repository, issue, pull request, and channel chip labels could orphan their icon or overflow narrow composers and sent messages. Solution: Keep the icon with a bounded, grapheme-safe leading fragment while allowing the remaining text to break anywhere; cap visible labels at 48 graphemes without changing the full tooltip or accessible identity.
File changes
desktop/src/features/messages/lib/composerMessageLinkNode.ts
Splits composer chip content into an icon-bearing leading fragment and a freely wrapping remainder while preserving the semantic label and link metadata.
desktop/src/features/messages/lib/composerMessageLinkNode.test.mjs
Updates renderer assertions for the fragment structure and verifies every supported Buzz link kind retains the intended visible label.
desktop/src/shared/styles/globals/composer.css
Keeps ordinary composer mention decorations inline while relying on the existing shared markdown chip wrapping rules for Buzz links.
desktop/src/shared/ui/mentionChip.ts
Centralizes grapheme-aware leading-fragment boundaries and label truncation so composer and sent chips share the same visible identity.
desktop/src/shared/ui/markdown/BuzzLinkChip.tsx
Uses the shared grapheme-aware boundary when rendering sent-message chip fragments.
desktop/tests/e2e/navigation.spec.ts
Covers increasing wrap depth across constrained widths, icon attachment, the sent-message wrap, accessible labeling, and tooltip positioning over both edge fragments.
Reproduction steps
Screenshots
Before — the icon drops onto a separate line from its chip label
After — the icon stays attached while the remaining label wraps
The same long repository chip at three composer widths. Its label gains line breaks as space contracts, while the icon remains attached to the leading fragment.
420px — one line
210px — two lines
150px — three lines