Skip to content

Conversation

@ahmet-cetinkaya
Copy link
Owner

@ahmet-cetinkaya ahmet-cetinkaya commented Dec 19, 2025

🚀 Motivation and Context

This PR standardizes the visual appearance of DetailTable components across the entire application by implementing consistent padding and font weight patterns.

⚙️ Implementation Details

  • Unified left padding across all DetailTable row content widgets using AppTheme.sizeSmall
  • Normalized font weights to FontWeight.normal for labels and content
  • Removed inconsistent padding configurations in favor of standardized spacing
  • Updated 12 files across app_usages, habits, tasks, tags, and shared components
  • Maintains visual hierarchy while improving consistency

📋 Checklist for Reviewer

  • Tests passed locally.
  • Commit history is clean and descriptive.
  • Documentation updated (if applicable).
  • Code quality standards were met (e.g., linter passed).

🔗 Related [optional]

Summary by Sourcery

Standardize visual spacing and typography for DetailTable-related UI elements across tasks, habits, tags, app usages, and shared components.

Enhancements:

  • Align DetailTable row content and related widgets with consistent left padding and vertical spacing using shared theme sizes.
  • Normalize font weights for DetailTable labels, hints, and related text elements to use regular weight while preserving hierarchy via color and layout.
  • Adjust dropdown and interactive field alignment to better match the unified DetailTable layout and interaction patterns.

@ahmet-cetinkaya ahmet-cetinkaya added the enhancement New feature or request label Dec 19, 2025
@ahmet-cetinkaya ahmet-cetinkaya self-assigned this Dec 19, 2025
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @ahmet-cetinkaya, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request focuses on enhancing the visual consistency of DetailTable components and related UI elements throughout the application. By standardizing padding and font weights, the changes aim to create a more cohesive and predictable user interface, improving the overall aesthetic and user experience.

Highlights

  • Standardized Left Padding: Implemented consistent left padding for various DetailTable row content widgets across the application, utilizing AppTheme.sizeSmall for uniformity.
  • Normalized Font Weights: Adjusted font weights to FontWeight.normal for labels and content in DetailTable components and other text elements, ensuring a consistent visual hierarchy.
  • Refined Padding Configurations: Updated and removed inconsistent padding configurations in several components to align with the new standardized spacing guidelines.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@sourcery-ai
Copy link

sourcery-ai bot commented Dec 19, 2025

Reviewer's Guide

Standardizes DetailTable-related UI across tasks, habits, tags, app usage, and shared components by unifying left padding and normalizing text font weights, while making minor alignment tweaks for dropdowns and time display components.

Class diagram for updated DetailTable text styles and padding

classDiagram
  class DetailTable {
    +bool showDivider
    +bool forceVertical
    +build(BuildContext context) Widget
  }

  class DetailTableRowData {
    +String label
    +IconData icon
    +String~nullable~ hintText
    +Widget widget
  }

  class TextStyleConfig {
    +FontWeight labelFontWeight
    +FontWeight hintFontWeight
    +FontWeight valueFontWeight
  }

  class PaddingConfig {
    +double leftPadding
  }

  DetailTable --> DetailTableRowData : renders_rows_for
  DetailTable --> TextStyleConfig : uses
  DetailTable --> PaddingConfig : uses

  %% Updated configuration reflecting this PR
  TextStyleConfig : labelFontWeight = FontWeight.normal
  TextStyleConfig : hintFontWeight = FontWeight.normal
  TextStyleConfig : valueFontWeight = FontWeight.normal
  PaddingConfig : leftPadding = AppTheme.sizeSmall
Loading

File-Level Changes

Change Details Files
Introduce consistent left padding for DetailTable row content and related widgets using AppTheme.sizeSmall (or equivalent explicit left-only padding).
  • Wrapped task date picker field Row in a left-only Padding using AppTheme.sizeSmall.
  • Wrapped task recurrence summary Row in a left-only Padding using AppTheme.sizeSmall.
  • Applied left-only padding to habit reminder section content along with small vertical padding.
  • Added left-only padding to app usage device name text and priority select field container.
  • Adjusted padding for color picker field and habit goal section to use left-only plus small vertical spacing, aligning with DetailTable row layout.
