Skip to content

Conversation

@SHUBHAM-410
Copy link

@SHUBHAM-410 SHUBHAM-410 commented Jan 18, 2026

Closes #135 BUG: TableCalendar Widget Crashes When focusedDay is Out of Range

📝 Description

Fixes the overlapping of the label and hint text in the CustomTextField widget.
The label now properly moves above the input field when text is entered, preventing UI overlap.

🔧 Changes Made

Updated CustomTextField logic in lib/widgets/custom_widgets.dart

Summary by CodeRabbit

  • UI Improvements
    • Refined text input field hint and label behavior for improved visual clarity and better user interaction when labels are present.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 18, 2026

📝 Walkthrough

Walkthrough

The pull request applies formatting and indentation improvements across multiple widget definitions in custom_widgets.dart. It includes a minor UI semantics change to CustomTextField where the hint text decoration now uses the raw hintText parameter and adds automatic floating label behavior.

Changes

Cohort / File(s) Summary
Text Field Semantics
lib/widgets/custom_widgets.dart
CustomTextField now uses raw hintText in decoration instead of effectiveHintText; adds floatingLabelBehavior: FloatingLabelBehavior.auto for automatic label behavior management
Code Formatting & Structure
lib/widgets/custom_widgets.dart
Multiple widgets refactored with indentation adjustments, reflowed lines, trailing commas, and multiline constructor formatting. Affected widgets: CustomButton, DashboardLoadingSkeleton, WorkspaceLoadingSkeleton, CalendarLoadingSkeleton, Calendar widget variants, and others

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 With whiskers twitching, clean code's the delight,
Formatting flourishes, indented just right,
Hints that now float with semantic grace,
Custom widgets polished to brighten the place! ✨

🚥 Pre-merge checks | ✅ 3 | ❌ 2
❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The PR is linked to issue #135 which requires fixing a TableCalendar crash from hardcoded date ranges and implementing dynamic range setting. However, the actual changes made are only formatting tweaks and minor CustomTextField semantics updates, not calendar range fixes. The PR changes do not address the linked issue #135 requirements. Implement the dynamic calendar date range (±10/100 years) and fix the TableCalendar crash from out-of-range focusedDay that the issue #135 requires.
Out of Scope Changes check ⚠️ Warning The PR focuses on CustomTextField UI/text field semantics in custom_widgets.dart. While the changes align with the stated PR objective of fixing label-hint overlap, they are out-of-scope relative to the linked issue #135 which requires calendar range fixes. The PR should either address the calendar crash from out-of-range dates (as required by #135) or be linked to an appropriate issue focused on CustomTextField improvements instead.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title clearly and directly describes the main change: fixing label and hint text overlap in CustomTextField, which is the primary UI/semantics change evident in the file modifications.
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.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Copy link
Contributor

@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

🤖 Fix all issues with AI agents
In `@lib/widgets/custom_widgets.dart`:
- Line 37: Remove the dead local variable effectiveHintText which is computed as
"label ?? hintText" but never used; update the containing function (where
effectiveHintText is declared alongside label and hintText) by deleting the line
"final String effectiveHintText = label ?? hintText" and leaving usages to
reference hintText (as already changed on line 50), ensuring no other references
to effectiveHintText remain.

@@ -37,7 +37,7 @@ class CustomTextField extends StatelessWidget {
final String effectiveHintText = label ?? hintText;
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Remove unused variable effectiveHintText.

This variable is computed but no longer used after the change on line 50 switched from effectiveHintText to hintText. This is now dead code.

Suggested fix
 `@override`
 Widget build(BuildContext context) {
-  final String effectiveHintText = label ?? hintText;
   final IconData? effectivePrefixIcon = icon ?? prefixIcon;
   final bool effectiveObscureText = isPassword ?? obscureText;
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
final String effectiveHintText = label ?? hintText;
`@override`
Widget build(BuildContext context) {
final IconData? effectivePrefixIcon = icon ?? prefixIcon;
final bool effectiveObscureText = isPassword ?? obscureText;
🤖 Prompt for AI Agents
In `@lib/widgets/custom_widgets.dart` at line 37, Remove the dead local variable
effectiveHintText which is computed as "label ?? hintText" but never used;
update the containing function (where effectiveHintText is declared alongside
label and hintText) by deleting the line "final String effectiveHintText = label
?? hintText" and leaving usages to reference hintText (as already changed on
line 50), ensuring no other references to effectiveHintText remain.

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