Ask for a group name when importing subscriptions - #6174
eliotcougar wants to merge 6 commits into
Conversation
Wait for confirmation when clipboard or QR imports discover a new subscription. Suggest an unused default name, preserve link-provided names, and skip saving on Cancel. Keep pending input in the main ViewModel so activity recreation retains the draft. Route the scanner shortcut through the same import flow while preserving its target group and append behavior. Add JVM naming tests and emulator regression coverage for confirmation, cancellation, clipboard imports, encoded batches, duplicate URLs, and ordinary proxy imports.
|
Thanks for the changes. I tested the subscription import flow with TalkBack and found two accessibility/usability issues worth mentioning:
When TalkBack focus is inside an EditText, using character-by-character or word-by-word text navigation causes the field's label to be announced as part of the text, always appearing after the text entered by the user. For example, in the new "Subscription name" field, after entering a name, navigating through the text also announces "Subscription name" at the end. I can reproduce the same behavior in other EditTexts in v2rayNG, such as the manual subscription import field, so this does not appear to be specific to this PR. I also tested other Android apps and did not observe the same behavior there.
When attempting to import a subscription that already exists, the duplicate is correctly prevented. However, TalkBack only announces "Failed", without explaining the reason for the failure. For a screen reader user, this makes it unclear that the subscription was rejected because it already exists. A more descriptive error message would make the reason for the failure much clearer. |
Keep duplicate subscription outcomes separate from empty or invalid imports so the main import flow reports why an existing subscription was not added instead of showing a generic failure. Preserve duplicate detection before and after the naming prompt, including encoded batches, and provide singular/plural feedback in all nine locale catalogs. Keep cancellation and successful import behavior intact. Add regression coverage for visible duplicate feedback and concurrent imports. Validation: 62 JVM tests and six Android instrumentation tests passed on Pixel 6a/API 33 with TalkBack enabled. Leave editable-field labeling unchanged pending stable Compose support.
|
Thank you, @aliRahimi1997, for reporting both issues. Duplicate subscription feedback: fixedCommit a83d958 fixes item 2. Previously, the import result only retained successful counts, so an existing subscription could fall through to the generic failure message. The result now also carries duplicate counts, including Base64 input and the recheck after the naming dialog. The main import flow displays “This subscription already exists.” or its plural instead of “Failed”, using localized resources in all nine catalogs and the existing feedback mechanism. Validation: all 62 JVM tests and six instrumentation tests passed on Pixel 6a / Android 13. The device tests retained TalkBack and checked the duplicate-feedback text in the accessibility tree. This is not a claim of verified speech in every locale. Text-field label during character/word navigation: deferredItem 1 remains acknowledged and unresolved. In the inspected accessibility tree, the editable value was only the entered name; Material's “Subscription name” label appeared as a descendant text node. This is consistent with your report and also affects existing fields, rather than being specific to this dialog. This branch uses Compose UI 1.11.4 / Material3 1.4.0. Compose's native We also will not substitute a custom A future Compose update is not being presented as an automatic fix. After adopting stable support, we should review the common field-label implementation and verify empty and populated fields, character/word navigation, cursor movement, and selection with TalkBack. Until then, the standard editable-field behavior is deliberately unchanged. |
Display the current URL in a localized prompt and keep it with the pending name across recreation. Let TalkBack initially focus that prompt while retaining immediate typing without touch exploration. Reset the dialog for each URL in a batch and cover focus, naming, cancellation, title semantics, and URL propagation in regression tests.
Use the exact subscription import wording supplied by hosseinabaspanah in 2dust#6169 (comment). Keep the already-matching field label and singular duplicate message.
|
感谢 |
Clipboard and QR imports currently save new subscription groups immediately. Links without a name all receive the same
import subplaceholder, leaving users with indistinguishable groups to rename afterward. A batch can contain several subscription URLs, so the naming prompt also needs to identify the URL being imported.This change asks for a name before saving each new subscription group. The dialog has no visible heading and shows Provide the name for the subscription group: [URL]., one prefilled text field, and OK / Cancel buttons.
import sub 2,import sub 3, and so on.Clipboard, QR, and local-file actions share this pipeline. The QR scanner shortcut uses the same confirmation flow while retaining its target-group and append behavior. Ordinary proxy profiles import without prompting, and URL-scheme imports retain their automatic behavior. No existing groups are renamed; storage formats and native dependencies are unchanged. All dialog strings are localized in the nine supported catalogs, with bidirectional formatting around URLs in right-to-left layouts.
Bakhtiari subscription-import wording now matches the native-speaker correction from hosseinabaspanah in PR #6169. Four values changed; the field label and singular duplicate message already matched. Resource IDs, plural categories, and the URL placeholder are unchanged.
For the wording-only update at
424b4d32, XML parsing, exact comparison against all six supplied values, andgit diff --checkpassed. Not run: builds and tests for this update, as requested.Earlier functional validation on
7250f15a(before the Bakhtiari wording correction):477c6b4calso covered touch confirmation, persisted names after reopening, Tab/Enter cancellation, and D-pad button traversal/activation.Not run: physical-camera QR scanning, end-to-end TalkBack touch gestures or spoken-audio verification, and speech fluency in every locale. The accessibility checks establish native focus, text, title, and action behavior, not complete spoken traversal.
Known accessibility limitation: the editable field's label can be encountered during character/word navigation in the current Compose implementation. Field labeling is unchanged here, pending stable native hint support across the common text fields. No alpha dependency upgrade or editable-field content-description replacement is included. See the follow-up explanation.