-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
fix: databse layout issue #8058
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Reviewer's GuideThis PR refines padding and layout behavior for calendar and inline databases across the tab bar and calendar page, centralizes horizontalPadding propagation in the tab bar extension, simplifies default padding in the database view widget, and adds calendar support to editor overflow types. Sequence Diagram for Padding Propagation in Tab BarsequenceDiagram
participant _DatabaseTabBarViewState
participant pageSettingBarExtensionFromState
_DatabaseTabBarViewState->>_DatabaseTabBarViewState: build()
Note right of _DatabaseTabBarViewState: Calculates horizontalPadding
_DatabaseTabBarViewState->>pageSettingBarExtensionFromState: pageSettingBarExtensionFromState(context, state, horizontalPadding)
Note right of pageSettingBarExtensionFromState: Uses the passed horizontalPadding to create a Padding widget
pageSettingBarExtensionFromState-->>_DatabaseTabBarViewState: Returns setting bar extension widget
_DatabaseTabBarViewState->>_DatabaseTabBarViewState: Applies conditional padding to main content based on view type (e.g., isCalendar)
Class Diagram for UI Layout and Padding ChangesclassDiagram
class _DatabaseTabBarViewState {
+Widget build(BuildContext context)
-Widget pageSettingBarExtensionFromState(BuildContext context, DatabaseTabBarState state, double horizontalPadding)
}
class _CalendarPageState {
+Widget build(BuildContext context)
}
class _DatabaseViewWidgetState {
+Widget build(BuildContext context)
}
class DatabasePluginWidgetBuilderSize {
+double horizontalPadding
+double paddingLeft
+double paddingLeftWithMaxDocumentWidth
}
_DatabaseTabBarViewState ..> DatabasePluginWidgetBuilderSize : "uses"
_CalendarPageState ..> DatabasePluginWidgetBuilderSize : "uses"
_DatabaseViewWidgetState ..> DatabasePluginWidgetBuilderSize : "uses"
File-Level Changes
Assessment against linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @asjqkkkk - I've reviewed your changes - here's some feedback:
- The unconditional assignment of horizontalPadding = 40.0 in database_view_widget.dart removes the original layout-based logic—please restore the conditional default padding for non-grid/board views to avoid unintended layout shifts.
- Padding calculations for Calendar and TabBar are now scattered across multiple widgets—consider centralizing horizontalPadding and paddingLeft logic within DatabasePluginWidgetBuilderSize or a shared layout utility to ensure consistency.
- After adding DatabaseBlockKeys.calendarType to overflowTypes, double-check that the calendar view properly handles overflow in all editor contexts to prevent unexpected clipping.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The unconditional assignment of horizontalPadding = 40.0 in database_view_widget.dart removes the original layout-based logic—please restore the conditional default padding for non-grid/board views to avoid unintended layout shifts.
- Padding calculations for Calendar and TabBar are now scattered across multiple widgets—consider centralizing horizontalPadding and paddingLeft logic within DatabasePluginWidgetBuilderSize or a shared layout utility to ensure consistency.
- After adding DatabaseBlockKeys.calendarType to overflowTypes, double-check that the calendar view properly handles overflow in all editor contexts to prevent unexpected clipping.
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
To fix #6770
To fix #6940

Feature Preview
PR Checklist
Summary by Sourcery
Fix database layout issues by refining padding logic across tab bar, calendar page, and inline database views, and register calendar type for overflow handling.
Bug Fixes:
Enhancements:
Chores: