Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -426,8 +426,11 @@ class _AppUsageDetailsContentState extends State<AppUsageDetailsContent> {
DetailTableRowData(
label: _translationService.translate(AppUsageTranslationKeys.deviceLabel),
icon: AppUsageUiConstants.deviceIcon,
widget: Text(
_appUsage!.deviceName ?? _translationService.translate(AppUsageTranslationKeys.unknownDeviceLabel)),
widget: Padding(
padding: const EdgeInsets.only(left: AppTheme.sizeSmall),
child: Text(_appUsage!.deviceName ??
_translationService.translate(AppUsageTranslationKeys.unknownDeviceLabel)),
),
),

// Tags - Optional field
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class HabitArchivedSection {
DateTimeHelper.formatDate(archivedDate),
style: AppTheme.bodyMedium.copyWith(
color: Theme.of(context).colorScheme.primary,
fontWeight: FontWeight.bold,
fontWeight: FontWeight.normal,
),
),
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ class HabitGoalSection {
label: translationService.translate(HabitTranslationKeys.goalSettings),
icon: Icons.track_changes,
widget: Container(
padding: const EdgeInsets.symmetric(vertical: 4),
padding: const EdgeInsets.only(
left: AppTheme.sizeSmall,
top: AppTheme.size2XSmall,
bottom: AppTheme.size2XSmall,
),
child: GestureDetector(
onTap: isArchived ? null : onTap,
behavior: HitTestBehavior.opaque,
Expand All @@ -41,7 +45,9 @@ class HabitGoalSection {
style: AppTheme.bodyMedium.copyWith(
color: isArchived
? Theme.of(context).disabledColor
: Theme.of(context).textTheme.bodyMedium?.color,
: !hasGoal
? Theme.of(context).colorScheme.onSurface.withValues(alpha: 0.6)
: Theme.of(context).textTheme.bodyMedium?.color,
),
),
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,24 @@ class HabitReminderSection {
widget: InkWell(
borderRadius: BorderRadius.circular(AppTheme.sizeMedium),
onTap: onTap,
child: Row(
children: [
Expanded(
child: Text(
reminderSummaryText,
style: AppTheme.bodyMedium.copyWith(
color: !hasReminder ? Theme.of(context).colorScheme.onSurface.withValues(alpha: 0.6) : null,
child: Padding(
padding: const EdgeInsets.only(
left: AppTheme.sizeSmall,
top: AppTheme.size2XSmall,
bottom: AppTheme.size2XSmall,
),
child: Row(
children: [
Expanded(
child: Text(
reminderSummaryText,
style: AppTheme.bodyMedium.copyWith(
color: !hasReminder ? Theme.of(context).colorScheme.onSurface.withValues(alpha: 0.6) : null,
),
),
),
),
],
],
),
),
),
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -359,22 +359,19 @@ class _TagDetailsContentState extends State<TagDetailsContent> {
label: _translationService.translate(TagTranslationKeys.detailsRelatedTags),
icon: TagUiConstants.tagIcon,
hintText: _translationService.translate(TagTranslationKeys.selectTooltip),
widget: Padding(
padding: const EdgeInsets.symmetric(horizontal: 8),
child: TagSelectDropdown(
key: ValueKey('${_tagTags!.items.length}_${_visibleOptionalFields.contains(keyRelatedTags)}'),
isMultiSelect: true,
onTagsSelected: (tagOptions, _) => _onTagsSelected(tagOptions),
showSelectedInDropdown: true,
initialSelectedTags: _tagTags!.items
.map((tag) => DropdownOption<String>(
value: tag.secondaryTagId,
label: tag.secondaryTagName,
))
.toList(),
excludeTagIds: [_tag!.id],
icon: SharedUiConstants.addIcon,
),
widget: TagSelectDropdown(
key: ValueKey('${_tagTags!.items.length}_${_visibleOptionalFields.contains(keyRelatedTags)}'),
isMultiSelect: true,
onTagsSelected: (tagOptions, _) => _onTagsSelected(tagOptions),
showSelectedInDropdown: true,
initialSelectedTags: _tagTags!.items
.map((tag) => DropdownOption<String>(
value: tag.secondaryTagId,
label: tag.secondaryTagName,
))
.toList(),
excludeTagIds: [_tag!.id],
icon: SharedUiConstants.addIcon,
),
Comment on lines +362 to 375
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This change removes the Padding widget that was previously wrapping the TagSelectDropdown. However, other changes in this pull request are adding a standardized left padding to widgets within DetailTable for consistent alignment (e.g., in app_usage_details_content.dart). To maintain visual consistency across DetailTable components, it would be better to apply the standard left padding here as well, unless TagSelectDropdown is intentionally designed to span the full width without any inset.

Suggested change
widget: TagSelectDropdown(
key: ValueKey('${_tagTags!.items.length}_${_visibleOptionalFields.contains(keyRelatedTags)}'),
isMultiSelect: true,
onTagsSelected: (tagOptions, _) => _onTagsSelected(tagOptions),
showSelectedInDropdown: true,
initialSelectedTags: _tagTags!.items
.map((tag) => DropdownOption<String>(
value: tag.secondaryTagId,
label: tag.secondaryTagName,
))
.toList(),
excludeTagIds: [_tag!.id],
icon: SharedUiConstants.addIcon,
),
Padding(
padding: const EdgeInsets.only(left: AppTheme.sizeSmall),
child: TagSelectDropdown(
key: ValueKey('${_tagTags!.items.length}_${_visibleOptionalFields.contains(keyRelatedTags)}'),
isMultiSelect: true,
onTagsSelected: (tagOptions, _) => _onTagsSelected(tagOptions),
showSelectedInDropdown: true,
initialSelectedTags: _tagTags!.items
.map((tag) => DropdownOption<String>(
value: tag.secondaryTagId,
label: tag.secondaryTagName,
))
.toList(),
excludeTagIds: [_tag!.id],
icon: SharedUiConstants.addIcon,
),
)

),
if (_tag!.isArchived)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import 'package:whph/core/domain/features/tasks/task.dart';
import 'package:whph/main.dart';

import 'package:whph/presentation/ui/features/tasks/constants/task_ui_constants.dart';
import 'package:whph/presentation/ui/shared/constants/app_theme.dart';
import 'package:whph/presentation/ui/shared/services/abstraction/i_translation_service.dart';
import 'package:acore/acore.dart' as acore;
import 'package:acore/utils/dialog_size.dart';
Expand Down Expand Up @@ -61,6 +62,7 @@ class PrioritySelectField extends StatelessWidget {
borderRadius: BorderRadius.circular(14),
child: Container(
height: 36,
padding: const EdgeInsets.only(left: AppTheme.sizeSmall),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(14),
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,38 +249,41 @@ class _TaskDatePickerFieldState extends State<TaskDatePickerField> {
});
}

return Row(
children: [
// Date field
Expanded(
child: TextFormField(
controller: widget.controller,
focusNode: widget.focusNode,
readOnly: true,
decoration: InputDecoration(
hintText: widget.hintText,
focusedBorder: InputBorder.none,
isDense: true,
contentPadding: const EdgeInsets.only(left: 8.0),
return Padding(
padding: const EdgeInsets.only(left: AppTheme.sizeSmall),
child: Row(
children: [
// Date field
Expanded(
child: TextFormField(
controller: widget.controller,
focusNode: widget.focusNode,
readOnly: true,
style: AppTheme.bodyMedium,
decoration: InputDecoration(
hintText: widget.hintText,
focusedBorder: InputBorder.none,
isDense: true,
),
onTap: _handleDateSelection,
),
onTap: _handleDateSelection,
),
),

// Reminder icon/button - use IconButton with the new reminder dialog
if (widget.controller.text.isNotEmpty)
IconButton(
icon: Icon(
Icons.notifications,
color: hasReminder
? Theme.of(context).colorScheme.primary
: Theme.of(context).colorScheme.onSurface.withValues(alpha: 0.6),
size: AppTheme.iconSizeMedium,
// Reminder icon/button - use IconButton with the new reminder dialog
if (widget.controller.text.isNotEmpty)
IconButton(
icon: Icon(
Icons.notifications,
color: hasReminder
? Theme.of(context).colorScheme.primary
: Theme.of(context).colorScheme.onSurface.withValues(alpha: 0.6),
size: AppTheme.iconSizeMedium,
),
tooltip: _currentTooltip,
onPressed: hasDate ? _showReminderDialog : null, // Disable if no date selected
),
tooltip: _currentTooltip,
onPressed: hasDate ? _showReminderDialog : null, // Disable if no date selected
),
],
],
),
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class TaskParentSection {
Expanded(
child: Text(
parentTitle ?? '',
style: AppTheme.bodyMedium.copyWith(fontWeight: FontWeight.bold),
style: AppTheme.bodyMedium,
),
),
Icon(Icons.open_in_new, size: AppTheme.iconSizeSmall, color: AppTheme.secondaryTextColor),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,23 +27,26 @@ class TaskRecurrenceSection {
child: InkWell(
borderRadius: BorderRadius.circular(AppTheme.sizeMedium),
onTap: onTap,
child: Row(
children: [
Expanded(
child: SingleChildScrollView(
scrollDirection: Axis.horizontal,
child: Text(
summaryText,
style: AppTheme.bodyMedium.copyWith(
fontWeight: FontWeight.bold,
color: recurrenceType == RecurrenceType.none
? Theme.of(context).colorScheme.onSurface.withValues(alpha: 0.6)
: null,
child: Padding(
padding: const EdgeInsets.only(left: AppTheme.sizeSmall),
child: Row(
children: [
Expanded(
child: SingleChildScrollView(
scrollDirection: Axis.horizontal,
child: Text(
summaryText,
style: AppTheme.bodyMedium.copyWith(
fontWeight: FontWeight.normal,
color: recurrenceType == RecurrenceType.none
? Theme.of(context).colorScheme.onSurface.withValues(alpha: 0.6)
: null,
),
),
),
),
),
],
],
),
),
),
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -322,12 +322,10 @@ class _TaskRecurrenceSelectorState extends State<TaskRecurrenceSelector> {
value: _recurrenceType,
decoration: const InputDecoration(
border: InputBorder.none,
contentPadding: EdgeInsets.zero,
isDense: true,
),
isExpanded: false,
icon: const Icon(Icons.arrow_drop_down),
alignment: AlignmentDirectional.centerEnd,
alignment: AlignmentDirectional.centerStart,
items: RecurrenceType.values.map((type) {
return DropdownMenuItem(
value: type,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,11 @@ class _ColorFieldState extends State<ColorField> {
onTap: _onColorSelectionOpen,
borderRadius: BorderRadius.circular(AppTheme.sizeSmall),
child: Padding(
padding: const EdgeInsets.symmetric(vertical: AppTheme.size2XSmall),
padding: const EdgeInsets.only(
left: AppTheme.sizeSmall,
top: AppTheme.size2XSmall,
bottom: AppTheme.size2XSmall,
),
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
Expand Down
4 changes: 3 additions & 1 deletion src/lib/presentation/ui/shared/components/detail_table.dart
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ class DetailTable extends StatelessWidget {
child: Text(
data.hintText!,
style: theme.textTheme.labelSmall?.copyWith(
fontWeight: FontWeight.normal,
color: theme.colorScheme.onSurface.withValues(alpha: 0.6),
),
),
Expand Down Expand Up @@ -137,7 +138,7 @@ class DetailTable extends StatelessWidget {
child: Text(
data.label,
style: theme.textTheme.bodyMedium?.copyWith(
fontWeight: FontWeight.w500,
fontWeight: FontWeight.normal,
color: theme.colorScheme.onSurface.withValues(alpha: 0.8),
),
overflow: TextOverflow.ellipsis,
Expand Down Expand Up @@ -169,6 +170,7 @@ class DetailTable extends StatelessWidget {
alignment: forceVertical ? Alignment.topLeft : Alignment.centerLeft,
child: DefaultTextStyle(
style: theme.textTheme.bodyMedium?.copyWith(
fontWeight: FontWeight.normal,
overflow: forceVertical ? TextOverflow.visible : TextOverflow.ellipsis,
color: theme.colorScheme.onSurface,
) ??
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class _TimeDisplayState extends State<TimeDisplay> {
child: Text(
_getDisplayText(),
style: TextStyle(
fontWeight: (widget.totalSeconds > 0) ? FontWeight.bold : FontWeight.normal,
fontWeight: FontWeight.normal,
color: textColor,
),
),
Expand Down