Bug: increase visual contrast in completed polls so the text is more easily readable.

Đang mở
#2,420 2 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ó
1/5
Thời gian dự kiến
Dưới một giờ
Mức phù hợp với người mới
52/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
ios, swift
Lĩnh vực
mobile

Hướng nghiên cứu

Mở Packages/StatusKit/Sources/StatusKit/Poll/StatusPollView.swift và kiểm tra nền của kết quả cuộc thăm dò đã hoàn tất xung quanh _PercentWidthLayout. Tái tạo view với tintColor tùy chỉnh và so sánh khả năng đọc của cuộc thăm dò đã hoàn tất với trạng thái chưa hoàn tất trên môi trường iOS được nêu. Được xem là hoàn tất khi văn bản của cuộc thăm dò đã hoàn tất dễ đọc hơn mà không thay đổi nền của trạng thái chưa hoàn tất.

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

Mô tả

bug

Environment:

  • OS: 18.7.3
  • IceCubesApp version: 2.1.3 (64bc4e2450 built locally)

Description

When displaying a completed poll when a custom tintColor is set similar to this in Display Settings:

Image

The text can be very difficult to read.

Image

The normal background opacity for an uncompleted poll is 0.4. I set the background opacity for a completed poll to 0.6 and it improved the readability.

diff --git a/Packages/StatusKit/Sources/StatusKit/Poll/StatusPollView.swift b/Packages/StatusKit/Sources/StatusKit/Poll/StatusPollView.swift
index 39847cb3..ecaacf7a 100644
--- a/Packages/StatusKit/Sources/StatusKit/Poll/StatusPollView.swift
+++ b/Packages/StatusKit/Sources/StatusKit/Poll/StatusPollView.swift
@@ -170,21 +170,21 @@ public struct StatusPollView: View {
           .foregroundColor(theme.labelColor)
           .font(.scaledBody)
           .lineLimit(3)
           .minimumScaleFactor(0.7)
         Spacer()
       }
       .padding(EdgeInsets(top: 5, leading: 10, bottom: 5, trailing: 10))
       .background(alignment: .leading) {
         if viewModel.showResults || status.account.id == currentAccount.account?.id {
           _PercentWidthLayout(percent: relativePercent(for: option.votesCount ?? 0)) {
-            RoundedRectangle(cornerRadius: 10).foregroundColor(theme.tintColor)
+            RoundedRectangle(cornerRadius: 10).foregroundColor(theme.tintColor.opacity(0.6))
               .transition(
                 .asymmetric(
                   insertion: .push(from: .leading),
                   removal: .push(from: .trailing)))
           }
         }
       }
       .background { RoundedRectangle(cornerRadius: 10).fill(theme.tintColor.opacity(0.4)) }
       .clipShape(RoundedRectangle(cornerRadius: 10))
     }
Image

A change like this might help.

Don't have any devices running os 26 so haven't tested extensively.

I'll run this change locally for awhile.

Related Issues

  • Search that this bugs don't already exist before creating it.

#2188

Ngôn ngữ chính
Swift
Star
7.1k
Fork
743
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

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

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 Dimillian/IceCubesApp

Tất cả issue của Dimillian/IceCubesApp

Issue tương tự

Thêm issue về Swift

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.