diff --git a/Scrabbdict/Modules/Scrabbdict/Subviews/ResultCardView.swift b/Scrabbdict/Modules/Scrabbdict/Subviews/ResultCardView.swift index b97fd56..4108e4d 100644 --- a/Scrabbdict/Modules/Scrabbdict/Subviews/ResultCardView.swift +++ b/Scrabbdict/Modules/Scrabbdict/Subviews/ResultCardView.swift @@ -31,6 +31,15 @@ struct ResultCardView: View { } } + private var accessibilityLabel: Text { + switch result { + case let .valid(points): + Text(.resultAccessibilityValid) + Text(verbatim: ", ") + Text(.wordAccessibilityPoints(points)) + case .invalid: + Text(.resultAccessibilityInvalid) + } + } + var body: some View { VStack(spacing: 0) { Text(.resultCaption) @@ -65,6 +74,8 @@ struct ResultCardView: View { .stroke(Color.surfaceStroke, lineWidth: 1) ) .shadow(color: Color.appShadow, radius: 17, x: 0, y: 14) + .accessibilityElement(children: .ignore) + .accessibilityLabel(accessibilityLabel) } private func localizedPointNoun(for points: Int) -> String { diff --git a/Scrabbdict/Modules/Scrabbdict/Subviews/SearchBarView.swift b/Scrabbdict/Modules/Scrabbdict/Subviews/SearchBarView.swift index a9356fd..153f03c 100644 --- a/Scrabbdict/Modules/Scrabbdict/Subviews/SearchBarView.swift +++ b/Scrabbdict/Modules/Scrabbdict/Subviews/SearchBarView.swift @@ -51,18 +51,10 @@ struct SearchBarView: View { } private var searchModePicker: some View { - VStack(spacing: 6) { - ForEach(SearchMode.allCases, id: \.self) { mode in - searchModeOption(mode) - } - } - .padding(6) - .background(Color.settingsBackground, in: RoundedRectangle(cornerRadius: 12, style: .continuous)) - .overlay( - RoundedRectangle(cornerRadius: 12, style: .continuous) - .stroke(Color.surfaceStroke, lineWidth: 1) + SearchModePickerView( + searchMode: searchMode, + onSearchModeSelected: onSearchModeSelected ) - .shadow(color: Color.appShadow.opacity(0.7), radius: 10, x: 0, y: 4) } private var textField: some View { @@ -150,46 +142,6 @@ struct SearchBarView: View { .disabled(text.isEmpty) .accessibilityLabel(.searchButtonAccessibilityLabel) } - - private func searchModeOption(_ mode: SearchMode) -> some View { - Button { - onSearchModeSelected(mode) - } label: { - HStack(spacing: 10) { - VStack(alignment: .leading, spacing: 3) { - Text(mode.title) - .font(.system(size: 14, weight: .semibold)) - .foregroundStyle(Color.primaryInk) - - Text(mode.description) - .font(.system(size: 12, weight: .medium)) - .foregroundStyle(Color.secondaryText) - .fixedSize(horizontal: false, vertical: true) - } - - Spacer(minLength: 8) - - searchModeSelectionIcon(mode) - } - .padding(.horizontal, 12) - .padding(.vertical, 9) - .frame(maxWidth: .infinity, alignment: .leading) - .background( - searchMode == mode ? Color.brandAccent.opacity(0.08) : Color.clear, - in: RoundedRectangle(cornerRadius: 8, style: .continuous) - ) - } - .buttonStyle(.plain) - .accessibilityLabel(mode.title) - .accessibilityHint(mode.description) - } - - private func searchModeSelectionIcon(_ mode: SearchMode) -> some View { - Image(systemName: searchMode == mode ? "checkmark.circle.fill" : "circle") - .font(.system(size: 17, weight: .semibold)) - .foregroundStyle(searchMode == mode ? Color.brandAccent : Color.secondaryText.opacity(0.45)) - .accessibilityHidden(true) - } } #Preview { diff --git a/Scrabbdict/Modules/Scrabbdict/Subviews/SearchModePickerView.swift b/Scrabbdict/Modules/Scrabbdict/Subviews/SearchModePickerView.swift new file mode 100644 index 0000000..fe10da1 --- /dev/null +++ b/Scrabbdict/Modules/Scrabbdict/Subviews/SearchModePickerView.swift @@ -0,0 +1,272 @@ +// +// Scrabbdict +// Copyright © 2026 Piotr Sochalewski. +// Licensed under the Apache License, Version 2.0. +// + +import SwiftUI + +struct SearchModePickerView: View { + let searchMode: SearchMode + let onSearchModeSelected: (SearchMode) -> Void + + var body: some View { + VStack(spacing: 6) { + ForEach(SearchMode.allCases, id: \.self) { mode in + searchModeOption(mode) + } + } + .padding(6) + .background(Color.settingsBackground, in: RoundedRectangle(cornerRadius: 12, style: .continuous)) + .overlay( + RoundedRectangle(cornerRadius: 12, style: .continuous) + .stroke(Color.surfaceStroke, lineWidth: 1) + ) + .shadow(color: Color.appShadow.opacity(0.7), radius: 10, x: 0, y: 4) + } + + private func searchModeOption(_ mode: SearchMode) -> some View { + Button { + onSearchModeSelected(mode) + } label: { + HStack(spacing: 10) { + VStack(alignment: .leading, spacing: 3) { + Text(mode.title) + .font(.system(size: 14, weight: .semibold)) + .foregroundStyle(Color.primaryInk) + + SearchModeDescriptionText(mode: mode) + } + + Spacer(minLength: 8) + + searchModeSelectionIcon(mode) + } + .padding(.horizontal, 12) + .padding(.vertical, 9) + .frame(maxWidth: .infinity, alignment: .leading) + .background( + searchMode == mode ? Color.brandAccent.opacity(0.08) : Color.clear, + in: RoundedRectangle(cornerRadius: 8, style: .continuous) + ) + } + .buttonStyle(.plain) + .accessibilityLabel(mode.title) + .accessibilityHint(mode.description) + } + + private func searchModeSelectionIcon(_ mode: SearchMode) -> some View { + Image(systemName: searchMode == mode ? "checkmark.circle.fill" : "circle") + .font(.system(size: 17, weight: .semibold)) + .foregroundStyle(searchMode == mode ? Color.brandAccent : Color.secondaryText.opacity(0.45)) + .accessibilityHidden(true) + } +} + +private struct SearchModeDescriptionText: View { + @Environment(\.locale) private var locale + + let mode: SearchMode + + private var localizedBundle: Bundle { + guard + let languageCode = locale.language.languageCode?.identifier, + let path = Bundle.main.path(forResource: languageCode, ofType: "lproj"), + let bundle = Bundle(path: path) + else { + return .main + } + + return bundle + } + + private var descriptionLocalizationValue: String.LocalizationValue { + switch mode { + case .auto: "search_mode.auto.description" + case .check: "search_mode.check.description" + case .rack: "search_mode.rack.description" + } + } + + var body: some View { + let text = String(localized: descriptionLocalizationValue, bundle: localizedBundle) + let tokens = Token.tokens(from: text) + + SearchModeDescriptionFlowLayout { + ForEach(tokens) { token in + switch token.kind { + case let .text(value): + Text(verbatim: value) + case let .space(value): + Text(verbatim: value) + .layoutValue(key: CollapsibleSpaceLayoutValueKey.self, value: true) + case .wildcard: + WildcardTile() + .padding(.horizontal, 1) + } + } + } + .font(.system(size: 12, weight: .medium)) + .foregroundStyle(Color.secondaryText) + .accessibilityElement(children: .ignore) + .accessibilityLabel(Text(verbatim: text)) + } +} + +private struct SearchModeDescriptionFlowLayout: Layout { + private struct Line { + let items: [Item] + let width: CGFloat + let height: CGFloat + } + + private struct Item { + let subview: LayoutSubview + let size: CGSize + } + + func sizeThatFits( + proposal: ProposedViewSize, + subviews: Subviews, + cache _: inout () + ) -> CGSize { + let lines = lines(for: subviews, maxWidth: proposal.width ?? .infinity) + return CGSize( + width: proposal.width ?? lines.map(\.width).max() ?? 0, + height: lines.reduce(0) { $0 + $1.height } + ) + } + + func placeSubviews( + in bounds: CGRect, + proposal _: ProposedViewSize, + subviews: Subviews, + cache _: inout () + ) { + let lines = lines(for: subviews, maxWidth: bounds.width) + var y = bounds.minY + + for line in lines { + var x = bounds.minX + + for item in line.items { + item.subview.place( + at: CGPoint(x: x, y: y + (line.height - item.size.height) / 2), + proposal: ProposedViewSize(item.size) + ) + x += item.size.width + } + + y += line.height + } + } + + private func lines(for subviews: Subviews, maxWidth: CGFloat) -> [Line] { + var lines: [Line] = [] + var currentItems: [Item] = [] + var currentWidth: CGFloat = 0 + var currentHeight: CGFloat = 0 + + func finishLine() { + guard !currentItems.isEmpty else { return } + lines.append(Line(items: currentItems, width: currentWidth, height: currentHeight)) + currentItems.removeAll() + currentWidth = 0 + currentHeight = 0 + } + + for subview in subviews { + let isSpace = subview[CollapsibleSpaceLayoutValueKey.self] + let size = subview.sizeThatFits(.unspecified) + + if isSpace, currentItems.isEmpty { + continue + } + + if !currentItems.isEmpty, currentWidth + size.width > maxWidth { + finishLine() + + if isSpace { + continue + } + } + + currentItems.append(Item(subview: subview, size: size)) + currentWidth += size.width + currentHeight = max(currentHeight, size.height) + } + + finishLine() + return lines + } +} + +private struct CollapsibleSpaceLayoutValueKey: LayoutValueKey { + static let defaultValue = false +} + +private struct WildcardTile: View { + var body: some View { + Text(verbatim: "?") + .font(.system(size: 10, weight: .bold)) + .foregroundStyle(Color.TableBackground.tileInk) + .frame(width: 16, height: 16) + .background { + RoundedRectangle(cornerRadius: 3, style: .continuous) + .fill( + LinearGradient( + colors: [ + Color.TableBackground.tileTop, + Color.TableBackground.tileBottom + ], + startPoint: .topLeading, + endPoint: .bottomTrailing + ) + ) + } + .overlay { + RoundedRectangle(cornerRadius: 3, style: .continuous) + .stroke(Color.TableBackground.tileStroke, lineWidth: 0.8) + } + .shadow(color: Color.TableBackground.tileShadow, radius: 1, x: 0.4, y: 0.8) + .accessibilityHidden(true) + } +} + +private struct Token: Identifiable { + enum Kind { + case text(String) + case space(String) + case wildcard + } + + let id: Int + let kind: Kind + + static func tokens(from text: String) -> [Self] { + var tokens: [Self] = [] + var buffer = "" + + func flushText() { + guard !buffer.isEmpty else { return } + let tokenKind: Kind = buffer.allSatisfy(\.isWhitespace) ? .space(buffer) : .text(buffer) + tokens.append(Self(id: tokens.count, kind: tokenKind)) + buffer.removeAll() + } + + for character in text { + if character == "?" { + flushText() + tokens.append(Self(id: tokens.count, kind: .wildcard)) + } else if character.isWhitespace { + buffer.append(character) + flushText() + } else { + buffer.append(character) + } + } + + flushText() + return tokens + } +} diff --git a/Scrabbdict/Modules/Scrabbdict/Subviews/WordsListView.swift b/Scrabbdict/Modules/Scrabbdict/Subviews/WordsListView.swift index 148f9cf..3cb6696 100644 --- a/Scrabbdict/Modules/Scrabbdict/Subviews/WordsListView.swift +++ b/Scrabbdict/Modules/Scrabbdict/Subviews/WordsListView.swift @@ -27,6 +27,8 @@ struct WordsListView: View { .background(Color.brandAccent.opacity(0.12), in: Capsule()) } .listRowBackground(Color.clear) + .accessibilityElement(children: .ignore) + .accessibilityLabel(Text(verbatim: word.string) + Text(verbatim: ", ") + Text(.wordAccessibilityPoints(word.points))) } .listStyle(.plain) .scrollContentBackground(.hidden) diff --git a/Scrabbdict/Resources/Localizable.xcstrings b/Scrabbdict/Resources/Localizable.xcstrings index f923916..6c23fbb 100644 --- a/Scrabbdict/Resources/Localizable.xcstrings +++ b/Scrabbdict/Resources/Localizable.xcstrings @@ -59,7 +59,7 @@ "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Aucun mot ne correspond à ce modèle." + "value" : "Aucun mot ne correspond à ce motif." } }, "pl" : { @@ -398,6 +398,52 @@ } } }, + "result.accessibility.invalid" : { + "extractionState" : "manual", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Word is invalid" + } + }, + "fr" : { + "stringUnit" : { + "state" : "translated", + "value" : "Le mot n'est pas valide" + } + }, + "pl" : { + "stringUnit" : { + "state" : "translated", + "value" : "Słowo jest niepoprawne" + } + } + } + }, + "result.accessibility.valid" : { + "extractionState" : "manual", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Word is valid" + } + }, + "fr" : { + "stringUnit" : { + "state" : "translated", + "value" : "Le mot est valide" + } + }, + "pl" : { + "stringUnit" : { + "state" : "translated", + "value" : "Słowo jest poprawne" + } + } + } + }, "result.caption" : { "extractionState" : "manual", "localizations" : { @@ -567,19 +613,19 @@ "en" : { "stringUnit" : { "state" : "translated", - "value" : "Word or rack" + "value" : "Word, letters, or pattern" } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Mot ou chevalet" + "value" : "Mot, lettres ou motif" } }, "pl" : { "stringUnit" : { "state" : "translated", - "value" : "Słowo lub stojak" + "value" : "Słowo, litery lub wzorzec" } } } @@ -636,19 +682,19 @@ "en" : { "stringUnit" : { "state" : "translated", - "value" : "Checks exact words, or treats ? as a one-letter wildcard." + "value" : "Chooses the search from your entry: checks a word or uses ? as a one-letter blank tile in a pattern." } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Vérifie les mots exacts ou traite ? comme un joker d'une lettre." + "value" : "Adapte la recherche à la saisie : vérifie un mot ou utilise ? comme Joker d'une lettre dans un motif." } }, "pl" : { "stringUnit" : { "state" : "translated", - "value" : "Sprawdza dokładne słowa albo traktuje ? jako jednoliterowy blank." + "value" : "Dobiera wyszukiwanie do wpisu: sprawdza słowo albo używa ? jako jednoliterowego blanku we wzorcu." } } } @@ -682,19 +728,19 @@ "en" : { "stringUnit" : { "state" : "translated", - "value" : "Only checks whether the exact entered word is valid." + "value" : "Checks whether the entered word is valid." } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Vérifie uniquement si le mot saisi est valide." + "value" : "Vérifie si le mot saisi est valide." } }, "pl" : { "stringUnit" : { "state" : "translated", - "value" : "Sprawdza tylko, czy wpisane słowo jest poprawne." + "value" : "Sprawdza, czy wprowadzone słowo jest poprawne." } } } @@ -728,19 +774,19 @@ "en" : { "stringUnit" : { "state" : "translated", - "value" : "Finds words from entered letters, or treats ? as a one-letter wildcard." + "value" : "Builds words from entered letters or searches a pattern with ? as a one-letter blank tile." } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Trouve les mots à partir des lettres saisies ou traite ? comme un joker d'une lettre." + "value" : "Forme des mots avec les lettres saisies ou recherche un motif avec ? comme Joker d'une lettre." } }, "pl" : { "stringUnit" : { "state" : "translated", - "value" : "Znajduje słowa z wpisanych liter albo traktuje ? jako jednoliterowy blank." + "value" : "Układa słowa z wpisanych liter albo szuka wzorca z ? jako jednoliterowym blankiem." } } } @@ -751,19 +797,19 @@ "en" : { "stringUnit" : { "state" : "translated", - "value" : "Rack" + "value" : "Build" } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Chevalet" + "value" : "Former" } }, "pl" : { "stringUnit" : { "state" : "translated", - "value" : "Stojak" + "value" : "Ułóż" } } } @@ -859,6 +905,77 @@ } } } + }, + "word.accessibility.points" : { + "extractionState" : "manual", + "localizations" : { + "en" : { + "variations" : { + "plural" : { + "one" : { + "stringUnit" : { + "state" : "translated", + "value" : "%lld point" + } + }, + "other" : { + "stringUnit" : { + "state" : "translated", + "value" : "%lld points" + } + } + } + } + }, + "fr" : { + "variations" : { + "plural" : { + "one" : { + "stringUnit" : { + "state" : "translated", + "value" : "%lld point" + } + }, + "other" : { + "stringUnit" : { + "state" : "translated", + "value" : "%lld points" + } + } + } + } + }, + "pl" : { + "variations" : { + "plural" : { + "few" : { + "stringUnit" : { + "state" : "translated", + "value" : "%lld punkty" + } + }, + "many" : { + "stringUnit" : { + "state" : "translated", + "value" : "%lld punktów" + } + }, + "one" : { + "stringUnit" : { + "state" : "translated", + "value" : "%lld punkt" + } + }, + "other" : { + "stringUnit" : { + "state" : "translated", + "value" : "%lld punktu" + } + } + } + } + } + } } }, "version" : "1.2" diff --git a/ScrabbdictTests/Snapshots/__Snapshots__/ScrabbdictSnapshotTests/testEmptyPatternResult.fr-FR-dark.png b/ScrabbdictTests/Snapshots/__Snapshots__/ScrabbdictSnapshotTests/testEmptyPatternResult.fr-FR-dark.png index c35a360..63b8adf 100644 --- a/ScrabbdictTests/Snapshots/__Snapshots__/ScrabbdictSnapshotTests/testEmptyPatternResult.fr-FR-dark.png +++ b/ScrabbdictTests/Snapshots/__Snapshots__/ScrabbdictSnapshotTests/testEmptyPatternResult.fr-FR-dark.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:504103a8117cc993fa93ed5987252b5c5416a0c02e5bce174be725a305ab5883 -size 1568405 +oid sha256:81a902984cc571d67fee105396ad6c4e1b424c5783c78c9ec3e46ad2ed647bcf +size 1568073 diff --git a/ScrabbdictTests/Snapshots/__Snapshots__/ScrabbdictSnapshotTests/testEmptyPatternResult.fr-FR-light.png b/ScrabbdictTests/Snapshots/__Snapshots__/ScrabbdictSnapshotTests/testEmptyPatternResult.fr-FR-light.png index 5e9766d..1364f41 100644 --- a/ScrabbdictTests/Snapshots/__Snapshots__/ScrabbdictSnapshotTests/testEmptyPatternResult.fr-FR-light.png +++ b/ScrabbdictTests/Snapshots/__Snapshots__/ScrabbdictSnapshotTests/testEmptyPatternResult.fr-FR-light.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:27b7a73cbe45d75501f2f34f0a38135aeb6b1357f71ac39e64291bf85a02a82d -size 875675 +oid sha256:350d72a28c062161ae4fe587556f2cff2634cb3d59f563fd68143dd4c93560c4 +size 875473 diff --git a/ScrabbdictTests/Snapshots/__Snapshots__/ScrabbdictSnapshotTests/testEmptyPatternResult.fr-FR-pad-dark.png b/ScrabbdictTests/Snapshots/__Snapshots__/ScrabbdictSnapshotTests/testEmptyPatternResult.fr-FR-pad-dark.png index 961444d..c6f3668 100644 --- a/ScrabbdictTests/Snapshots/__Snapshots__/ScrabbdictSnapshotTests/testEmptyPatternResult.fr-FR-pad-dark.png +++ b/ScrabbdictTests/Snapshots/__Snapshots__/ScrabbdictSnapshotTests/testEmptyPatternResult.fr-FR-pad-dark.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:82feec3f0ded8bc9dd0227b2f2a375ef0b0f0ee0f5002358ad535fcdf67cb88d -size 6518011 +oid sha256:d86558c760782aab2f77aebf3ecb78068949e3f8fee1456068acdcef422dba62 +size 6517759 diff --git a/ScrabbdictTests/Snapshots/__Snapshots__/ScrabbdictSnapshotTests/testEmptyPatternResult.fr-FR-pad-light.png b/ScrabbdictTests/Snapshots/__Snapshots__/ScrabbdictSnapshotTests/testEmptyPatternResult.fr-FR-pad-light.png index ec92504..a8f9b63 100644 --- a/ScrabbdictTests/Snapshots/__Snapshots__/ScrabbdictSnapshotTests/testEmptyPatternResult.fr-FR-pad-light.png +++ b/ScrabbdictTests/Snapshots/__Snapshots__/ScrabbdictSnapshotTests/testEmptyPatternResult.fr-FR-pad-light.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1d695c2f8fe9c39c21c9e1e6cd36cb8e391c8460291338acffc09eacc834a658 -size 3634826 +oid sha256:493cd027ea45f76f9f785f84b682322f70a3fd5fe4429e33a6e2641eb1400348 +size 3634408 diff --git a/ScrabbdictTests/Snapshots/__Snapshots__/ScrabbdictSnapshotTests/testSearchModePickerExpanded.en-US-dark.png b/ScrabbdictTests/Snapshots/__Snapshots__/ScrabbdictSnapshotTests/testSearchModePickerExpanded.en-US-dark.png index 985e284..6206ac9 100644 --- a/ScrabbdictTests/Snapshots/__Snapshots__/ScrabbdictSnapshotTests/testSearchModePickerExpanded.en-US-dark.png +++ b/ScrabbdictTests/Snapshots/__Snapshots__/ScrabbdictSnapshotTests/testSearchModePickerExpanded.en-US-dark.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:32c11c047badfcc16dd86589da89d1cb98324a8b0449790b4cd522a20fa0e299 -size 1379121 +oid sha256:9b5ab17ad2b1acd4112015891a8a38d4bf1c54742e796ff38e1d77390bff61ac +size 1364937 diff --git a/ScrabbdictTests/Snapshots/__Snapshots__/ScrabbdictSnapshotTests/testSearchModePickerExpanded.en-US-light.png b/ScrabbdictTests/Snapshots/__Snapshots__/ScrabbdictSnapshotTests/testSearchModePickerExpanded.en-US-light.png index 064b50f..5e0c324 100644 --- a/ScrabbdictTests/Snapshots/__Snapshots__/ScrabbdictSnapshotTests/testSearchModePickerExpanded.en-US-light.png +++ b/ScrabbdictTests/Snapshots/__Snapshots__/ScrabbdictSnapshotTests/testSearchModePickerExpanded.en-US-light.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:22747a6689445e02127701f1a41a97bf940b8aa9df1da42a26f9cb331106f9b5 -size 852800 +oid sha256:530aa828ab23dbb4f0ff62e198f333e645b58690a072b9b3eeca6a495d9d017c +size 864927 diff --git a/ScrabbdictTests/Snapshots/__Snapshots__/ScrabbdictSnapshotTests/testSearchModePickerExpanded.en-US-pad-dark.png b/ScrabbdictTests/Snapshots/__Snapshots__/ScrabbdictSnapshotTests/testSearchModePickerExpanded.en-US-pad-dark.png index 47b420e..1c60fd5 100644 --- a/ScrabbdictTests/Snapshots/__Snapshots__/ScrabbdictSnapshotTests/testSearchModePickerExpanded.en-US-pad-dark.png +++ b/ScrabbdictTests/Snapshots/__Snapshots__/ScrabbdictSnapshotTests/testSearchModePickerExpanded.en-US-pad-dark.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e0d8195874c2b0276ab435e4f5065df339fefc2f838dc1383c86404ef8250f6b -size 6327146 +oid sha256:e08a92b0466281493699567ed5f3d9902ae7ac0f94f51d8591e8f105483bbd13 +size 6310998 diff --git a/ScrabbdictTests/Snapshots/__Snapshots__/ScrabbdictSnapshotTests/testSearchModePickerExpanded.en-US-pad-light.png b/ScrabbdictTests/Snapshots/__Snapshots__/ScrabbdictSnapshotTests/testSearchModePickerExpanded.en-US-pad-light.png index 447533c..2b36893 100644 --- a/ScrabbdictTests/Snapshots/__Snapshots__/ScrabbdictSnapshotTests/testSearchModePickerExpanded.en-US-pad-light.png +++ b/ScrabbdictTests/Snapshots/__Snapshots__/ScrabbdictSnapshotTests/testSearchModePickerExpanded.en-US-pad-light.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6201468aa962ae4df4641c9022d9b38c9f574841c205b99b375b542c6b586627 -size 3600342 +oid sha256:f7e3996e388dc62559d963fffc39f4fe6c70354ace922719450eaccbd7329192 +size 3613843 diff --git a/ScrabbdictTests/Snapshots/__Snapshots__/ScrabbdictSnapshotTests/testSearchModePickerExpanded.fr-FR-dark.png b/ScrabbdictTests/Snapshots/__Snapshots__/ScrabbdictSnapshotTests/testSearchModePickerExpanded.fr-FR-dark.png index 2756f0b..db61f46 100644 --- a/ScrabbdictTests/Snapshots/__Snapshots__/ScrabbdictSnapshotTests/testSearchModePickerExpanded.fr-FR-dark.png +++ b/ScrabbdictTests/Snapshots/__Snapshots__/ScrabbdictSnapshotTests/testSearchModePickerExpanded.fr-FR-dark.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:61b867650fb30ea410a10f1586fb87419baf9fb59b78363bfe446f3641158de3 -size 1368200 +oid sha256:d918cbe51da02d870f7994be77deb7a17d401f2b30f931f822987b78cf0552b8 +size 1382336 diff --git a/ScrabbdictTests/Snapshots/__Snapshots__/ScrabbdictSnapshotTests/testSearchModePickerExpanded.fr-FR-light.png b/ScrabbdictTests/Snapshots/__Snapshots__/ScrabbdictSnapshotTests/testSearchModePickerExpanded.fr-FR-light.png index 6b0e409..efbad42 100644 --- a/ScrabbdictTests/Snapshots/__Snapshots__/ScrabbdictSnapshotTests/testSearchModePickerExpanded.fr-FR-light.png +++ b/ScrabbdictTests/Snapshots/__Snapshots__/ScrabbdictSnapshotTests/testSearchModePickerExpanded.fr-FR-light.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bb39f57f13c9c64e3f794f016e18583e938e1882ecda5da2f0d6f7e10917992c -size 852687 +oid sha256:8e3bad5e5a17e519f42b7c71d81d77fe608d46b45e0f8f026a4b5997aaf7863d +size 870821 diff --git a/ScrabbdictTests/Snapshots/__Snapshots__/ScrabbdictSnapshotTests/testSearchModePickerExpanded.fr-FR-pad-dark.png b/ScrabbdictTests/Snapshots/__Snapshots__/ScrabbdictSnapshotTests/testSearchModePickerExpanded.fr-FR-pad-dark.png index e829c73..21e8ffb 100644 --- a/ScrabbdictTests/Snapshots/__Snapshots__/ScrabbdictSnapshotTests/testSearchModePickerExpanded.fr-FR-pad-dark.png +++ b/ScrabbdictTests/Snapshots/__Snapshots__/ScrabbdictSnapshotTests/testSearchModePickerExpanded.fr-FR-pad-dark.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d0d0f6a3d3530b19ec3ee9807c6fe6b286c512855470173008876fcf1995019a -size 6314891 +oid sha256:4dc1dbf0c87d405c2a3ef13b91b2dd9910263434a3d633b69bff0952e9de4308 +size 6329897 diff --git a/ScrabbdictTests/Snapshots/__Snapshots__/ScrabbdictSnapshotTests/testSearchModePickerExpanded.fr-FR-pad-light.png b/ScrabbdictTests/Snapshots/__Snapshots__/ScrabbdictSnapshotTests/testSearchModePickerExpanded.fr-FR-pad-light.png index 3f56fdf..c7f277f 100644 --- a/ScrabbdictTests/Snapshots/__Snapshots__/ScrabbdictSnapshotTests/testSearchModePickerExpanded.fr-FR-pad-light.png +++ b/ScrabbdictTests/Snapshots/__Snapshots__/ScrabbdictSnapshotTests/testSearchModePickerExpanded.fr-FR-pad-light.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:abcb50cb735c351f1b9aaaf723dbf58333ac8b5783b33e71a2f03fcf1c8cc516 -size 3600270 +oid sha256:e994adb2955b8fe6a7c9e4c8d01371bc29aa1cadf71982255442c2af96e31e46 +size 3619756 diff --git a/ScrabbdictTests/Snapshots/__Snapshots__/ScrabbdictSnapshotTests/testSearchModePickerExpanded.pl-PL-dark.png b/ScrabbdictTests/Snapshots/__Snapshots__/ScrabbdictSnapshotTests/testSearchModePickerExpanded.pl-PL-dark.png index 0bd7120..33d4d6d 100644 --- a/ScrabbdictTests/Snapshots/__Snapshots__/ScrabbdictSnapshotTests/testSearchModePickerExpanded.pl-PL-dark.png +++ b/ScrabbdictTests/Snapshots/__Snapshots__/ScrabbdictSnapshotTests/testSearchModePickerExpanded.pl-PL-dark.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f231c461332ea2930c9f55e348d8251981b4db3763773a321a5cd431b42f9c71 -size 1385978 +oid sha256:ff47f13d6e503944fa6f189f1e68fb1057f69c43917130cc806bf3de29fff8a2 +size 1370253 diff --git a/ScrabbdictTests/Snapshots/__Snapshots__/ScrabbdictSnapshotTests/testSearchModePickerExpanded.pl-PL-light.png b/ScrabbdictTests/Snapshots/__Snapshots__/ScrabbdictSnapshotTests/testSearchModePickerExpanded.pl-PL-light.png index 6452322..986c8fe 100644 --- a/ScrabbdictTests/Snapshots/__Snapshots__/ScrabbdictSnapshotTests/testSearchModePickerExpanded.pl-PL-light.png +++ b/ScrabbdictTests/Snapshots/__Snapshots__/ScrabbdictSnapshotTests/testSearchModePickerExpanded.pl-PL-light.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:55a3e096f666ea72d642ff244a1def93b9d2e1c4cf0b2bbc32314d57a8e854db -size 859382 +oid sha256:c3afd9e871c5e2647a006b87a4251d098e1b4750d6d3d462aeea7d5819b98e34 +size 868819 diff --git a/ScrabbdictTests/Snapshots/__Snapshots__/ScrabbdictSnapshotTests/testSearchModePickerExpanded.pl-PL-pad-dark.png b/ScrabbdictTests/Snapshots/__Snapshots__/ScrabbdictSnapshotTests/testSearchModePickerExpanded.pl-PL-pad-dark.png index 6de06bd..579c545 100644 --- a/ScrabbdictTests/Snapshots/__Snapshots__/ScrabbdictSnapshotTests/testSearchModePickerExpanded.pl-PL-pad-dark.png +++ b/ScrabbdictTests/Snapshots/__Snapshots__/ScrabbdictSnapshotTests/testSearchModePickerExpanded.pl-PL-pad-dark.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7281d77795f174f752fbe41fce372ba15f8dc7167bd6a820ddd37caef372970f -size 6334659 +oid sha256:5879a60213d58841f2fa3383047ab23f9ddad0cd5fef1227a22c33765b8c4613 +size 6317394 diff --git a/ScrabbdictTests/Snapshots/__Snapshots__/ScrabbdictSnapshotTests/testSearchModePickerExpanded.pl-PL-pad-light.png b/ScrabbdictTests/Snapshots/__Snapshots__/ScrabbdictSnapshotTests/testSearchModePickerExpanded.pl-PL-pad-light.png index 9e8062d..1a5af3f 100644 --- a/ScrabbdictTests/Snapshots/__Snapshots__/ScrabbdictSnapshotTests/testSearchModePickerExpanded.pl-PL-pad-light.png +++ b/ScrabbdictTests/Snapshots/__Snapshots__/ScrabbdictSnapshotTests/testSearchModePickerExpanded.pl-PL-pad-light.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ac314053e5b80e70b527007b07794e413e215d9a81e857536543b8e9575fe838 -size 3607711 +oid sha256:fcd1fb9201bd1f206ee8568b774920cc025071c474163ba4241235551a8f8b27 +size 3617606 diff --git a/ScrabbdictTests/Support/SnapshotTestingSupport.swift b/ScrabbdictTests/Support/SnapshotTestingSupport.swift index 695c330..b38867f 100644 --- a/ScrabbdictTests/Support/SnapshotTestingSupport.swift +++ b/ScrabbdictTests/Support/SnapshotTestingSupport.swift @@ -63,7 +63,7 @@ func assertScreenSnapshots( ), as: .image( drawHierarchyInKeyWindow: drawHierarchyInKeyWindow, - precision: 0.995, + precision: 0.999, layout: .device(config: deviceConfig), traits: deviceConfig.traits.modifyingTraits { $0.userInterfaceStyle = colorScheme == .light ? .light : .dark