Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AI Chat] Handle markdown for AI chat feature component #2505

Open
tomsmith8 opened this issue Dec 6, 2024 · 4 comments · May be fixed by #2544
Open

[AI Chat] Handle markdown for AI chat feature component #2505

tomsmith8 opened this issue Dec 6, 2024 · 4 comments · May be fixed by #2544
Assignees
Labels

Comments

@tomsmith8
Copy link
Contributor

tomsmith8 commented Dec 6, 2024

Task

We need to enhance the current AI chat UI component to properly interpret and render markdown within incoming and outgoing messages. This will improve readability, allow richer formatting (headings, lists, code snippets, links), and create a more user-friendly experience.

User Story:
As a user interacting with the AI chat component, I want messages that contain markdown formatting (e.g., bold text, code blocks, lists, hyperlinks) to be displayed in a visually appealing and easy-to-read manner. This should help me quickly understand structured content and code examples shared within the conversation.

Scope & Requirements:

Rendering:

Parse markdown formatting (bold, italics, headers, lists, code blocks, inline code, links, etc.).
Ensure code blocks are syntax highlighted (if possible) or at least monospaced and easily distinguishable.
Maintain consistent styling that aligns with the product’s design language and accessibility standards (e.g., proper contrast ratios, readable font sizes).

User Input Handling:

Users may enter markdown or paste formatted text. The component should display the rendered result in real-time or upon message submission.

Edge Cases:

Unrecognized markdown syntax should gracefully fall back to plain text.
Ensure special characters and emojis do not break the formatting.
Messages containing large code blocks or multiple markdown elements should render efficiently without layout instability.

Testing & Validation:

Verify that basic markdown elements (headings, bold, italics, lists) render as intended.
Test code blocks with various languages for proper formatting (even if no syntax highlighting is implemented initially).
Confirm no regressions occur in existing UI elements or message rendering performance.
Acceptance Criteria:

Given a message containing markdown, when the user views it in the chat UI, then the markdown elements (headers, lists, code blocks, bold, italics, etc.) appear formatted according to the defined style guide.
Given a user enters markdown in the input field and sends a message, when the message appears in the chat history, then the formatting renders correctly (e.g., bold appears as bold text).

Screenshot 2024-12-06 at 10 07 29
@aliraza556
Copy link
Contributor

aliraza556 commented Dec 6, 2024

@tomsmith8 please assign me?

@saithsab877
Copy link
Contributor

@tomsmith8 I can help?

@MuhammadUmer44
Copy link
Contributor

@tomsmith8 assign ?

@tomsmith8 tomsmith8 changed the title [AI Chat] Handle markdown [AI Chat] Handle markdown for AI chat feature component Dec 6, 2024
@tomsmith8
Copy link
Contributor Author

Any update?

@aliraza556 aliraza556 linked a pull request Dec 15, 2024 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants