Toast messages don't respect line breaks
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
- 38/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- typescript
- Lĩnh vực
- frontend
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện lệnh gọi plugin Toast từ issue trong một trang trình duyệt bằng pwa-elements và capacitor.js, sau đó theo dõi phần triển khai PWA Toast dùng để chuẩn hóa văn bản đầu vào. Xác nhận cách các ký tự xuống dòng và các ký tự whitespace khác được xử lý, đồng thời xác minh rằng các thông báo Toast giữ nguyên các dấu ngắt dòng mà không phân tích HTML.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
I can not figure out how to create line breaks in a toast message. When on Android, for example, I can use \n to insert a newline, which works great. However, the same messages are being flattened to one line in the PWA, which looks ugly. Is there a way to represent line breaks?
I'm submitting a ...
[x] bug report
[x] feature request
[x] support request
Current behavior:
All whitespace (\n, \t, multiple spaces in a row) in the input text of the Toast plugin seems to be normalized to a single space. When I try to use HTML line breaks like <br />, they are passed through un-parsed.
Expected behavior:
There should be a way to represent line breaks in the toast messages, like on other Capacitor-supported platforms. Ideally this should simply respect the \n character so toast works identically across platforms.
Steps to reproduce:
On a browser page with both pwa elements and capacitor.js, paste in the developer console:
window.Capacitor.Plugins.Toast.show({ text: "0m 11s spent on Meditate \n Meditate ➤ Workout \n Starting from 0m 0s", duration: '10000'}).then();
- Ngôn ngữ chính
- TypeScript
- Star
- 171
- Fork
- 50
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc 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 ionic-team/pwa-elements
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 45/100
ionic-team/pwa-elements#135 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
ionic-team/pwa-elements#133 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
ionic-team/pwa-elements#129 · 5 bình luận · 17 reaction ·
-
Unable to use in esm package. Module not found: Can't resolve '@ionic/pwa-elements/loader/index.js'Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 38/100
ionic-team/pwa-elements#128 · 10 reaction ·
-
feat: Possibility to translate in the camera plugin when it does not exist.Có thể đã có người làm @imfms đã nhận 1732 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 48/100
ionic-team/pwa-elements#113 · 3 bình luận ·
Tất cả issue của ionic-team/pwa-elements
Issue tương tự
-
useFragment does not require `variables` when the fragment's variables type has required fieldsĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
apollographql/apollo-client#13493 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Custom hosts written as trailing-dot FQDNs (`host.local.`) aren't detected as local backendsCó thể đã có người làm @roboomp đã nhận hôm nay. Đang mởbug prio:p2 providers triaged
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
can1357/oh-my-pi#15798 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
code-yeongyu/oh-my-openagent#10172 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
PDFCraftTool/pdfcraft#189 ·
-
Add the Yahoo chart API duplicate last-day row (yfinance#573) to incidents.md (about 1 hour)Có thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởdata docs good first issue
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 80/100
pacocartones/market-data-sanity-checker#160 ·
Maintainer thường phản hồi trong vòng 1 ngày