Skip to content

Commit 3f8f9df

Browse files
committed
fix(user-management): wrap user email in SingleChildScrollView for scrolling
- Replace Stack with SingleChildScrollView to allow horizontal scrolling for long email addresses - Remove positional dots and replace with horizontal layout - Add icons for premium and privileged users with appropriate tooltips - Improve layout for admin and publisher indicators
1 parent 6385ec4 commit 3f8f9df

File tree

1 file changed

+36
-40
lines changed

1 file changed

+36
-40
lines changed

lib/user_management/view/users_page.dart

Lines changed: 36 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -226,48 +226,44 @@ class _UsersDataSource extends DataTableSource {
226226
// The email cell is wrapped in an Expanded widget to allow truncation.
227227
cells: [
228228
DataCell(
229-
Stack(
230-
alignment: Alignment.center,
231-
children: [
232-
// The email text is padded to prevent the indicator dots from
233-
// overlapping the text content.
234-
Padding(
235-
padding: const EdgeInsets.only(right: 24),
236-
child: Text(user.email, overflow: TextOverflow.ellipsis),
237-
),
238-
Positioned(
239-
right: 0,
240-
top: 0,
241-
bottom: 0,
242-
child: Row(
243-
mainAxisSize: MainAxisSize.min,
244-
children: [
245-
// Premium subscription indicator dot (gold)
246-
if (user.appRole.isPremium)
247-
Tooltip(
248-
message: l10n.premiumUserTooltip,
249-
child: const Icon(
250-
Icons.star,
251-
color: Colors.amber,
252-
size: 16,
253-
),
229+
SingleChildScrollView(
230+
scrollDirection: Axis.horizontal,
231+
child: Row(
232+
children: [
233+
Text(user.email),
234+
const SizedBox(width: AppSpacing.sm),
235+
if (user.appRole.isPremium)
236+
Tooltip(
237+
message: l10n.premiumUserTooltip,
238+
child: const Icon(
239+
Icons.star,
240+
color: Colors.amber,
241+
size: 16,
242+
),
243+
),
244+
if (user.dashboardRole.isPrivileged) ...[
245+
const SizedBox(width: AppSpacing.xs),
246+
if (user.dashboardRole == DashboardUserRole.admin)
247+
Tooltip(
248+
message: l10n.adminUserTooltip,
249+
child: const Icon(
250+
Icons.admin_panel_settings,
251+
color: Colors.blueAccent,
252+
size: 16,
254253
),
255-
// Privileged dashboard role indicator dot (blue)
256-
if (user.dashboardRole.isPrivileged) ...[
257-
const SizedBox(width: AppSpacing.xs),
258-
Tooltip(
259-
message: l10n.privilegedUserTooltip,
260-
child: const Icon(
261-
Icons.shield,
262-
color: Colors.blueAccent,
263-
size: 16,
264-
),
254+
)
255+
else if (user.dashboardRole == DashboardUserRole.publisher)
256+
Tooltip(
257+
message: l10n.publisherUserTooltip,
258+
child: const Icon(
259+
Icons.publish,
260+
color: Colors.green,
261+
size: 16,
265262
),
266-
],
267-
],
268-
),
269-
),
270-
],
263+
),
264+
],
265+
],
266+
),
271267
),
272268
),
273269
if (!isMobile)

0 commit comments

Comments
 (0)