Dimillian / Dimillian/IceCubesApp

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

Open
#2,420 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Swift
Stars
7.1k
Forks
720
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open Packages/StatusKit/Sources/StatusKit/Poll/StatusPollView.swift and inspect the completed-poll result background around the _PercentWidthLayout. Reproduce the view with a custom tintColor and compare completed-poll readability against the uncompleted state on the stated iOS environment. Done means the completed poll text is more easily readable without changing the uncompleted background.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios, swift
Domain
mobile
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.