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

オープン
#2,420 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
1/5
見積もり時間
1時間未満
初心者へのやさしさ
52/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
ios, swift
領域
mobile

調査の方向性

Packages/StatusKit/Sources/StatusKit/Poll/StatusPollView.swift を開き、_PercentWidthLayout 周辺にある完了済みの投票結果の背景を調査します。カスタムの tintColor を使ってビューを再現し、指定された iOS 環境で、完了済みの投票の読みやすさを未完了の状態と比較します。未完了の状態の背景を変更せずに、完了済みの投票のテキストがより読みやすくなれば完了です。

索引モデルが issue の本文から書いたものです。

説明

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

主要言語
Swift
スター
7.1k
フォーク
743
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Dimillian/IceCubesApp のほかの issue

Dimillian/IceCubesApp の issue をすべて見る

似ている issue

Swift の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。