Skip to content

fix(ui): resolve vertical overflow in DatePicker components by adjust…#8758

Open
EmirSamur wants to merge 2 commits into
AppFlowy-IO:mainfrom
EmirSamur:main
Open

fix(ui): resolve vertical overflow in DatePicker components by adjust…#8758
EmirSamur wants to merge 2 commits into
AppFlowy-IO:mainfrom
EmirSamur:main

Conversation

@EmirSamur

@EmirSamur EmirSamur commented May 25, 2026

Copy link
Copy Markdown

Description

This PR resolves the vertical overflow issue in the DatePicker component.

Changes

  • Increased the fixed rowHeight from 33 to 38 in _CalendarStyle.desktop to provide adequate vertical breathing room for grid cells.
  • Added maxLines: 1 and overflow: TextOverflow.ellipsis to the Text widget inside dowBuilder to gracefully handle localized or system-enlarged text without breaking the layout.

Context

This contribution is also part of my open-source software university course final project. Feedback is highly appreciated!

Summary by Sourcery

Adjust DatePicker calendar layout to prevent vertical overflow in desktop view and improve handling of long weekday labels.

Bug Fixes:

  • Prevent vertical overflow in the desktop DatePicker calendar grid by increasing row height and tightening weekday header padding.
  • Ensure localized or enlarged weekday labels in the DatePicker header do not break the layout by constraining text to a single line with ellipsis overflow.

Build:

  • Add leak_tracker and leak_tracker_flutter_testing as dependency overrides in the Flutter app configuration.

Copilot AI review requested due to automatic review settings May 25, 2026 14:04
@sourcery-ai

sourcery-ai Bot commented May 25, 2026

Copy link
Copy Markdown
Contributor

Reviewer's Guide

Adjusts DatePicker desktop calendar layout to prevent vertical overflow and improve robustness of day-of-week labels, and adds leak-tracking dependency overrides for tests.

File-Level Changes

Change Details Files
Tighten and harden DatePicker day-of-week header rendering to avoid vertical overflow with localized or large fonts.
  • Wrap the day-of-week label Text in dowBuilder with maxLines: 1 and overflow: TextOverflow.ellipsis to prevent layout-breaking overflow.
  • Reduce bottom padding in dowBuilder from 8.0 to 4.0 to free additional vertical space in the header row.
frontend/appflowy_flutter/lib/workspace/presentation/widgets/date_picker/widgets/date_picker.dart
Increase desktop calendar row height to give grid cells more vertical room and avoid clipping.
  • Raise _CalendarStyle.desktop rowHeight from 33 to 38 while keeping other desktop calendar style properties unchanged.
frontend/appflowy_flutter/lib/workspace/presentation/widgets/date_picker/widgets/date_picker.dart
Add dependency overrides for leak-tracking packages, likely to satisfy or stabilize the Flutter tooling/test environment.
  • Introduce dependency_overrides for leak_tracker and leak_tracker_flutter_testing with version set to any.
frontend/appflowy_flutter/pubspec.yaml

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

@CLAassistant

CLAassistant commented May 25, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hey - I've left some high level feedback:

  • The inline comments added to _CalendarStyle.desktop and dowBuilder are currently in Turkish; consider either removing them or rewriting them in English to keep codebase comments consistent and understandable for all contributors.
  • Using any for the leak_tracker and leak_tracker_flutter_testing dependency_overrides in pubspec.yaml may introduce unexpected breakages over time; it would be safer to pin them to specific versions or limit these overrides to local development instead of committing them.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The inline comments added to `_CalendarStyle.desktop` and `dowBuilder` are currently in Turkish; consider either removing them or rewriting them in English to keep codebase comments consistent and understandable for all contributors.
- Using `any` for the `leak_tracker` and `leak_tracker_flutter_testing` dependency_overrides in `pubspec.yaml` may introduce unexpected breakages over time; it would be safer to pin them to specific versions or limit these overrides to local development instead of committing them.

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.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

This PR adjusts the date picker calendar layout to reduce header overflow and adds dependency overrides to address leak_tracker package resolution.

Changes:

  • Add leak_tracker and leak_tracker_flutter_testing to dependency_overrides.
  • Update day-of-week (DOW) header rendering to reduce vertical padding and prevent text overflow.
  • Increase desktop calendar row height for improved spacing.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
frontend/appflowy_flutter/pubspec.yaml Adds dependency overrides for leak tracker packages.
frontend/appflowy_flutter/lib/workspace/presentation/widgets/date_picker/widgets/date_picker.dart Tweaks calendar header text rendering and desktop row sizing to avoid overflow/tight layout.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +177 to +178
leak_tracker: any
leak_tracker_flutter_testing: any
final locale = context.locale.toLanguageTag();
final label = DateFormat.E(locale).format(day);
return Padding(
padding: const EdgeInsets.only(bottom: 4.0), // 8.0'den 4.0'e çektik ki dikey alan rahatlasın
Comment on lines +140 to +141
maxLines: 1, // Taşmayı engelleyecek kural 1
overflow: TextOverflow.ellipsis, // Taşmayı engelleyecek kural 2
Comment on lines +131 to +146
dowBuilder: (context, day) {
final locale = context.locale.toLanguageTag();
final label = DateFormat.E(locale).format(day);
return Padding(
padding: const EdgeInsets.only(bottom: 4.0), // 8.0'den 4.0'e çektik ki dikey alan rahatlasın
child: Center(
child: Text(
label,
style: calendarStyle.dowTextStyle,
maxLines: 1, // Taşmayı engelleyecek kural 1
overflow: TextOverflow.ellipsis, // Taşmayı engelleyecek kural 2
),
),
);
},
),
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.

3 participants