ChatbotWelcomePrompt: long prompt title and message overflow suggestion cards
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 82/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript
- Lĩnh vực
- frontend
Hướng nghiên cứu
Bắt đầu với phần triển khai ChatbotWelcomePrompt và các thẻ pf-chatbot__prompt-suggestion của nó, sau đó tái hiện vấn đề bằng tiêu đề và thông báo dài trong báo cáo. Hoàn thành khi tiêu đề được cắt ngắn thành một dòng có dấu ba chấm và thông báo được giới hạn ở số dòng hợp lý mà không tràn ra ngoài ranh giới của thẻ.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Description
When ChatbotWelcomePrompt renders welcome/suggested prompt cards with long title or message values, the text overflows horizontally outside the card boundary instead of truncating.
This is especially visible when consumers pass user-generated content (e.g. saved prompts with long names and bodies) as prompts[].title and prompts[].message.
Steps to reproduce
- Render
ChatbotWelcomePromptwith a prompt like:
<ChatbotWelcomePrompt
title="Hello"
description="How can I help?"
prompts={[
{
title: 'aDSFGGEWRTYUIOPASDFGHJKLZXCVBNMQWERTYUIOPASDFGHJKLZXCVBNM',
message: 'QEWRETRTDYUIOPASDFGHJKLZXCVBNMQWERTYUIOPASDFGHJKLZXCVBNMQWERTY',
onClick: () => {},
},
]}
/>
- Observe the card title and body text extend past the card border.
Expected behavior
-
Prompt card title should truncate with ellipsis (single line).
-
Prompt card message/body should clamp to a reasonable number of lines (e.g. 2) with ellipsis.
Actual behavior
Title and message render as unbroken single-line strings that overflow the card container.
Component / version
-
Component:
ChatbotWelcomePrompt(pf-chatbot__prompt-suggestioncards) -
@patternfly/chatbotversion observed:6.9.0-prerelease.2
Suggested fix
Apply truncation styles in ChatbotWelcomePrompt (or underlying PF CardTitle / CardBody usage), e.g.:
-
CardTitle:overflow: hidden; text-overflow: ellipsis; white-space: nowrap -
CardBody: multi-line clamp (-webkit-line-clamp: 2) formessage
Optionally expose props to control clamp line count.
Workaround
Consumers currently override via CSS targeting .pf-chatbot__prompt-suggestion .pf-v6-c-card__title and .pf-v6-c-card__body.
Jira Issue: PF-4645
- Ngôn ngữ chính
- TypeScript
- Star
- 6
- Fork
- 37
- Merge trung bình
- 3 ngày 19 giờ
- Pull request đã merge (30 ngày)
- 5
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của patternfly/chatbot
-
HistoryDrawer - Docs look bad Đang mởPF Team
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
patternfly/chatbot#852 ·
-
PF Team
patternfly/chatbot#908 · 1 người được giao ·
-
PF Team
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
patternfly/chatbot#906 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 64/100
patternfly/chatbot#905 · 1 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 72/100
patternfly/chatbot#863 · 3 bình luận · 2 reaction ·
Tất cả issue của patternfly/chatbot
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
copse-dev/agent-pane#2953 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
[Bug]: Matrix progress drafts fail with "Matrix runtime not initialized" during tool activity Đang mởbug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Client support matrix inclusion Đang mởenhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
calcite-components needs triage refactor
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Esri/calcite-design-system#15203 ·