SegmentedControl: colunas iguais truncam e colam rótulos longos no celular

Đang mở
#1,293 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
45/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
css, typescript
Lĩnh vực
frontend

Hướng nghiên cứu

Start from the SegmentedControl component source in the package and the equal-width column styling it applies, then reproduce with three long labels in a ~340 px column. The issue offers three acceptable outcomes (content-sized columns with scroll snap, stacking below a breakpoint, or an overflow prop), so a maintainer must pick one before code is written; the 44 px touch target and minimum padding/gap apply whichever is chosen. Done means long labels are readable and tappable at 390 px without local CSS overrides like the Tabs workaround on the Conectar IA page.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Problema

SegmentedControl força colunas de largura igual. Com rótulos de tamanhos diferentes num container estreito, os textos são truncados e encostam uns nos outros sem espaçamento. Exemplo: "Bot de atendimento", "Conectar um número" e "Campanha com opt-in" a 390 px. Não há quebra de linha nem rolagem.

Versão

@codeatlasdev/ui 4.6.0

Reproduzir

SegmentedControl com 3 itens de rótulos longos dentro de uma coluna de cerca de 340 px.

Esperado

Uma destas opções: colunas no tamanho do conteúdo, com rolagem horizontal e snap quando não couber; empilhar abaixo de um breakpoint; ou uma prop overflow="scroll" | "stack". Em toque, os itens precisam de padding e gap mínimos e alvo de 44 px.

Como o wi contorna hoje

Na página Conectar IA trocamos o SegmentedControl por Tabs, e abaixo de 600 px os itens empilham (CSS local).

Ngôn ngữ chính
TypeScript
Star
6
Fork
3
Merge trung bình
5 giờ 21 phút
Pull request đã merge (30 ngày)
378

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của codeatlasdev/ui

Tất cả issue của codeatlasdev/ui

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.