src/lib/presentation/ui/features/tasks/components/task_date_picker_field.dart
src/lib/presentation/ui/features/tasks/components/task_details_content/components/task_recurrence_section.dart
src/lib/presentation/ui/features/habits/components/habit_details_content/components/habit_reminder_section.dart
src/lib/presentation/ui/features/app_usages/components/app_usage_details_content.dart
src/lib/presentation/ui/shared/components/color_picker/color_field.dart
src/lib/presentation/ui/features/habits/components/habit_details_content/components/habit_goal_section.dart
src/lib/presentation/ui/features/tasks/components/priority_select_field.dart
Normalize font weights for labels, hints, and content text within DetailTable and related sections to FontWeight.normal.
  • Set hint text style in DetailTable to use fontWeight: FontWeight.normal.
  • Changed DetailTable label text from medium/semibold to FontWeight.normal.
  • Ensured DefaultTextStyle for DetailTable content uses FontWeight.normal.
  • Updated habit archived section date text to use normal font weight instead of bold.
  • Updated task parent title text to use AppTheme.bodyMedium without overriding fontWeight.
  • Normalized time display text to always use FontWeight.normal, regardless of totalSeconds.
  • Changed task recurrence summary text style to FontWeight.normal instead of bold.
src/lib/presentation/ui/shared/components/detail_table.dart
src/lib/presentation/ui/features/habits/components/habit_details_content/components/habit_archived_section.dart
src/lib/presentation/ui/features/tasks/components/task_details_content/components/task_parent_section.dart
src/lib/presentation/ui/shared/components/time_display.dart
src/lib/presentation/ui/features/tasks/components/task_details_content/components/task_recurrence_section.dart
Align text styles of input widgets inside DetailTable-like rows with shared typography.
  • Applied AppTheme.bodyMedium to the task date picker TextFormField so its text matches other detail rows.
  • Kept color/alpha handling for recurrence and reminder summary text while aligning base style with AppTheme.bodyMedium or theme text styles.
src/lib/presentation/ui/features/tasks/components/task_date_picker_field.dart
src/lib/presentation/ui/features/tasks/components/task_details_content/components/task_recurrence_section.dart
src/lib/presentation/ui/features/habits/components/habit_details_content/components/habit_reminder_section.dart
Clean up inconsistent in-row configurations (padding, alignment, layout) to better match the DetailTable pattern.
  • Removed extra horizontal Padding around the related tags TagSelectDropdown so it aligns with other DetailTable widgets and relies on standard row padding.
  • Adjusted TaskRecurrenceSelector dropdown alignment from centerEnd to centerStart and removed custom contentPadding/isDense from its InputDecoration to better match other fields.
  • Simplified or standardized padding and layout in multiple sections to rely on shared spacing constants rather than ad-hoc values.
src/lib/presentation/ui/features/tags/components/tag_details_content.dart
src/lib/presentation/ui/features/tasks/components/task_recurrence_selector/task_recurrence_selector.dart

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request does a great job of standardizing padding and font weights across DetailTable components, which significantly improves UI consistency and maintainability. The changes are well-aligned with the goal of using theme-based styling. I've pointed out a couple of minor instances where hardcoded padding values can be replaced with theme constants to make the implementation even more consistent. Overall, this is a solid improvement.

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey - I've found 2 issues, and left some high level feedback:

  • In several places (e.g. TaskDatePickerField, HabitReminderSection, ColorField), you’ve added left padding inside the row/widget while the DetailTable likely already provides horizontal padding; consider centralizing this spacing at the table/row level to avoid doubled or inconsistent left offsets.
  • The TaskDatePickerField TextFormField now has both an outer Padding with AppTheme.sizeSmall and an inner contentPadding: EdgeInsets.only(left: 8.0); if you’re unifying spacing, you may want to drop or reduce the inner content padding so the effective left spacing matches other cells.
  • Some new padding uses raw 8.0 (e.g. HabitGoalSection) while other changes use AppTheme.sizeSmall; for consistency with the theme-based approach introduced in this PR, it may be better to replace remaining literals with the corresponding theme constants.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- In several places (e.g. `TaskDatePickerField`, `HabitReminderSection`, `ColorField`), you’ve added left padding inside the row/widget while the `DetailTable` likely already provides horizontal padding; consider centralizing this spacing at the table/row level to avoid doubled or inconsistent left offsets.
