Skip to content

Commit b232183

Browse files
committed
emoji_reaction: Remove tooltip on ReactionChip; add semantics label
In a later commit in this series, we'll replace the long-press action with showing a "view-reactions" sheet. We won't want something else that's triggered on long-press, like this tooltip, and the tooltip was sometimes winning the gesture-detection in my testing at that later commit. Remove the tooltip, replacing it with a semantics label, which tests that were relying on the tooltip can use instead.
1 parent 025b0ce commit b232183

17 files changed

+328
-72
lines changed

assets/l10n/app_en.arb

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -973,6 +973,21 @@
973973
"@reactedEmojiSelfUser": {
974974
"description": "Display name for the user themself, to show on an emoji reaction added by the user."
975975
},
976+
"reactionChipLabel": "{emojiName}: {votes}",
977+
"@reactionChipLabel": {
978+
"description": "Text describing a reaction chip, with the emoji name and a list or number of votes. (An accessibility label for assistive technology.)",
979+
"placeholders": {
980+
"emojiName": {"type": "String", "example": "working_on_it"},
981+
"votes": {"type": "String", "example": "You, Chris, Greg"}
982+
}
983+
},
984+
"reactionChipVotesYouAndOthers": "{otherUsersCount, plural, =1{You and 1 other} other{You and {otherUsersCount} others}}",
985+
"@reactionChipVotesYouAndOthers": {
986+
"description": "The number of votes on a reaction chip, where the self-user and at least one other user has voted. (An accessibility label for assistive technology.)",
987+
"placeholders": {
988+
"otherUsersCount": {"type": "int", "example": "4"}
989+
}
990+
},
976991
"onePersonTyping": "{typist} is typing…",
977992
"@onePersonTyping": {
978993
"description": "Text to display when there is one user typing.",

lib/generated/l10n/zulip_localizations.dart

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1469,6 +1469,18 @@ abstract class ZulipLocalizations {
14691469
/// **'You'**
14701470
String get reactedEmojiSelfUser;
14711471

1472+
/// Text describing a reaction chip, with the emoji name and a list or number of votes. (An accessibility label for assistive technology.)
1473+
///
1474+
/// In en, this message translates to:
1475+
/// **'{emojiName}: {votes}'**
1476+
String reactionChipLabel(String emojiName, String votes);
1477+
1478+
/// The number of votes on a reaction chip, where the self-user and at least one other user has voted. (An accessibility label for assistive technology.)
1479+
///
1480+
/// In en, this message translates to:
1481+
/// **'{otherUsersCount, plural, =1{You and 1 other} other{You and {otherUsersCount} others}}'**
1482+
String reactionChipVotesYouAndOthers(int otherUsersCount);
1483+
14721484
/// Text to display when there is one user typing.
14731485
///
14741486
/// In en, this message translates to:

lib/generated/l10n/zulip_localizations_ar.dart

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -796,6 +796,22 @@ class ZulipLocalizationsAr extends ZulipLocalizations {
796796
@override
797797
String get reactedEmojiSelfUser => 'You';
798798

799+
@override
800+
String reactionChipLabel(String emojiName, String votes) {
801+
return '$emojiName: $votes';
802+
}
803+
804+
@override
805+
String reactionChipVotesYouAndOthers(int otherUsersCount) {
806+
String _temp0 = intl.Intl.pluralLogic(
807+
otherUsersCount,
808+
locale: localeName,
809+
other: 'You and $otherUsersCount others',
810+
one: 'You and 1 other',
811+
);
812+
return '$_temp0';
813+
}
814+
799815
@override
800816
String onePersonTyping(String typist) {
801817
return '$typist is typing…';

lib/generated/l10n/zulip_localizations_de.dart

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -816,6 +816,22 @@ class ZulipLocalizationsDe extends ZulipLocalizations {
816816
@override
817817
String get reactedEmojiSelfUser => 'Du';
818818

819+
@override
820+
String reactionChipLabel(String emojiName, String votes) {
821+
return '$emojiName: $votes';
822+
}
823+
824+
@override
825+
String reactionChipVotesYouAndOthers(int otherUsersCount) {
826+
String _temp0 = intl.Intl.pluralLogic(
827+
otherUsersCount,
828+
locale: localeName,
829+
other: 'You and $otherUsersCount others',
830+
one: 'You and 1 other',
831+
);
832+
return '$_temp0';
833+
}
834+
819835
@override
820836
String onePersonTyping(String typist) {
821837
return '$typist tippt…';

lib/generated/l10n/zulip_localizations_en.dart

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -796,6 +796,22 @@ class ZulipLocalizationsEn extends ZulipLocalizations {
796796
@override
797797
String get reactedEmojiSelfUser => 'You';
798798

799+
@override
800+
String reactionChipLabel(String emojiName, String votes) {
801+
return '$emojiName: $votes';
802+
}
803+
804+
@override
805+
String reactionChipVotesYouAndOthers(int otherUsersCount) {
806+
String _temp0 = intl.Intl.pluralLogic(
807+
otherUsersCount,
808+
locale: localeName,
809+
other: 'You and $otherUsersCount others',
810+
one: 'You and 1 other',
811+
);
812+
return '$_temp0';
813+
}
814+
799815
@override
800816
String onePersonTyping(String typist) {
801817
return '$typist is typing…';

lib/generated/l10n/zulip_localizations_fr.dart

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -796,6 +796,22 @@ class ZulipLocalizationsFr extends ZulipLocalizations {
796796
@override
797797
String get reactedEmojiSelfUser => 'You';
798798

799+
@override
800+
String reactionChipLabel(String emojiName, String votes) {
801+
return '$emojiName: $votes';
802+
}
803+
804+
@override
805+
String reactionChipVotesYouAndOthers(int otherUsersCount) {
806+
String _temp0 = intl.Intl.pluralLogic(
807+
otherUsersCount,
808+
locale: localeName,
809+
other: 'You and $otherUsersCount others',
810+
one: 'You and 1 other',
811+
);
812+
return '$_temp0';
813+
}
814+
799815
@override
800816
String onePersonTyping(String typist) {
801817
return '$typist is typing…';

lib/generated/l10n/zulip_localizations_it.dart

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -811,6 +811,22 @@ class ZulipLocalizationsIt extends ZulipLocalizations {
811811
@override
812812
String get reactedEmojiSelfUser => 'Tu';
813813

814+
@override
815+
String reactionChipLabel(String emojiName, String votes) {
816+
return '$emojiName: $votes';
817+
}
818+
819+
@override
820+
String reactionChipVotesYouAndOthers(int otherUsersCount) {
821+
String _temp0 = intl.Intl.pluralLogic(
822+
otherUsersCount,
823+
locale: localeName,
824+
other: 'You and $otherUsersCount others',
825+
one: 'You and 1 other',
826+
);
827+
return '$_temp0';
828+
}
829+
814830
@override
815831
String onePersonTyping(String typist) {
816832
return '$typist sta scrivendo…';

lib/generated/l10n/zulip_localizations_ja.dart

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -793,6 +793,22 @@ class ZulipLocalizationsJa extends ZulipLocalizations {
793793
@override
794794
String get reactedEmojiSelfUser => 'You';
795795

796+
@override
797+
String reactionChipLabel(String emojiName, String votes) {
798+
return '$emojiName: $votes';
799+
}
800+
801+
@override
802+
String reactionChipVotesYouAndOthers(int otherUsersCount) {
803+
String _temp0 = intl.Intl.pluralLogic(
804+
otherUsersCount,
805+
locale: localeName,
806+
other: 'You and $otherUsersCount others',
807+
one: 'You and 1 other',
808+
);
809+
return '$_temp0';
810+
}
811+
796812
@override
797813
String onePersonTyping(String typist) {
798814
return '$typist is typing…';

lib/generated/l10n/zulip_localizations_nb.dart

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -796,6 +796,22 @@ class ZulipLocalizationsNb extends ZulipLocalizations {
796796
@override
797797
String get reactedEmojiSelfUser => 'You';
798798

799+
@override
800+
String reactionChipLabel(String emojiName, String votes) {
801+
return '$emojiName: $votes';
802+
}
803+
804+
@override
805+
String reactionChipVotesYouAndOthers(int otherUsersCount) {
806+
String _temp0 = intl.Intl.pluralLogic(
807+
otherUsersCount,
808+
locale: localeName,
809+
other: 'You and $otherUsersCount others',
810+
one: 'You and 1 other',
811+
);
812+
return '$_temp0';
813+
}
814+
799815
@override
800816
String onePersonTyping(String typist) {
801817
return '$typist is typing…';

lib/generated/l10n/zulip_localizations_pl.dart

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -806,6 +806,22 @@ class ZulipLocalizationsPl extends ZulipLocalizations {
806806
@override
807807
String get reactedEmojiSelfUser => 'Ty';
808808

809+
@override
810+
String reactionChipLabel(String emojiName, String votes) {
811+
return '$emojiName: $votes';
812+
}
813+
814+
@override
815+
String reactionChipVotesYouAndOthers(int otherUsersCount) {
816+
String _temp0 = intl.Intl.pluralLogic(
817+
otherUsersCount,
818+
locale: localeName,
819+
other: 'You and $otherUsersCount others',
820+
one: 'You and 1 other',
821+
);
822+
return '$_temp0';
823+
}
824+
809825
@override
810826
String onePersonTyping(String typist) {
811827
return '$typist coś pisze…';

0 commit comments

Comments
 (0)