Skip to content

Conversation

@dodaa08
Copy link
Contributor

@dodaa08 dodaa08 commented Jan 5, 2026

Make URLs in user bio clickable

Acceptance Criteria fulfillment

  • URLs starting with http:// or https:// in bio are automatically detected
  • Detected URLs are converted to clickable links
  • Links open in a new tab with proper security (target="_blank" and rel="noopener noreferrer")
  • Link colors match the theme (light mode: info color, dark mode: warningForeground color)
  • Non-URL text in bio remains unchanged
  • Works consistently across different view modes (Sidebar/Popup)

Implementation Details

  • Uses inline style prop matching email link pattern for consistency
  • New utility function: parseUrls.js for URL detection
  • Modified: UserInformation.js to use parseUrls for bio field

Fixes #1055

Screenshots

Light theme
image

Dark theme

image

PR Test Details

Note: The PR will be ready for live testing at https://rocketchat.github.io/EmbeddedChat/pulls/pr-<pr_number> after approval. Contributors are requested to replace <pr_number> with the actual PR number.

- Add parseUrls utility function to detect URLs in bio text
- Convert detected URLs to clickable links with proper styling
- Match email link styling for consistency
- Support both http/https URLs and URLs without protocol
@CLAassistant
Copy link

CLAassistant commented Jan 5, 2026

CLA assistant check
All committers have signed the CLA.

import { css } from '@emotion/react';
import { Box } from '@embeddedchat/ui-elements';

const URL_REGEX = /(https?:\/\/[^\s<>"']+)/gi;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In EmbeddedChat, we might be using a parser library to handle link scenarios. It would be better to explore that option instead of relying on a custom parser, which could fail in various situations. Thanks.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, Will look into this

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In EmbeddedChat, we might be using a parser library to handle link scenarios. It would be better to explore that option instead of relying on a custom parser, which could fail in various situations. Thanks.

Screencast.From.2026-01-15.15-27-34.mp4

Got it, updated

@Spiral-Memory Spiral-Memory added the nudge minor tweaks suggested label Jan 15, 2026
Copy link
Collaborator

@Spiral-Memory Spiral-Memory left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Spiral-Memory Spiral-Memory added testing and removed nudge minor tweaks suggested labels Jan 15, 2026
@Spiral-Memory Spiral-Memory merged commit b5f374c into RocketChat:develop Jan 15, 2026
5 checks passed
github-actions bot added a commit that referenced this pull request Jan 15, 2026
@Spiral-Memory Spiral-Memory added the chore a subtle fix label Jan 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore a subtle fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make URLs in user bio clickable

3 participants