- The `TaskDatePickerField` `TextFormField` now has both an outer `Padding` with `AppTheme.sizeSmall` and an inner `contentPadding: EdgeInsets.only(left: 8.0)`; if you’re unifying spacing, you may want to drop or reduce the inner content padding so the effective left spacing matches other cells.
- Some new padding uses raw `8.0` (e.g. `HabitGoalSection`) while other changes use `AppTheme.sizeSmall`; for consistency with the theme-based approach introduced in this PR, it may be better to replace remaining literals with the corresponding theme constants.

## Individual Comments

### Comment 1
<location> `src/lib/presentation/ui/features/tasks/components/task_date_picker_field.dart:252-261` </location>
<code_context>
-              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,
+                contentPadding: const EdgeInsets.only(left: 8.0),
+              ),
+              onTap: _handleDateSelection,
</code_context>

<issue_to_address>
**suggestion:** Left padding is now applied twice and mixes magic values with theme constants.

The `Padding` around the `Row` (using `AppTheme.sizeSmall`) plus `contentPadding: EdgeInsets.only(left: 8.0)` on the `InputDecoration` results in double left padding and introduces a magic number. Please either remove one of these paddings, or replace `8.0` with a theme constant (e.g. `AppTheme.sizeSmall`) so spacing remains consistent with the theme.
</issue_to_address>

### Comment 2
<location> `src/lib/presentation/ui/features/habits/components/habit_details_content/components/habit_goal_section.dart:23-25` </location>
<code_context>
       icon: Icons.track_changes,
       widget: Container(
-        padding: const EdgeInsets.symmetric(vertical: 4),
+        padding: const EdgeInsets.only(left: 8.0, top: 4.0, bottom: 4.0),
         child: GestureDetector(
           onTap: isArchived ? null : onTap,
</code_context>

<issue_to_address>
**suggestion:** Use spacing constants instead of raw doubles for the new padding.

Elsewhere in this PR you’re already using `AppTheme` spacing (e.g. `AppTheme.sizeSmall`, `AppTheme.size2XSmall`). To keep spacing consistent and maintainable, please replace these `8.0`/`4.0` literals with the appropriate `AppTheme` constants, assuming the sizes match.

```suggestion
      widget: Container(
        padding: const EdgeInsets.only(
          left: AppTheme.sizeSmall,
          top: AppTheme.size2XSmall,
          bottom: AppTheme.size2XSmall,
        ),
        child: GestureDetector(
```
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@ahmet-cetinkaya
Copy link
Owner Author

Code review

Found 2 issues:

  1. Hard-coded padding value instead of theme constant (CLAUDE.md says: "Use theme constants from src/lib/presentation/ui/shared/constants/app_theme.dart")

    padding: const EdgeInsets.only(left: 8.0, top: 4.0, bottom: 4.0),

  2. Double padding creates excessive left spacing (UI consistency issue)

    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,
    contentPadding: const EdgeInsets.only(left: 8.0),

@ahmet-cetinkaya
Copy link
Owner Author

/gemini review

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request does a great job of standardizing padding and font weights across various DetailTable components, leading to a more consistent UI. The changes are well-aligned with the goal of creating a unified visual language. I've found one minor inconsistency regarding padding that could be addressed to make the implementation even more robust. Overall, this is a solid improvement to the application's UI consistency.

Comment on lines +362 to 375
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,
),
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,
),
)

@ahmet-cetinkaya ahmet-cetinkaya merged commit 33528f2 into main Dec 20, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants