fix(app): find Settings › About by its translation row only when it shows
The About entry of the Settings search always listed "Translation" among its keywords, and its tooltip named the translation, but that row shows only outside English. In English a search for "Translation" left About alone in the list and selected a page without such a row. The page's search words are now read at each search, so the keyword follows the language while Settings is open, and the tooltip no longer names a row that may be hidden. Also drop About from the doc comments of the update notice and the diagnostics bundle: since owner review 2, R5 only Settings › Updates and Settings › Advanced offer them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
a34b33d50b
commit
bb065c7836
8 files changed
+33
-8
No files matched your search
@@ -308,6 +308,18 @@ public sealed class SettingsLogicTests
|
||||
Assert.Equal(("Not supported", "—", "—", false), (none.TierText, none.DecoderText, none.NeedsText, none.HasNeeds));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ASettingsPageIsFoundOnlyByTheRowsItShows()
|
||||
{
|
||||
// About's translation row shows outside English only: its keyword is read at each search, not once (owner review 2).
|
||||
var shown = false;
|
||||
var about = new SettingsPageItem(SettingsPage.About, () => shown ? ["About.Translation"] : []);
|
||||
Assert.False(about.Matches(Loc.L("About.Translation")), "a hidden row does not match");
|
||||
shown = true;
|
||||
Assert.True(about.Matches(Loc.L("About.Translation")));
|
||||
Assert.True(new SettingsPageItem(SettingsPage.About, ["About.Build"]).Matches(Loc.L("About.Build")));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void EnumDrivenKeysExistInEveryRequiredLanguage()
|
||||
{
|
||||
|
||||
@@ -361,6 +361,8 @@ public sealed class SettingsScreenSmokeTests
|
||||
Assert.Contains(settings.VisiblePages, p => p.Page == SettingsPage.About);
|
||||
settings.SearchText = Loc.L("About.Releases");
|
||||
Assert.Contains(settings.VisiblePages, p => p.Page == SettingsPage.Updates);
|
||||
settings.SearchText = Loc.L("About.Translation");
|
||||
Assert.False(settings.VisiblePages.Any(p => p.Page == SettingsPage.About), "the hidden translation row does not match");
|
||||
settings.SearchText = string.Empty;
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user