Declutter the map overlay

Drop the row of activity/type/group chips under the Local/Online/Both
switch; every option is already in the filter sheet, whose button now
shows a badge with the number of active filters. Add a one-line hint to
each map source segment.
This commit is contained in:
zjs81 committed 2026-10-24 21:00:42 -07:00
1 parent 00756ef05e
commit ed5884e252
22 files changed
+303 -145

No files matched your search

+3
View File
@@ -3467,6 +3467,9 @@
"networkMap_sourceLocal": "Local",
"networkMap_sourceOnline": "Online",
"networkMap_sourceBoth": "Both",
"networkMap_sourceLocalHint": "Nodes your radio has heard",
"networkMap_sourceOnlineHint": "Repeaters from the online network map",
"networkMap_sourceBothHint": "Your radio's nodes plus the online network map",
"networkMap_zoomInHint": "Zoom in to see the online network map",
"networkMap_loadFailed": "Couldn't load the online network map",
"networkMap_inYourContacts": "In your contacts",
+18
View File
@@ -10477,6 +10477,24 @@ abstract class AppLocalizations {
/// **'Both'**
String get networkMap_sourceBoth;
/// No description provided for @networkMap_sourceLocalHint.
///
/// In en, this message translates to:
/// **'Nodes your radio has heard'**
String get networkMap_sourceLocalHint;
/// No description provided for @networkMap_sourceOnlineHint.
///
/// In en, this message translates to:
/// **'Repeaters from the online network map'**
String get networkMap_sourceOnlineHint;
/// No description provided for @networkMap_sourceBothHint.
///
/// In en, this message translates to:
/// **'Your radio\'s nodes plus the online network map'**
String get networkMap_sourceBothHint;
/// No description provided for @networkMap_zoomInHint.
///
/// In en, this message translates to:
+11
View File
@@ -6256,6 +6256,17 @@ class AppLocalizationsBg extends AppLocalizations {
@override
String get networkMap_sourceBoth => 'И двете';
@override
String get networkMap_sourceLocalHint => 'Nodes your radio has heard';
@override
String get networkMap_sourceOnlineHint =>
'Repeaters from the online network map';
@override
String get networkMap_sourceBothHint =>
'Your radio\'s nodes plus the online network map';
@override
String get networkMap_zoomInHint =>
'Увеличете, за да видите онлайн мрежовата карта';
+11
View File
@@ -6269,6 +6269,17 @@ class AppLocalizationsDe extends AppLocalizations {
@override
String get networkMap_sourceBoth => 'Beides';
@override
String get networkMap_sourceLocalHint => 'Nodes your radio has heard';
@override
String get networkMap_sourceOnlineHint =>
'Repeaters from the online network map';
@override
String get networkMap_sourceBothHint =>
'Your radio\'s nodes plus the online network map';
@override
String get networkMap_zoomInHint =>
'Zoome hinein, um die Online-Netzwerkkarte zu sehen';
+11
View File
@@ -6167,6 +6167,17 @@ class AppLocalizationsEn extends AppLocalizations {
@override
String get networkMap_sourceBoth => 'Both';
@override
String get networkMap_sourceLocalHint => 'Nodes your radio has heard';
@override
String get networkMap_sourceOnlineHint =>
'Repeaters from the online network map';
@override
String get networkMap_sourceBothHint =>
'Your radio\'s nodes plus the online network map';
@override
String get networkMap_zoomInHint => 'Zoom in to see the online network map';
+11
View File
@@ -6258,6 +6258,17 @@ class AppLocalizationsEs extends AppLocalizations {
@override
String get networkMap_sourceBoth => 'Ambos';
@override
String get networkMap_sourceLocalHint => 'Nodes your radio has heard';
@override
String get networkMap_sourceOnlineHint =>
'Repeaters from the online network map';
@override
String get networkMap_sourceBothHint =>
'Your radio\'s nodes plus the online network map';
@override
String get networkMap_zoomInHint =>
'Acerca el zoom para ver el mapa de la red en línea';
+11
View File
@@ -6284,6 +6284,17 @@ class AppLocalizationsFr extends AppLocalizations {
@override
String get networkMap_sourceBoth => 'Les deux';
@override
String get networkMap_sourceLocalHint => 'Nodes your radio has heard';
@override
String get networkMap_sourceOnlineHint =>
'Repeaters from the online network map';
@override
String get networkMap_sourceBothHint =>
'Your radio\'s nodes plus the online network map';
@override
String get networkMap_zoomInHint =>
'Zoomez pour voir la carte du réseau en ligne';
+11
View File
@@ -6246,6 +6246,17 @@ class AppLocalizationsHu extends AppLocalizations {
@override
String get networkMap_sourceBoth => 'Mindkettő';
@override
String get networkMap_sourceLocalHint => 'Nodes your radio has heard';
@override
String get networkMap_sourceOnlineHint =>
'Repeaters from the online network map';
@override
String get networkMap_sourceBothHint =>
'Your radio\'s nodes plus the online network map';
@override
String get networkMap_zoomInHint =>
'Nagyíts rá az online hálózati térkép megtekintéséhez';
+11
View File
@@ -6265,6 +6265,17 @@ class AppLocalizationsIt extends AppLocalizations {
@override
String get networkMap_sourceBoth => 'Entrambi';
@override
String get networkMap_sourceLocalHint => 'Nodes your radio has heard';
@override
String get networkMap_sourceOnlineHint =>
'Repeaters from the online network map';
@override
String get networkMap_sourceBothHint =>
'Your radio\'s nodes plus the online network map';
@override
String get networkMap_zoomInHint =>
'Ingrandisci per vedere la mappa della rete online';
+11
View File
@@ -5965,6 +5965,17 @@ class AppLocalizationsJa extends AppLocalizations {
@override
String get networkMap_sourceBoth => '両方';
@override
String get networkMap_sourceLocalHint => 'Nodes your radio has heard';
@override
String get networkMap_sourceOnlineHint =>
'Repeaters from the online network map';
@override
String get networkMap_sourceBothHint =>
'Your radio\'s nodes plus the online network map';
@override
String get networkMap_zoomInHint => 'ズームインするとオンラインのネットワークマップが表示されます';
+11
View File
@@ -5975,6 +5975,17 @@ class AppLocalizationsKo extends AppLocalizations {
@override
String get networkMap_sourceBoth => '모두';
@override
String get networkMap_sourceLocalHint => 'Nodes your radio has heard';
@override
String get networkMap_sourceOnlineHint =>
'Repeaters from the online network map';
@override
String get networkMap_sourceBothHint =>
'Your radio\'s nodes plus the online network map';
@override
String get networkMap_zoomInHint => '온라인 네트워크 지도를 보려면 확대하세요';
+11
View File
@@ -6223,6 +6223,17 @@ class AppLocalizationsNl extends AppLocalizations {
@override
String get networkMap_sourceBoth => 'Beide';
@override
String get networkMap_sourceLocalHint => 'Nodes your radio has heard';
@override
String get networkMap_sourceOnlineHint =>
'Repeaters from the online network map';
@override
String get networkMap_sourceBothHint =>
'Your radio\'s nodes plus the online network map';
@override
String get networkMap_zoomInHint =>
'Zoom in om de online netwerkkaart te zien';
+11
View File
@@ -6289,6 +6289,17 @@ class AppLocalizationsPl extends AppLocalizations {
@override
String get networkMap_sourceBoth => 'Obie';
@override
String get networkMap_sourceLocalHint => 'Nodes your radio has heard';
@override
String get networkMap_sourceOnlineHint =>
'Repeaters from the online network map';
@override
String get networkMap_sourceBothHint =>
'Your radio\'s nodes plus the online network map';
@override
String get networkMap_zoomInHint =>
'Przybliż, aby zobaczyć mapę sieci online';
+11
View File
@@ -6253,6 +6253,17 @@ class AppLocalizationsPt extends AppLocalizations {
@override
String get networkMap_sourceBoth => 'Ambos';
@override
String get networkMap_sourceLocalHint => 'Nodes your radio has heard';
@override
String get networkMap_sourceOnlineHint =>
'Repeaters from the online network map';
@override
String get networkMap_sourceBothHint =>
'Your radio\'s nodes plus the online network map';
@override
String get networkMap_zoomInHint =>
'Aproxime o zoom para ver o mapa da rede online';
+11
View File
@@ -6276,6 +6276,17 @@ class AppLocalizationsRu extends AppLocalizations {
@override
String get networkMap_sourceBoth => 'Обе';
@override
String get networkMap_sourceLocalHint => 'Nodes your radio has heard';
@override
String get networkMap_sourceOnlineHint =>
'Repeaters from the online network map';
@override
String get networkMap_sourceBothHint =>
'Your radio\'s nodes plus the online network map';
@override
String get networkMap_zoomInHint =>
'Приблизьте, чтобы увидеть онлайн-карту сети';
+11
View File
@@ -6236,6 +6236,17 @@ class AppLocalizationsSk extends AppLocalizations {
@override
String get networkMap_sourceBoth => 'Obe';
@override
String get networkMap_sourceLocalHint => 'Nodes your radio has heard';
@override
String get networkMap_sourceOnlineHint =>
'Repeaters from the online network map';
@override
String get networkMap_sourceBothHint =>
'Your radio\'s nodes plus the online network map';
@override
String get networkMap_zoomInHint =>
'Priblížte, aby ste videli online sieťovú mapu';
+11
View File
@@ -6238,6 +6238,17 @@ class AppLocalizationsSl extends AppLocalizations {
@override
String get networkMap_sourceBoth => 'Oboje';
@override
String get networkMap_sourceLocalHint => 'Nodes your radio has heard';
@override
String get networkMap_sourceOnlineHint =>
'Repeaters from the online network map';
@override
String get networkMap_sourceBothHint =>
'Your radio\'s nodes plus the online network map';
@override
String get networkMap_zoomInHint =>
'Povečajte, da vidite spletni omrežni zemljevid';
+11
View File
@@ -6203,6 +6203,17 @@ class AppLocalizationsSv extends AppLocalizations {
@override
String get networkMap_sourceBoth => 'Båda';
@override
String get networkMap_sourceLocalHint => 'Nodes your radio has heard';
@override
String get networkMap_sourceOnlineHint =>
'Repeaters from the online network map';
@override
String get networkMap_sourceBothHint =>
'Your radio\'s nodes plus the online network map';
@override
String get networkMap_zoomInHint =>
'Zooma in för att se nätverkskartan online';
+11
View File
@@ -6277,6 +6277,17 @@ class AppLocalizationsUk extends AppLocalizations {
@override
String get networkMap_sourceBoth => 'Обидві';
@override
String get networkMap_sourceLocalHint => 'Nodes your radio has heard';
@override
String get networkMap_sourceOnlineHint =>
'Repeaters from the online network map';
@override
String get networkMap_sourceBothHint =>
'Your radio\'s nodes plus the online network map';
@override
String get networkMap_zoomInHint =>
'Наблизьте, щоб побачити онлайн-карту мережі';
+11
View File
@@ -5830,6 +5830,17 @@ class AppLocalizationsZh extends AppLocalizations {
@override
String get networkMap_sourceBoth => '两者';
@override
String get networkMap_sourceLocalHint => 'Nodes your radio has heard';
@override
String get networkMap_sourceOnlineHint =>
'Repeaters from the online network map';
@override
String get networkMap_sourceBothHint =>
'Your radio\'s nodes plus the online network map';
@override
String get networkMap_zoomInHint => '放大以查看在线网络地图';
+16 -128
View File
@@ -1080,7 +1080,11 @@ class _MapScreenState extends State<MapScreen> with DisconnectNavigationMixin {
? FloatingActionButton(
onPressed: () => _showFilterSheet(context, settingsService),
tooltip: context.l10n.map_filterNodes,
child: const Icon(Icons.filter_list),
child: Badge.count(
count: _activeFilterCount(settings),
isLabelVisible: _activeFilterCount(settings) > 0,
child: const Icon(Icons.filter_list),
),
)
: null,
),
@@ -2023,69 +2027,6 @@ class _MapScreenState extends State<MapScreen> with DisconnectNavigationMixin {
),
const SizedBox(height: 6),
_buildMapSourceSwitch(context, mapSource),
const SizedBox(height: 6),
LayoutBuilder(
builder: (context, constraints) {
final chips = <Widget>[
_mapChip(
label: context.l10n.time_allTime,
selected: _freshness == _Freshness.all,
onTap: () => setState(() => _freshness = _Freshness.all),
),
_mapChip(
label: context.l10n.map_online,
selected: _freshness == _Freshness.online,
color: MapPalette.online,
onTap: () => setState(() => _freshness = _Freshness.online),
),
_mapChip(
label: context.l10n.map_recent,
selected: _freshness == _Freshness.recent,
color: MapPalette.stale,
onTap: () => setState(() => _freshness = _Freshness.recent),
),
_mapChip(
label: context.l10n.map_stale,
selected: _freshness == _Freshness.stale,
color: MapPalette.offline,
onTap: () => setState(() => _freshness = _Freshness.stale),
),
_mapChip(
label: context.l10n.map_repeaters,
selected: settings.mapShowRepeaters,
color: MapPalette.repeater,
onTap: () => settingsService.setMapShowRepeaters(
!settings.mapShowRepeaters,
),
),
_mapChip(
label: context.l10n.map_chatNodes,
selected: settings.mapShowChatNodes,
color: MapPalette.selected,
onTap: () => settingsService.setMapShowChatNodes(
!settings.mapShowChatNodes,
),
),
_mapChip(
label: context.l10n.map_groupChip,
selected: settings.mapClusterNodes,
color: MapPalette.cluster,
onTap: () => settingsService.setMapClusterNodes(
!settings.mapClusterNodes,
),
),
];
if (constraints.maxWidth < 600) {
return Wrap(runSpacing: 6, children: chips);
}
return SingleChildScrollView(
scrollDirection: Axis.horizontal,
child: Row(children: chips),
);
},
),
if (hasQuery)
_buildSearchResults(context, allContacts, guessedLocations)
else if (_statsExpanded)
@@ -2107,6 +2048,14 @@ class _MapScreenState extends State<MapScreen> with DisconnectNavigationMixin {
);
}
int _activeFilterCount(AppSettings settings) => [
_freshness != _Freshness.all,
!settings.mapShowChatNodes,
!settings.mapShowRepeaters,
!settings.mapShowOtherNodes,
settings.mapKeyPrefixEnabled,
].where((active) => active).length;
Widget _buildMapSourceSwitch(BuildContext context, MapSourceOption source) {
final l10n = context.l10n;
return Material(
@@ -2128,16 +2077,19 @@ class _MapScreenState extends State<MapScreen> with DisconnectNavigationMixin {
value: MapSourceOption.local,
icon: const Icon(Icons.radio, size: 20),
label: Text(l10n.networkMap_sourceLocal),
tooltip: l10n.networkMap_sourceLocalHint,
),
ButtonSegment(
value: MapSourceOption.online,
icon: const Icon(Icons.public, size: 20),
label: Text(l10n.networkMap_sourceOnline),
tooltip: l10n.networkMap_sourceOnlineHint,
),
ButtonSegment(
value: MapSourceOption.both,
icon: const Icon(Icons.layers, size: 20),
label: Text(l10n.networkMap_sourceBoth),
tooltip: l10n.networkMap_sourceBothHint,
),
],
selected: {source},
@@ -2177,70 +2129,6 @@ class _MapScreenState extends State<MapScreen> with DisconnectNavigationMixin {
);
}
Widget _mapChip({
required String label,
required bool selected,
required VoidCallback onTap,
Color? color,
}) {
final accent = color ?? MapPalette.selected;
return Padding(
padding: const EdgeInsets.only(right: 6),
child: Semantics(
button: true,
selected: selected,
child: Material(
color: selected
? Color.alphaBlend(
accent.withValues(alpha: 0.34),
_overlayPanelColor,
)
: _overlayPanelColor,
shape: StadiumBorder(
side: BorderSide(
color: selected ? accent : _overlayBorderColor,
width: selected ? 1.5 : 1,
),
),
clipBehavior: Clip.antiAlias,
child: InkWell(
onTap: () {
HapticFeedback.selectionClick();
onTap();
},
child: Container(
constraints: const BoxConstraints(minHeight: 44),
padding: const EdgeInsets.symmetric(horizontal: 14),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
if (selected) ...[
Icon(
Icons.check,
size: 16,
color: _overlayPrimaryTextColor,
),
const SizedBox(width: 4),
],
Text(
label,
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.w600,
color: selected
? _overlayPrimaryTextColor
: _overlaySecondaryTextColor,
),
),
],
),
),
),
),
),
);
}
Widget _buildSearchResults(
BuildContext context,
List<Contact> allContacts,
+68 -17
View File
@@ -1,69 +1,120 @@
{
"bg": [
"contacts_keyPrefixSemantics"
"contacts_keyPrefixSemantics",
"networkMap_sourceLocalHint",
"networkMap_sourceOnlineHint",
"networkMap_sourceBothHint"
],
"de": [
"contacts_keyPrefixSemantics"
"contacts_keyPrefixSemantics",
"networkMap_sourceLocalHint",
"networkMap_sourceOnlineHint",
"networkMap_sourceBothHint"
],
"es": [
"contacts_keyPrefixSemantics"
"contacts_keyPrefixSemantics",
"networkMap_sourceLocalHint",
"networkMap_sourceOnlineHint",
"networkMap_sourceBothHint"
],
"fr": [
"contacts_keyPrefixSemantics"
"contacts_keyPrefixSemantics",
"networkMap_sourceLocalHint",
"networkMap_sourceOnlineHint",
"networkMap_sourceBothHint"
],
"hu": [
"contacts_keyPrefixSemantics"
"contacts_keyPrefixSemantics",
"networkMap_sourceLocalHint",
"networkMap_sourceOnlineHint",
"networkMap_sourceBothHint"
],
"it": [
"contacts_keyPrefixSemantics"
"contacts_keyPrefixSemantics",
"networkMap_sourceLocalHint",
"networkMap_sourceOnlineHint",
"networkMap_sourceBothHint"
],
"ja": [
"contacts_keyPrefixSemantics"
"contacts_keyPrefixSemantics",
"networkMap_sourceLocalHint",
"networkMap_sourceOnlineHint",
"networkMap_sourceBothHint"
],
"ko": [
"contacts_keyPrefixSemantics"
"contacts_keyPrefixSemantics",
"networkMap_sourceLocalHint",
"networkMap_sourceOnlineHint",
"networkMap_sourceBothHint"
],
"nl": [
"contacts_keyPrefixSemantics"
"contacts_keyPrefixSemantics",
"networkMap_sourceLocalHint",
"networkMap_sourceOnlineHint",
"networkMap_sourceBothHint"
],
"pl": [
"contacts_keyPrefixSemantics"
"contacts_keyPrefixSemantics",
"networkMap_sourceLocalHint",
"networkMap_sourceOnlineHint",
"networkMap_sourceBothHint"
],
"pt": [
"contacts_keyPrefixSemantics"
"contacts_keyPrefixSemantics",
"networkMap_sourceLocalHint",
"networkMap_sourceOnlineHint",
"networkMap_sourceBothHint"
],
"ru": [
"contacts_keyPrefixSemantics"
"contacts_keyPrefixSemantics",
"networkMap_sourceLocalHint",
"networkMap_sourceOnlineHint",
"networkMap_sourceBothHint"
],
"sk": [
"contacts_keyPrefixSemantics"
"contacts_keyPrefixSemantics",
"networkMap_sourceLocalHint",
"networkMap_sourceOnlineHint",
"networkMap_sourceBothHint"
],
"sl": [
"contacts_keyPrefixSemantics"
"contacts_keyPrefixSemantics",
"networkMap_sourceLocalHint",
"networkMap_sourceOnlineHint",
"networkMap_sourceBothHint"
],
"sv": [
"contacts_keyPrefixSemantics"
"contacts_keyPrefixSemantics",
"networkMap_sourceLocalHint",
"networkMap_sourceOnlineHint",
"networkMap_sourceBothHint"
],
"uk": [
"contacts_keyPrefixSemantics"
"contacts_keyPrefixSemantics",
"networkMap_sourceLocalHint",
"networkMap_sourceOnlineHint",
"networkMap_sourceBothHint"
],
"zh": [
"contacts_keyPrefixSemantics"
"contacts_keyPrefixSemantics",
"networkMap_sourceLocalHint",
"networkMap_sourceOnlineHint",
"networkMap_sourceBothHint"
]
}