Skip to content

Improve UI consistency of directory action buttons in Settings screen#626

Open
srykaran wants to merge 1 commit intoCCExtractor:mainfrom
srykaran:improve-directory-buttons-ui-clean
Open

Improve UI consistency of directory action buttons in Settings screen#626
srykaran wants to merge 1 commit intoCCExtractor:mainfrom
srykaran:improve-directory-buttons-ui-clean

Conversation

@srykaran
Copy link

@srykaran srykaran commented Mar 14, 2026

Description

This PR improves the UI consistency of the "Set To Default" and "Change Directory" buttons in the Settings → Storage and Data section.

Previously these buttons appeared visually inconsistent with the rest of the settings UI.

Changes

  • Updated button styling for better visual hierarchy
  • Added outlined style for Set To Default
  • Used filled primary style for Change Directory
  • Improved alignment and spacing between the buttons

Screenshots

Before

image

After

image

Type of Change

UI improvement / UX consistency

Summary by CodeRabbit

  • Style
    • Updated directory selection buttons with icons and purple accent styling, including rounded corners and improved visual hierarchy
    • Enhanced typography with refined font styling and sizing throughout the settings interface
    • Improved button spacing and layout consistency

@coderabbitai
Copy link

coderabbitai bot commented Mar 14, 2026

📝 Walkthrough

Walkthrough

Modified a settings directory selection list tile by converting two TextButtons to styled OutlinedButton and ElevatedButton variants with icons, updated typography using GoogleFonts.poppins, and adjusted spacing and layout properties.

Changes

Cohort / File(s) Summary
Settings Directory Button Styling
lib/app/modules/settings/views/settings_page_select_directory_list_tile.dart
Converted first button from TextButton to OutlinedButton with purple border and icon; converted second button from TextButton to ElevatedButton with purple background and icon. Updated both buttons with GoogleFonts.poppins typography, increased vertical padding, added rounded corners, and adjusted spacing between buttons (10→12). Removed row's crossAxisAlignment stretch property.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related issues

Poem

🐰 Two buttons in the settings glow,
One outlined, one with shine so bold,
Icons leap where text once flowed,
Purple hues and Poppins font unfold,
A prettier path to configure and stroll! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive The description covers the main changes and includes screenshots, but the required Fixes section and Checklist are missing. Add the 'Fixes #(issue_no)' section and complete the Checklist to match the repository's description template requirements.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: improving UI consistency of directory action buttons in the Settings screen.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
📝 Coding Plan
  • Generate coding plan for human review comments

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

You can disable poems in the walkthrough.

Disable the reviews.poem setting to disable the poems in the walkthrough.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In
`@lib/app/modules/settings/views/settings_page_select_directory_list_tile.dart`:
- Around line 60-63: Replace the force-unwrapped tColors.purpleShade! with a
safe fallback and apply it consistently where button styling uses it (the
OutlinedButton.styleFrom BorderSide and any other places that reference
tColors.purpleShade at the OutlinedButton.icon and the instances around the
other usages). Create a local variable (e.g., final buttonPurple =
tColors.purpleShade ?? fallbackColor) or use the null-coalescing expression
inline, and use that variable in the BorderSide color and in any text/icon color
or style references found in the widget class (the OutlinedButton.icon styling
and the other occurrences near the same widget) so no code path can throw if
purpleShade is null.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 938a1c25-01f9-4ab3-b881-7676a4e437c6

📥 Commits

Reviewing files that changed from the base of the PR and between f058b4a and c27cb61.

📒 Files selected for processing (1)
  • lib/app/modules/settings/views/settings_page_select_directory_list_tile.dart

Comment on lines +60 to +63
child: OutlinedButton.icon(
style: OutlinedButton.styleFrom(
side: BorderSide(color: tColors.purpleShade!),
shape: RoundedRectangleBorder(
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Avoid force-unwrapping purpleShade in button styling.

Line 62 uses tColors.purpleShade!; this can throw if the theme extension ever provides null. Use a fallback and apply it consistently to Line 173, Line 184, and Line 197.

Suggested fix
-                      side: BorderSide(color: tColors.purpleShade!),
+                      side: BorderSide(
+                        color: tColors.purpleShade ?? Theme.of(context).colorScheme.primary,
+                      ),
...
-                    icon: Icon(Icons.restore, color: tColors.purpleShade, size: 20),
+                    icon: Icon(
+                      Icons.restore,
+                      color: tColors.purpleShade ?? Theme.of(context).colorScheme.primary,
+                      size: 20,
+                    ),
...
-                        color: tColors.purpleShade,
+                        color: tColors.purpleShade ?? Theme.of(context).colorScheme.primary,
...
-                      backgroundColor: tColors.purpleShade,
+                      backgroundColor:
+                          tColors.purpleShade ?? Theme.of(context).colorScheme.primary,

Also applies to: 173-174, 184-184, 197-197

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@lib/app/modules/settings/views/settings_page_select_directory_list_tile.dart`
around lines 60 - 63, Replace the force-unwrapped tColors.purpleShade! with a
safe fallback and apply it consistently where button styling uses it (the
OutlinedButton.styleFrom BorderSide and any other places that reference
tColors.purpleShade at the OutlinedButton.icon and the instances around the
other usages). Create a local variable (e.g., final buttonPurple =
tColors.purpleShade ?? fallbackColor) or use the null-coalescing expression
inline, and use that variable in the BorderSide color and in any text/icon color
or style references found in the widget class (the OutlinedButton.icon styling
and the other occurrences near the same widget) so no code path can throw if
purpleShade is null.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant