Skip to content

UI/UX: Add item names to deletion confirmations - #6202

Open
eliotcougar wants to merge 4 commits into
2dust:masterfrom
eliotcougar:fix/named-deletion-confirmations
Open

eliotcougar wants to merge 4 commits into
2dust:masterfrom
eliotcougar:fix/named-deletion-confirmations

Conversation

@eliotcougar

Copy link
Copy Markdown
Contributor

Carry display names alongside existing GUIDs in main/subscription list confirmation requests, and retain the main target across recreation with its two-string saver. Use saved names in editors rather than uncommitted renames.
Center delete confirmation messages while retaining a single Text node for the question and target. Visually separate item name with a blank line in all nine locales, including asset files, which previously embedded the filename in the question.
Keep the title-free dialog and existing Cancel/Delete actions, and leave ordinary confirmation messages start-aligned. Bulk-delete prompts retain their collective wording.

This is a feature extraction from the accessibility PR set.

@eliotcougar

Copy link
Copy Markdown
Contributor Author

Compatibility note for #6200: Git can auto-merge these branches, but the resulting Kotlin source does not compile. #6200 replaces memberToDeleteIndex with memberToDeleteKey, while this PR's named chain-member confirmation still formats members.getOrNull(index) after the automatic merge.

Preferred reconciliation: merge/rebase #6200 first, then rebase this PR and derive the confirmation name from the stable member key through memberKeys. The combined test should reorder members while the dialog is open and verify that the shown name and eventual deletion still target the same member. The other named-confirmation call sites are not adversely affected by #6200.

Extract the visible named-confirmation wording from the accessibility assembly onto current upstream. Cover main-list profiles, standard and custom profile editors, policy groups, proxy-chain members, subscriptions, routing-rule editors, and asset sources. Reuse the six localized named variants in all nine catalogs; preserve existing generic strings and the already-named asset-file confirmation.

Carry display names alongside existing GUIDs in main/subscription list confirmation requests, and retain the main target across recreation with its two-string saver. Use saved names in editors rather than uncommitted renames. Do not import accessibility semantics, action menus, live regions, the separate routing-list Delete button, or the proxy-chain stable-key migration.

Validation: 72 JVM tests passed, including two deletion-target saver regressions; Play Store debug compilation and x86_64 assembly passed. An API 33 emulator verified all 54 compiled localized resources with Unicode and percent-containing names, the main profile confirmation across rotation, and subscription confirmation/cancel. No deletion was confirmed. Other editors, double-column menus, keyboard/D-pad, and TalkBack were not exercised. Original APK and rotation settings were restored.
Center delete confirmation messages while retaining a single Text node for the question and target. Separate each item name with a blank line in all nine locales, including asset files, which previously embedded the filename in the question.

Keep the title-free dialog and existing Cancel/Delete actions, and leave ordinary confirmation messages start-aligned. Bulk-delete prompts retain their collective wording.

Validation: 72 JVM tests, Kotlin compilation and Play Store debug assembly passed. All 63 compiled localized templates preserved an exact Unicode/percent target. Emulator checks covered profile and asset message nodes, two action targets, cancellation and profile dialog recreation after rotation. Actual spoken TalkBack output and the full theme/input matrix were not verified.
Upstream 2dust#6200 replaced pending member indices with stable keys. The textual rebase of 2dust#6202 retained an out-of-scope index reference in the confirmation text, breaking compilation.

Look up the current member name through memberKeys, using the same pending identity as deletion. Reordering no longer separates the displayed target from the member removed on confirmation.
@eliotcougar
eliotcougar force-pushed the fix/named-deletion-confirmations branch from cfe9bbd to c8f206d Compare September 10, 2026 07:41
@2dust

2dust commented Sep 11, 2026

Copy link
Copy Markdown
Owner

改进是好的,但是有点过度了,比如 string 分的太细了,每个语言的翻译和维护变难了

@eliotcougar

Copy link
Copy Markdown
Contributor Author

改进是好的,但是有点过度了,比如 string 分的太细了,每个语言的翻译和维护变难了

I don't think it's such a big problem. It's only a simple string concatenation.

It is an extra chance given to the user to avoid a mistake.

Alternative is to make it two separate elements, but in that case TalkBack will not read it as a single block of text.

Let DeleteConfirmDialog append an optional item name after a blank line while keeping the complete message in one centered Text. Reuse the existing localized questions at all named deletion sites and remove six duplicate resource keys from all nine locales. Asset-file questions use the same shared layout. Unnamed and bulk prompts remain unchanged.

Retain stable-key proxy-chain target lookup and the corrected Russian policy-group wording in the reused question. Validation: existing ServerDeleteTargetTest, all 79 JVM tests, x86_64 Play Store debug assembly and a Pixel 9 Pro emulator check passed. The profile dialog exposes one question/name text node plus Cancel/Delete, and canceling preserves the lab profiles. TalkBack was enabled for the smoke check; actual speech and the full device/theme/locale matrix were not independently verified.
@eliotcougar

Copy link
Copy Markdown
Contributor Author

Moved message construction from the resources to the dialog component. This way it looks cleaner, I guess.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants