Skip to content

Commit 80a9294

Browse files
committed
fix(discover): adjust text overflow handling for source names
- Reduce max lines for source names to 1 in discover page - Add ellipsis overflow handling for source list page titles - Ensure text doesn't overflow and is properly displayed on one line
1 parent bca8e14 commit 80a9294

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

lib/discover/view/discover_page.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ class _SourceCard extends StatelessWidget {
204204
source.name,
205205
style: theme.textTheme.bodyMedium,
206206
textAlign: TextAlign.center,
207-
maxLines: 2,
207+
maxLines: 1,
208208
overflow: TextOverflow.ellipsis,
209209
),
210210
),

lib/discover/view/source_list_page.dart

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ class _SourceListViewState extends State<_SourceListView> {
122122
title: Text(
123123
state.sourceType?.l10nPlural(l10n) ??
124124
l10n.discoverPageTitle,
125+
overflow: TextOverflow.ellipsis,
125126
),
126127
pinned: true,
127128
actions: [
@@ -216,7 +217,12 @@ class _SourceListTile extends StatelessWidget {
216217

217218
return ListTile(
218219
leading: const Icon(Icons.source_outlined),
219-
title: Text(source.name, style: theme.textTheme.titleMedium),
220+
title: Text(
221+
source.name,
222+
style: theme.textTheme.titleMedium,
223+
maxLines: 1,
224+
overflow: TextOverflow.ellipsis,
225+
),
220226
trailing: TextButton(
221227
onPressed: () {
222228
// If the user is unfollowing, always allow it.

0 commit comments

Comments
 (0)