feat(event-bar): point XPOST @handle link at the user's X profile#838
Merged
Conversation
The expanded card already wraps @handle in a link, but it looks like a chat username and reads as inline text rather than an affordance. Add a dedicated button below the post text inside .event-bottom that opens the post on x.com in a new tab. No template change — ChatXPostMessage builds the element in JS and appends it next to the post text it wraps in .event-bottom-text.
The @handle in the expanded card and the new "View Post on X" button both linked to the post URL — redundant. Username now opens the X profile (https://x.com/<handle>); the button still opens the post. Matches the standard X convention of username → profile.
ChatXPostMessage was creating its anchors imperatively via document.createElement, out of step with how the other event classes (donation, subscription, broadcast) clone #user-template for sub-elements. Reuse #user-template for the @handle link and add a small #xpost-link-template that owns the static markup of the "View Post on X" button. The JS now only sets dynamic values (href and the handle text).
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.
Summary
.event-bottomof the XPOST event card, with subtle resting/hover styling.@handlelink in the same card from the post URL to the user's X profile (https://x.com/<handle>), so username → profile and button → specific post matches the standard X convention.Test plan
npm run lintfromchat-gui/is clean.npm start), dispatch an XPOST event through the dev harness; confirm the expanded card renders the new button below the post text and that resting/hover backgrounds read clearly.@handlelink — status bar should readhttps://x.com/<handle>with no/status/...suffix. Click — opens the profile in a new tab.https://x.com/<handle>/status/<postId>in a new tab.npm link dgg-chat-guiintowebsite/and trigger admin → X → "Test connection"; verify both links resolve correctly against a real broadcast.