confirmationDialog background is translucent on Android (90% surface)

Open Beginner friendly
#602 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
68/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
android, swift
Domain
design, mobile

Research direction

Start with ConfirmationDialogPresentation and the Color.overlayBackground definition in Sources/SkipUI/SkipUI/Color/Color.swift; compare it with the systemBarBackground approach mentioned in the issue. Reproduce the dialog over a Form or List on Android and check how the background affects text readability. Done when the dialog content is readable against an opaque background, or honors .presentationBackground(...).

Written by the indexing model from the issue text.

Description

Version: skip-ui 1.60.0; the same code is in 1.66.3.

ConfirmationDialogPresentation draws its sheet with Color.overlayBackground, which is:

static let overlayBackground: Color = Color(colorImpl: {
    MaterialTheme.colorScheme.surface.copy(alpha: Float(0.9))
})

(Sources/SkipUI/SkipUI/Color/Color.swift)

Over a busy screen (a Form, a List), whatever is behind the dialog shows through its title, message and buttons, which makes them hard to read. On iOS, the action sheet's material looks opaque. Because it's a static let, an app can't override it.

To reproduce: a Form with several rows, plus a .confirmationDialog with a title, a message and two buttons (one with role: .destructive). Show it on Android: the form rows are readable through the dialog.

Suggestion: make it opaque, e.g. MaterialTheme.colorScheme.surfaceColorAtElevation(3.dp) like systemBarBackground, or honour .presentationBackground(...) on the dialog's content.

Dominant language
Swift
Stars
331
Forks
89
Avg merge
2d 13h
Merged PRs (30d)
26

Getting set up

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.

More from skiptools/skip-ui

All issues in skiptools/skip-ui

Similar issues

More Swift issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.